Skip to content

Commit e3c3d3f

Browse files
added hash tool and updated client
1 parent 2c3a3bf commit e3c3d3f

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import socket
22
import hashlib
3+
from getpass import getpass
34

45
connip = "192.168.0.101"
56
connport = 4000
@@ -15,7 +16,7 @@
1516

1617
if(isauth == "auth is active"):
1718
print(isauth)
18-
sendpass = input("Enter password: ")
19+
sendpass = getpass("Enter password (will not be echoed): ")
1920
passcheck = hashlib.md5(sendpass.encode("utf-8")).hexdigest()
2021
c.send(passcheck.encode())
2122
check = c.recv(1024).decode()

passgen.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import hashlib
2+
from getpass import getpass
3+
4+
passw = getpass("Enter new password (will not be echoed): ")
5+
passwc = getpass("Confirm new password: ")
6+
7+
if(passw == passwc):
8+
pass
9+
else:
10+
print("passwords do not match")
11+
quit()
12+
13+
key = hashlib.md5(passw.encode("utf-8"))
14+
15+
print(" ")
16+
print(key.hexdigest())
17+

0 commit comments

Comments
 (0)