TrOoN

Brutfource ruby script

Feb 12th, 2012
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. # emaile : http://www.facebook.com/fysl.fyslm
  2. # ony to educ
  3.  
  4. ~~ ked ans | hacker_1420 |hamza mahmah | bresco-dz | mosta_team | viper | elite trojen |hacker_fire | DZ mafia all algerian :p
  5.  
  6. #!/bin/ruby
  7.  
  8. characters_to_use="ABCD123456"
  9. minimum_password_length=5
  10. maximum_password_length=15
  11.  
  12. def password_correct?(test_password)
  13. # This is just for testing. There's no need to alter this bit!
  14. return true if test_password == "root"
  15. return false
  16. end
  17.  
  18. char_array=characters_to_use.split(//)
  19. is_access_granted = false
  20.  
  21. (minimum_password_length..maximum_password_length).each do |password_length| # loop to gradually increase password length
  22. combinations=char_array.length**password_length
  23.  
  24. (0..combinations-1).each do |perm_number| # loop through combinations for a given length
  25. password=""
  26. (1..password_length).each do |char_number| # loop through characters
  27. char_reference = (perm_number / char_array.length**(char_number-1)).floor % char_array.length
  28. character = char_array[char_reference]
  29. password << character
  30. end
  31.  
  32. if password_correct?(password)
  33. puts "#{password} | Access Denied | #{perm_number} / #{combinations}"
  34. else
  35. puts "#{password} | Access Granted"
  36. is_access_granted = true
  37. break
  38. end
  39. end
  40. break if is_access_granted
  41. end
Advertisement
Add Comment
Please, Sign In to add comment