fork download
  1. 4055001556657
  2. # your code goes here
  3. """ base58 encoding / decoding functions """
  4. import unittest
  5.  
  6. alphabet = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'
  7. base_count = len(alphabet)
  8.  
  9. def encode(num):
  10. """ Returns num in a base58-encoded string """
  11. encode = ''
  12.  
  13. if (num < 0):
  14. return ''
  15.  
  16. while (num >= base_count):
  17. mod = num % base_count
  18. encode = alphabet[mod] + encode
  19. num = num / base_count
  20.  
  21. if (num):
  22. encode = alphabet[num] + encode
  23.  
  24. return encode
  25.  
  26. def decode(s):
  27. """ Decodes the base58-encoded string s into an integer """
  28. decoded = 0
  29. multi = 1
  30. s = s[::-1]
  31. for char in s:
  32. decoded += multi * alphabet.index(char)
  33. multi = multi * base_count
  34.  
  35. return decoded
  36.  
  37. class Base58Tests(unittest.TestCase):
  38.  
  39. def test_alphabet_length(self):
  40. self.assertEqual(58, len(alphabet))
  41.  
  42. def test_encode_10002343_returns_Tgmc(self):
  43. result = encode(10002343)
  44. self.assertEqual('Tgmc', result)
  45.  
  46. def test_decode_Tgmc_returns_10002343(self):
  47. decoded = decode('Tgmc')
  48. self.assertEqual(10002343, decoded)
  49.  
  50. def test_encode_1000_returns_if(self):
  51. result = encode(1000)
  52. self.assertEqual('if', result)
  53.  
  54. def test_decode_if_returns_1000(self):
  55. decoded = decode('if')
  56. self.assertEqual(1000, decoded)
  57.  
  58. def test_encode_zero_returns_empty_string(self):
  59. self.assertEqual('', encode(0))
  60.  
  61. def test_encode_negative_number_returns_empty_string(self):
  62. self.assertEqual('', encode(-100))
  63.  
  64. if __name__ == '__main__':
  65. #print encode(int("00B94BA6C51B3D8372D82FDE5DC78773D960B5A82FCDAC8181",16))
  66. print hex(decode("Wh4bh"))
Success #stdin #stdout 0.02s 7900KB
stdin
Debian GNU/Linux system copyright.
API ID: fd5b92cbb6b0596ab3cc6b8ce5a94668
Verification Code = [ ******************** ]
Download the server ... [################################## ] 100.0% $ Connection..host..http://+ instagram +/api/%$intec/success..
$ Account:http://instagram/+ Call_me_as_sagu +/a-%/php..
$ Applying md5()_Algoritm..|
$ buffroverflow.c --system--nodir|
SEDr_hash] !== $_COOa-%/ =hacked.py � bash � 80x10
$ Applying RSA()_Algoritm... f|
- $ Applying map_reduce()... SUCCESS!
$ tar -zcvf password.zip *.password = *******|
$ Success! Username is: + Call_me_as_sagu +/encryption/4055001556657&
$_GET_password from the link below|
_Successfully accessed. to <& date $ buffroverflow.c --system--nodir||
stdout
0x1406e058