Optional password function added

This commit is contained in:
Bandie Canis committed 2018-02-01 01:36:25 +01:00
1 parent f5aa131048
commit 93a88fc322
5 files changed
+96 -26

No files matched your search

+6
View File
@@ -44,6 +44,12 @@ def send(conn, cmd):
elif(buf == b"ERR CMD_ERR"):
print("Error. Server said: The command doesn't work because the file doesn't exist on the server.")
exitcode = 2
elif(buf == b"ERR PW"):
print("Error. Password required. The password was wrong.")
exitcode = 4
elif(b"OK PW" in buf):
bufr=str(buf.decode('utf-8'))
print("Password accepted. Timeout:", bufr.replace("OK PW ",""), "seconds.")
else:
conn.sendall(b"NO.")