initial import
This commit is contained in:
20
generate-psk.py
Executable file
20
generate-psk.py
Executable file
@ -0,0 +1,20 @@
|
||||
#!/usr/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Required parameters:
|
||||
# @raycast.schemaVersion 1
|
||||
# @raycast.title Generate wireless PSK
|
||||
# @raycast.mode silent
|
||||
# @raycast.packageName Developer Utilities
|
||||
|
||||
# Optional parameters:
|
||||
# @raycast.icon 💻
|
||||
|
||||
import subprocess
|
||||
from xkcdpass import xkcd_password as xp
|
||||
wordfile = xp.locate_wordfile()
|
||||
|
||||
wordlist4 = xp.generate_wordlist( wordfile = wordfile, min_length = 4, max_length = 4 )
|
||||
psk = xp.generate_xkcdpassword( wordlist4, numwords = 3, delimiter = '-', case = 'lower' )
|
||||
subprocess.run( [ "/usr/bin/pbcopy" ], input = psk.encode( "utf-8" ) )
|
||||
print( psk )
|
Reference in New Issue
Block a user