forked from chaos-seeker/python-software-lock
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproject.py
More file actions
50 lines (45 loc) · 1.11 KB
/
project.py
File metadata and controls
50 lines (45 loc) · 1.11 KB
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
from uuid import getnode
from pathlib import Path
from getpass import getuser
from os import name , system
from requests import get , ConnectionError
from hashlib import md5
def clear_screen():
if name == 'nt':
system('cls')
else:
system('clear')
if name == 'nt':
home = (str(Path.home()))
else:
home = (str(Path.home()))+'/'
text = 'SYS113'
open(home + 'license', 'a').close()
code = md5((hex(getnode()) + text).encode('utf-8')).hexdigest()
license = md5(code.encode('utf-8')).hexdigest()
# PROJECT SOURCE CODE ...
def main():
print('Hello World! \n')
input('')
try:
get('https://www.google.com/')
if open(home + 'license','r').read() == license:
main()
else:
print('\n\t\t' + ' --- CODED BY SYS113 --- ' + '\n')
print("\t" + "Code : %s"%code)
print("\n\t\tuser : "+getuser())
password = input("\n\t\tpass : ")
if password == license:
file = open(home + 'license','w')
file.write(password)
file.close()
clear_screen()
main()
else:
clear_screen()
print('error, \nWrong password ...')
input('')
except ConnectionError:
print('error, \nConnect to network ...')
input('')