Source code - D_Main.c: W_VerifyFileMD5

Status
Not open for further replies.

Flame

WR 102
I've been doing some recent source code editing and I've been wondering how the MD5 of a wad could be found. Something like how these first four files of the code have it.
Code:
W_VerifyFileMD5(0, "4d26f0d5ab5c5d7b4090367f95ea9f85"); // srb2.srb
W_VerifyFileMD5(1, "5b70614bd87bad9a9e11ea7190a108f7"); // sonic.plr
W_VerifyFileMD5(2, "e11f0ff56551ceca77d5859ee1f88a7d"); // tails.plr
W_VerifyFileMD5(3, "553d300a7af2382f9283007332a852f4"); // knux.plr

I know a specific program like a Hex editor or something is needed, but I question how I would go about getting it, if there are diffrent variations of this so called hex editor, and where I would find the MD5 within the wad/file WITH the hex editor.
 
There are some programs on the internet, Dash's question topic had a link to one. Or, if you had a friend, you could arrange a netgame with different MD5 sums and get SRB2 itself to tell you. Or, you could find the part of the SRB2 source that contains the MD5 checking, and see how it works, and make your own program for MD5 checks.
 
http://lawarias.game-server.cc:81/trac/browser/SRB2109/src/w_wad.c?rev=2277#L806

Code:
[10/25 21:39:00] <Flame> [url]http://www.ssntails.sepwich.com/mb/viewtopic.php?p=190572#190572[/url] <-- I don't get what you're pointing me to Logan. :X
[10/25 21:40:37] <Logan_GBA> SRB2 returns a error, (or console print in debug builds) if the MD5 don't match
[10/25 21:40:57] <Logan_GBA> It will tell you what the MD5 string should be

http://downloads.activestate.com/contrib/md5sum/Windows/

Code:
C:\msys\bin>md5sum --help
Usage: md5sum [OPTION] [FILE]...
  or:  md5sum [OPTION] --check [FILE]
Print or check MD5 checksums.
With no FILE, or when FILE is -, read standard input.

  -b, --binary            read files in binary mode (default on DOS/Windows)
  -c, --check             check MD5 sums against given list
  -t, --text              read files in text mode (default)

The following two options are useful only when verifying checksums:
      --status            don't output anything, status code shows success
  -w, --warn              warn about improperly formated MD5 checksum lines

      --help              display this help and exit
      --version           output version information and exit

The sums are computed as described in RFC 1321.  When checking, the input
should be a former output of this program.  The default mode is to print
a line with checksum, a character indicating type (`*' for binary, ` ' for
text), and name for each FILE.

Report bugs to <bug-textutils@gnu.org>.

Code:
C:\msys\bin>md5sum c:\srb2demo2\sonic.plr
\5b70614bd87bad9a9e11ea7190a108f7 *c:\\srb2demo2\\sonic.plr
 
Status
Not open for further replies.

Who is viewing this thread (Total: 0, Members: 0, Guests: 0)

Back
Top