|
|
@@ -1,8 +1,8 @@
|
|
|
#!/usr/bin/env python3
|
|
|
|
|
|
# Configuration!
|
|
|
-spacebar = "36a5my"
|
|
|
-keys = "i08rljtyhp2bkexoaf3w7946ncugd51qszmv"
|
|
|
+spacebar = "1rzys0"
|
|
|
+keys = "4bald5hozx8f6veqrp0mw13s9njktyug7ci2"
|
|
|
|
|
|
# The code
|
|
|
# Do not edit below, change at your own peril
|
|
|
@@ -40,23 +40,23 @@ def modify_self(what: str, data: str):
|
|
|
with open("card.py", "r") as f:
|
|
|
for line in f:
|
|
|
if line.startswith(what):
|
|
|
- old.append(f"{what} = \"{data}\"\n")
|
|
|
+ old.append(f"{what} = \"{data.strip()}\"\n")
|
|
|
else:
|
|
|
old.append(line)
|
|
|
with open("card.py", "w") as f:
|
|
|
for line in old:
|
|
|
f.write(line)
|
|
|
|
|
|
-def modify_skript(spacebar, card):
|
|
|
+def modify_skript(spacebar: str, card: str):
|
|
|
old = []
|
|
|
if not exists("skript.js"):
|
|
|
return False
|
|
|
with open("skript.js", "r") as f:
|
|
|
for line in f:
|
|
|
if line.startswith("let spacebar"):
|
|
|
- old.append(f"let spacebar = \"{spacebar}\";\n")
|
|
|
+ old.append(f"let spacebar = \"{spacebar.strip()}\";\n")
|
|
|
elif line.startswith("let keys"):
|
|
|
- old.append(f"let keys = \"{card}\".split(\"\");\n")
|
|
|
+ old.append(f"let keys = \"{card.strip()}\".split(\"\");\n")
|
|
|
else:
|
|
|
old.append(line)
|
|
|
with open(".user.js", "w") as f:
|
|
|
@@ -142,6 +142,6 @@ card = gen_card()
|
|
|
domain = "".join(argv[1:]).lower()
|
|
|
_passwd = "" + spacebar
|
|
|
for i in domain:
|
|
|
- _passwd += card[i] or "?"
|
|
|
+ _passwd += card[i] or ""
|
|
|
set_clipboard(_passwd)
|
|
|
print(f"Generated password for '{domain}'")
|