Skip to content

Instantly share code, notes, and snippets.

@levwu
Created June 12, 2021 09:55
Show Gist options
  • Save levwu/268a2c6a1f71d033d076d5a71a8e736e to your computer and use it in GitHub Desktop.
Save levwu/268a2c6a1f71d033d076d5a71a8e736e to your computer and use it in GitHub Desktop.
with open('keys', 'rb') as f:
for line in f.readlines():
data = base64.b64decode(line.strip())
rsa = RSAPrivKeyBlob()
rsa.parse(data)
if rsa in keys:
print('Found same RSA Key!!!')
print('First Key=>\n{}\n'.format(rsa))
for k in keys:
if rsa == k:
print('Second Key=>\n{}\n'.format(k))
break
keys.add(rsa)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment