Government Security
Network Security Resources

Jump to content

Photo

Hax.tor.hu Level 11

security linux perl hash md5
  • Please log in to reply
No replies to this topic

#1 beardeddude

beardeddude

    Private

  • Members
  • 1 posts

Posted 03 January 2012 - 10:59 AM

Hey, has anyone done the hax.tor.hu challenges? I am stuck on level 11. It seems like it should be really easy, all you have to do is get the MD5 hash of a string.

as an example it would say "Enter the hash for: "a e o k m" (without spaces/quotes)." and it gives me 10 seconds to do so.

but for some reason i cant get it to work. Am i just being an idiot? i have tried a few ways of getting the hash such as web sites and the linux commands "echo -n "aeokm" | md5sum" and "echo "aeokm" | md5sum".

it gives me a perl script as a hint but for what i can tell the script just finds "a e o k m" on the page and removes the spaces and then hashes it. here is the code:

#!/usr/bin/perl
# a little hint for either the manual or the automatic solution <img src='http://www.governmentsecurity.org/forum/public/style_emoticons/<#EMO_DIR#>/smile.png' class='bbc_emoticon' alt=':)' />
use Digest::MD5 qw(md5 md5_hex md5_base64);
while ($l = <>) {
  $l =~ s/[\n\r\t ]+/ /g;
  if ($l =~ /hash for: "([^"]+)"/) {
	$str = $1;
	$str =~ s/ //g;
	$md5 = md5_hex $str;
	print "\n\n$md5\n\n";
  }
}

If anyone has experience with the challenges on this site and have an idea what i am doing wrong your help would be greatly appreciated.
Thanks.





Also tagged with one or more of these keywords: security, linux, perl, hash, md5