search for: a2b_base64

Displaying 2 results from an estimated 2 matches for "a2b_base64".

2015 Jun 30
2
how is the sha fingerprint generated?
You really don't need openssl for that. And the fingerprints are simple. Here is a python script that do the same as ssh-keygen -fl /path/to/key : #!/usr/bin/env python3 import binascii import hashlib import sys if __name__ == "__main__": key = binascii.a2b_base64(sys.argv[1]) if sys.argv[2] == "md5": m = hashlib.new("md5") m.update(key) print(m.hexdigest()) elif sys.argv[2] == "sha256": m = hashlib.new("sha256") m.update(key) print(binascii.b2a_base64(m.digest())...
2017 Oct 26
2
syncpassword and (strange) base64...
...code in run_globals File "/usr/lib/python2.7/base64.py", line 360, in <module> test() File "/usr/lib/python2.7/base64.py", line 349, in test func(sys.stdin, sys.stdout) File "/usr/lib/python2.7/base64.py", line 306, in decode s = binascii.a2b_base64(line) binascii.Error: Incorrect padding root at vdcsv1:~# echo "flhibllHV2tPVFMyIXIjcGpnWUE/cmV1Q3hjLm5BQUQycX5EdyR1NGh" | LANG=C perl -MMIME::Base64 -ne 'printf "%s\n",decode_base64($_)' ~XbnYGWkOTS2!r#pjgYA?reuCxc.nAAD2q~Dw$u4h so: a) 'base64' decode it, b...