Add raw key generation and rework help display

This commit is contained in:
David Houdek 2023-10-10 15:54:20 +02:00
parent 05fbe26959
commit cfb2da563e
3 changed files with 50 additions and 7 deletions

14
rawkey-generator.py Normal file
View file

@ -0,0 +1,14 @@
from passlib.utils import pbkdf2
import binascii, sys
arguments_counter = len(sys.argv) - 1
if arguments_counter != 2:
raise TypeError("The function takes exactly 2 arguments (%d passed)" % arguments_counter)
password = sys.argv[1]
ssid = sys.argv[2]
var = pbkdf2.pbkdf2(str.encode(password), str.encode(ssid), 4096, 32)
print(binascii.hexlify(var).decode("utf-8"))