Guest Posted September 20, 2006 Posted September 20, 2006 I decided to start to learn another langauge and thought ruby would be a nice langauge to know. So for my first program i decided to make a simple tool that will just check milw0rms md5 cracker to see if a submited hash has been crack or not. The code could probly be inproved but what do you expect for something that took me 30mins to write in a langauge i have never used before. #!/usr/bin/ruby require 'net/http' require 'uri' # Print out an intro def Intro() result1 ="milw0rm.com MD5 checkern"; result2 ="Programmed by: Spidern"; result3 ="irc: irc.hackedyourbox.netn"; result4 ="http://www.cyber-t3ch.netn"; return result1 +result2 +result3 +result4; end #sumbmit the hash and return the results def getPage() res =Net::HTTP.post_form(URI.parse('http://www.milw0rm.com/cracker/search.php'), {'hash'=>$hash}); return res.body(); end #if retNum =1, then we want to return the passowrd. #if retNum =2, then we want to return the status of the password def getPass(str, retNum) str =str.split('<TR class="submit">'); str =str[1].split('</TBODY>'); str =str[0].split($hash); str =str[1].split('</TD><TD align="middle" nowrap="nowrap" width=90>'); return str[retNum]; end print(Intro() +"n"); #The user didnt give us a hash to check so tell them and die. if(ARGV[0] ==nil) print("You need to tell me the hash you wish to look upn"); else $hash =ARGV[0]; page =getPage(); pass =getPass(page, 1); #We will assume the password has been cracked #if we didnt get a password back then we know it hasnt been cracked yet so #we tell the user the status of the password instead if(pass =='') status =getPass(page, 2); status =status.split('</TD>'); print("Status: " +status[0] +"n"); else print("Password: " +pass +"n"); end end Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.