File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change 1
1
import socket
2
2
import hashlib
3
+ from getpass import getpass
3
4
4
5
connip = "192.168.0.101"
5
6
connport = 4000
15
16
16
17
if (isauth == "auth is active" ):
17
18
print (isauth )
18
- sendpass = input ("Enter password: " )
19
+ sendpass = getpass ("Enter password (will not be echoed) : " )
19
20
passcheck = hashlib .md5 (sendpass .encode ("utf-8" )).hexdigest ()
20
21
c .send (passcheck .encode ())
21
22
check = c .recv (1024 ).decode ()
Original file line number Diff line number Diff line change
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
+
You can’t perform that action at this time.
0 commit comments