josephxsxn

tor hash gen thoughts

Mar 13th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.54 KB | None | 0 0
  1. import base64
  2. import requests
  3.  
  4. b = base64.b32encode(bytes("aaaaaaaaaw", 'utf-8'))[:16].lower()
  5.  
  6. proxies = {
  7.   'http': 'http://localhost:8118'
  8. }
  9.  
  10. r = requests.get("http://jh32yv5zgayyyts3.onion/", proxies=proxies)
  11. r.content
  12. r.status_code
  13.  
  14. //curl --proxy http://localhost:8118 http://jh32yv5zgayyyts3.onion/
  15. //Addresses in the .onion TLD are generally opaque, non-mnemonic, 16-character alpha-semi-numeric hashes which are automatically generated based on a public key when a hidden service is configured. These 16-character hashes can be made up of any letter of the alphabet, and decimal digits from 2 to 7, thus representing an 80-bit number in base32.
  16.  
  17.  
  18. validhash = open("hashes.data")
  19. invalidhash = open("invalidhashes.data")
  20. validhash.write("To write or not to write\nthat is the question!\n")
  21. validhash.close()
  22.  
  23. hashchars = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','2','3','4','5','6','7']
  24. chartracker = {'1':0,'2':0,'3':0,'4':0,'5':0,'6':0,'7':0,'8':0,'9':0,'10':0,'11':0,'12':0,'13':0,'14':0,'15':0,'16':0}
  25.  
  26. def buildHash(){
  27. //find what digit to change
  28.  
  29. }
  30.  
  31.  
  32. def permute(xs, low=0):
  33.     if low + 1 >= len(xs):
  34.         yield xs
  35.     else:
  36.         for p in permute(xs, low + 1):
  37.             yield p        
  38.         for i in range(low + 1, len(xs)):        
  39.             xs[low], xs[i] = xs[i], xs[low]
  40.             for p in permute(xs, low + 1):
  41.                 yield p        
  42.             xs[low], xs[i] = xs[i], xs[low]
  43.  
  44. for p in permute(hashchars):
  45.     print(p)
Add Comment
Please, Sign In to add comment