WinHex CRC's Log Out | Topics | Search
Moderators | Edit Profile

X-Ways Support Forum » Hex Editing » WinHex CRC's « Previous Next »

Author Message
Top of pagePrevious messageNext messageBottom of page Link to this message

Anonymous
Posted on Saturday, Oct 2, 2004 - 13:20:   

Hi,

Please help me as I am pulling my hair out over this one...

I would have *SWORN* WinHex would display the "Current CRC" and "Real CRC" of a file in the "Details Panel."

Eg. When I Hex Edit a file, its CRC obviously changes. WinHex would display the "Current CRC" AND the "New (correct) CRC." I found this feature VERY useful, but somehow I can't find it anymore. Is it because I was trying an older version of WinHex, or because I upgraded to WXP SP2?!?

I'm totally stumped. Please help me get those CRC's displayed again!

Thanks,
Willem Moolenaar
The Netherlands
Top of pagePrevious messageNext messageBottom of page Link to this message

Willem Moolenaar (Enuffsaid)
Posted on Saturday, Oct 2, 2004 - 13:23:   

I have now registered with the board. Please help me! :)

Willem Moolenaar
The Netherlands
Top of pagePrevious messageNext messageBottom of page Link to this message

Stefan Fleischmann (Admin)
Posted on Saturday, Oct 2, 2004 - 13:29:   

Please enable Options | Security | [x] Calculate auto-hash to see a file's CRC in the details panel.

To recalculate the CRC after editing, press Alt+F2.

If you wish to use WinHex beyond evaluation, please order a licence. Thanks.
Top of pagePrevious messageNext messageBottom of page Link to this message

Willem Moolenaar (Enuffsaid)
Posted on Saturday, Oct 2, 2004 - 20:29:   

Hi Stefan,

Thanks for your response.

Recently I tried my hand at hex-editing the TCPIP.SYS file for unlimited concurrent connections:

TCPIP.SYS
359,040 bytes, version 5.1.2600.2505

Offset 130 (This is the checksum!)
FROM: 27 C3 05 00 TO: 1B C4 05 00 (corrected checksum)

offset 4F322
FROM: A0 00 00 00 TO: FE FF FF 00 (unlimited connections)

When I edited the file, WinHEX would ALSO display the "correct" Checksum in the details panel, right below the "current" checksum.

You showed me how to enable the checksum in the details panel. I would do it before by selecting Tools > Calculate Hash. But my problem is...

1) I do NOT get the correct values from WinHEX. Example from the above file: The Checksum is stored at offset 130 in the TCPIP.SYS file. But it looks nothing like the values WinHex is giving me from its CRC32.

2) I still don't see a "correct checksum" below the "current checksum". You showed me another way of recalulating, but my problem still is the values don't match with before.

Please don't get me wrong, I'm not accusing anybody of anything, its just that I would have **SWORN** WinHex had this the first time I tried it. And it was the feature I liked most... I could edit a file and WinHex would tell me what the new CRC is and I'd just edit that value in at Offset 130. But now the values don't even match. :(

I am obviously doing something wrong, and I'm pulling my hair out trying to figure out what. If WinHex can do what I *thought* it could do, I will certainly register my copy. :)

Thanks very much for your help Stefan, and congrats on your kick-ass hex-editor.

Kind regards,
Willem Moolenaar
Top of pagePrevious messageNext messageBottom of page Link to this message

Willem Moolenaar (Enuffsaid)
Posted on Saturday, Oct 2, 2004 - 20:41:   

Please let me sum that up... From the TCPIP.SYS at offset 130 I find the values 27 c3 05 00, so I would expect WinHex to tell me the file's CRC is 05c327h, but instead it gives me a completely different value. I've tried CRC32 and Checksum (32bit).

What am I doing wrong?

Thanks!
Willem Moolenaar
Top of pagePrevious messageNext messageBottom of page Link to this message

Stefan Fleischmann (Admin)
Posted on Saturday, Oct 2, 2004 - 21:35:   

A checksum cannot be calculated for itself because its value is unknown at the time it is being calculated. It could be calculated for the file it will be included in only if the checksum algorithm omits the place where the checksum is going be stored later once it has been calculated.
Top of pagePrevious messageNext messageBottom of page Link to this message

Willem Moolenaar (Enuffsaid)
Posted on Saturday, Oct 2, 2004 - 22:19:   

Oh dear me! Stefan, I'm feeling rather silly. I'm not sure I completely understand what you're telling me.

If I hex-edit the original TCPIP.SYS and look at offset 130 (which supposedly is the file's checksum) I find 05c327, but why doesn't WinHex give me this value when I tell it to calculate the file's CRC32?

I've done those hex-edits before, and the values matched then. I edited the values at offset 4f322h and WinHex would calculate the file's new Checksum for me. Now I'm getting completely different values. I'm baffeld! I'm going to try this on a WinXP SP1 machine, and see what happens then. Keep you posted. Thanks for your effort.
Top of pagePrevious messageNext messageBottom of page Link to this message

Willem Moolenaar (Enuffsaid)
Posted on Saturday, Oct 2, 2004 - 22:29:   

Just checked on a SP1 machine. Same thing. I give up. Here's hoping you'll clarify things for me.

Cheers,
Willem
Top of pagePrevious messageNext messageBottom of page Link to this message

Stefan Fleischmann (Admin)
Posted on Sunday, Oct 3, 2004 - 10:40:   

I was referring to a principal, theoretical error, so doing the same on another computer won't help, obviously.

C = checksum
D = data

The value of C depends on the value of D. If D included C, C could not be calculated for D because the C part of D is unknown at the time of the calculation.

If you don't have a chicken, you will never get an egg. If you don't have an egg, you will never get a chicken.

All I'm saying is that, not knowing the specifics of the file format (but you should know if you want to edit it), the checksum would have to be calculated for a part of D that does not include C. You may just have to set the place where C is going to be stored in D to zero before starting the calculation.
Top of pagePrevious messageNext messageBottom of page Link to this message

Willem Moolenaar (Enuffsaid)
Posted on Sunday, Oct 3, 2004 - 10:58:   

Yes, I understand that Stefan. That sounds rather obvious, but that is not my problem! But I have figured it out now... I was confused with another program. The Checksums I was refering too are the PE HEADER CHECKSUMS.

PE Explorer will clearly give these checksums, and if you modify data, it will tell you what the NEW PE HEADER CHECKSUM should be. The values PE Explorer gives matches exactly what is stored at offset 130. I cannot find this feature in WinHex, and its definately what I need.

http://www.heaventools.com/

I'm also sure I posted this info for you yesterday already, but it seems my post has been deleted.

Please see if you can include PE HEADER CHECKSUM calculations in WinHex. Without that, WinHex is useless to me.

Kind regards,

Willem Moolenaar
Top of pagePrevious messageNext messageBottom of page Link to this message

Stefan Fleischmann (Admin)
Posted on Sunday, Oct 3, 2004 - 11:04:   

Sorry, I don't think I will include such a file format specific checksum calculation.
Top of pagePrevious messageNext messageBottom of page Link to this message

Willem Moolenaar (Enuffsaid)
Posted on Sunday, Oct 3, 2004 - 11:22:   

"File format specific"?!?!

ALL files have a PE Header don't they? It's the one M$ checks when copying the files off the CD during an installation of Windows for example

If I modify anything in a file, I must modify the PE Header accordingly. Supposedly its the sum of all Words in the file.

Bummer you won't include this. I consider this to be a must! Thanks anyway.
Top of pagePrevious messageNext messageBottom of page Link to this message

Willem Moolenaar (Enuffsaid)
Posted on Sunday, Oct 3, 2004 - 11:27:   

PE = Windows Portable Executable files. They include exe, dll, sys, bpl, dpl, cpl, ocx, acm, ax, and scr.

That's not all files, but certainly is a lot. I'm hoping you'll change your mind. :)

Thanks,
Willem
Top of pagePrevious messageNext messageBottom of page Link to this message

Stefan Fleischmann (Admin)
Posted on Wednesday, Oct 6, 2004 - 17:33:   

Will keep it in my mind, maybe at a later point of time.
Top of pagePrevious messageNext messageBottom of page Link to this message

PouchX
Username: pouchx

Registered: N/A
Posted on Sunday, Jan 7, 2007 - 10:54:   

I have similar problem.
I need to edit firmware for Garmin GPS units.
And its ok when I change some text strings in this file.
After uploading changed firmware to GPS unit everything is ok and GPS works fine... but this GPS has self test, it test hardware and software.. and when it checks firmware, I get FAILED.. and I think it is becouse of checksum of changed firmware file.

How can find type of checksum on this file?? (CRC16, CRC32 etc? How can I find where CRC is located? And how to replace it with new(correct) one?

Add Your Message Here
Post:
Username: Posting Information:
Only registered users may post messages here, i.e. you need to have an account.
Password:
Options: Enable HTML code in message
Automatically activate URLs in message
Action:
Forum operated by X-Ways Software Technology AG.