Ledger Nano X - The secure hardware wallet
SHARE
TWEET

v5 Password Generator

a guest Sep 7th, 2019 113 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. #00 145 10100
  3. #00 155 10200
  4. #01 000 00157
  5. #0103 5 01000
  6. #10 060 01530
  7. #0103 6 11000
  8. #010 1 0 10115
  9. #01096 10500
  10. #01082 10101
  11. #01010 10115
  12.  
  13. loginNo = input("Login To TamaTown: ").replace(" ","")
  14.  
  15. def CheckBit(code,verify=True,bit=9):
  16.     checkBit = []
  17.     checkBit += code
  18.     codeArr = []
  19.     for i in range(0,len(code)):
  20.         if i == bit:
  21.             continue
  22.         codeArr.append(int(checkBit[i]))
  23.     print(codeArr)
  24.     checksum = sum(codeArr) % 10
  25. #   if code[bit] == "0":
  26. #       return checksum
  27.     if verify == False:
  28.         return checksum
  29.     if code[bit] == str(checksum):
  30.         return 10
  31.     else:
  32.         return checksum
  33.        
  34. def FindType(code):
  35.  
  36.     if code[:4] == "0100" and CheckBit(code,True,9) == 10:
  37.         return 0
  38.     elif code[:2] == "10":
  39.         return 1
  40.     elif code[:3] == "011":
  41.         return 2
  42.     elif code[:2] == "00":
  43.         return 3
  44.     elif code[:4] == "0101" and CheckBit(code,True,9) == 10:
  45.         return 5
  46.     elif code[:2] == "01" and CheckBit(code,True,4) == 10:
  47.         return 4
  48.     else:
  49.         return 6
  50.  
  51. def GetTamaIndex(code, type):
  52.     tamaIndex = []
  53.     if type == 0: #01 check 9 variant
  54.         tamaIndex.append(code[6])
  55.         tamaIndex.append(code[8])
  56.     elif type == 1: #"10" variant
  57.         tamaIndex.append(code[5])
  58.         tamaIndex.append(code[7])
  59.     elif type == 2: #"0103 check 6" variant
  60.         tamaIndex.append(code[2])
  61.         tamaIndex.append(code[4])
  62.     elif type == 3: #"00" variant
  63.         tamaIndex.append(code[8])
  64.         tamaIndex.append(code[4])
  65.     elif type == 4: #"01"  variant
  66.         tamaIndex.append(code[9])
  67.         tamaIndex.append(code[7])
  68.     elif type == 5: #"0101" variant
  69.         tamaIndex.append(code[7])
  70.         tamaIndex.append(code[8])
  71.     return tamaIndex
  72.  
  73. def GetTamaRegion(code, type):
  74.     if type == 0: #"01 check 9"
  75.         return code[7]
  76.     elif type == 1: #"10" variant
  77.         return code[6]
  78.     elif type == 2: #"0103  check 4" variant
  79.         return code[6]
  80.     elif type == 3: #"00" variant
  81.         return code[5]
  82.     elif type == 4: #"01 check 4:8" variant
  83.         return code[5]
  84.     elif type == 5: #"0101" variant
  85.         return code[5]
  86.  
  87. type = FindType(loginNo)
  88. if type != 6:
  89.     tIndex = GetTamaIndex(loginNo,type)
  90.     tRegion = GetTamaRegion(loginNo,type)
  91.    
  92.     print("Recognized Type! " + str(type))
  93.     print("Tama Index: "+str(tIndex))
  94.     print("Tama Region: "+str(tRegion))
  95.    
  96.     win = input("Are you a WINNER? [y/n] ").lower()
  97.     if win == "y":
  98.         what = input("What did you win? [item/money] ").lower()
  99.         if what == "item":
  100.             which = input("What item did you win? (enter id) [000:999] ").lower()
  101.             while len(which) < 3:
  102.                 which = "0"+which
  103.             logout = "3"+str(tRegion)+str(which)+"\n"+str(tIndex[0])+"01"+str(tIndex[1])
  104.             logout += str(CheckBit(logout.replace("\n",""),False))
  105.             print("OK Good day sir! \n"+logout)
  106.         if what == "money":
  107.             howmuch = input("How much did you win? (01=100GP, 02=200GP, 03=500GP, 04=700GP, 05=1000GP)").lower()
  108.             if len(howmuch) == 1:
  109.                 howmuch = "0"+howmuch
  110.             logout = "2"+str(tRegion)+"000\n"+str(tIndex[0])+str(howmuch)+str(tIndex[1])
  111.             logout += str(CheckBit(logout.replace("\n",""),False))
  112.             print("OK Good day sir! \n"+logout)
  113.     else:
  114.         logout = "1"+str(tRegion)+"000\n"+str(tIndex[0])+"01"+str(tIndex[1])
  115.         logout += str(CheckBit(logout.replace("\n",""),False))
  116.         print("OK Good day sir! \n"+logout)
  117.    
  118. else:
  119.     print("Invalid Type! (or unrecognized)")
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top