Skip to content

Commit 781297d

Browse files
author
6nz
authored
Improvements + important fix
1 parent 62b93b9 commit 781297d

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

keyauth.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,26 @@
1-
import win32security # get sid
1+
import os
22
import json as jsond # json
3-
43
import time # sleep before exit
5-
64
import binascii # hex encoding
7-
85
from uuid import uuid4 # gen random guid
96
import platform
10-
import os
11-
import requests # https requests
127

138
try:
9+
if os.name == 'nt':
10+
import win32security # get sid (WIN only)
11+
import requests # https requests
1412
from Crypto.Cipher import AES
1513
from Crypto.Hash import SHA256
1614
from Crypto.Util.Padding import pad, unpad
1715
except ModuleNotFoundError:
1816
print("Exception when importing modules")
19-
print("installing necessary modules....")
20-
os.system("pip install pycryptodome")
17+
print("Installing necessary modules....")
18+
if os.path.isfile("requirements.txt"):
19+
os.system("pip install -r requirements.txt")
20+
else:
21+
os.system("pip install pywin32")
22+
os.system("pip install pycryptodome")
23+
os.system("pip install requests")
2124
print("Modules installed!")
2225
time.sleep(1.5)
2326
os._exit(1)

0 commit comments

Comments
 (0)