Add raw key generation and rework help display
This commit is contained in:
parent
05fbe26959
commit
cfb2da563e
3 changed files with 50 additions and 7 deletions
14
rawkey-generator.py
Normal file
14
rawkey-generator.py
Normal 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"))
|
||||
Loading…
Add table
Add a link
Reference in a new issue