forked from KeyAuth/KeyAuth-Python-Example
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path__init__.py
More file actions
28 lines (26 loc) · 805 Bytes
/
Copy path__init__.py
File metadata and controls
28 lines (26 loc) · 805 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
from .api import mainapi
from .hwid import WINDOWS_HWID
from os import _exit, system
from json import loads
def sys_hwid() -> str:
'''
this def will return a hardware id,
hardware id is a unique key use for key auth
this will return a unique hwid key depend on os
supported os -> window, darwin, linux
'''
return WINDOWS_HWID().main()
def api(name=None, ownerid=None, version=None, hash_to_check=None):
'''
:param name: Name of the app.
:param ownerid: Account ID.
:param version: Application version.
:param hash_to_check: value of MD5 checksum (hash) of a file.
'''
instance = mainapi(
name=name,
ownerid=ownerid,
version=version,
hash_to_check=hash_to_check
)
return instance