Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions keyauth.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import win32security #get sid
import json as jsond # json

import time # sleep before exit
Expand Down Expand Up @@ -456,19 +457,16 @@ def __load_user_data(self, data):
class others:
@staticmethod
def get_hwid():
winuser = os.getlogin()
if platform.system() != "Windows":
with open("/etc/machine-id") as f:
hwid = f.read()
return hwid

cmd = subprocess.Popen(
"wmic useraccount where name='%username%' get sid", stdout=subprocess.PIPE, shell=True)
sid = win32security.LookupAccountName(None, winuser)[0]
sidstr = win32security.ConvertSidToStringSid(sid)

(suppost_sid, error) = cmd.communicate()

suppost_sid = suppost_sid.split(b'\n')[1].strip()

return suppost_sid.decode()
return sidstr


class encryption:
Expand Down Expand Up @@ -514,4 +512,4 @@ def decrypt(message, enc_key, iv):
return encryption.decrypt_string(message.encode(), _key.encode(), _iv.encode()).decode()
except:
print("Invalid Application Information. Long text is secret short text is ownerid. Name is supposed to be app name not username")
sys.exit()
sys.exit()
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
requests
requests_toolbelt
pycryptodome
pywin32