This Repository is a collection of different ethical hacking tools and malware's for penetration testing and research purpose written in python, ruby, rust, c++, go and c.
JavaScript algorithmsartificial-intelligencebugbountycryptographycyber-threat-intelligencecybersecurity-projectsethical-hackinghacking-toolsmalwarenessusnetwork-monitoringnetwork-securitynmapportscannerpythonpythonprojectsthreat-intelligencevirus-scanning
Create tcp_client.py
Abdul Wahab Junaid9cd289e44790
diff --git a/Python Tools/TCP_Client_Server.py/tcp_client.py b/Python Tools/TCP_Client_Server.py/tcp_client.pynew file mode 100644index 0000000..baaa9c9--- /dev/null+++ b/Python Tools/TCP_Client_Server.py/tcp_client.py@@ -0,0 +1,22 @@+#!/usr/bin/python++import socket++host="127.0.0.1"+port = 9998++try:+ mysocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)+ mysocket.connect((host, port))+ print('Connected to host '+str(host)+' in port: '+str(port))+ message = mysocket.recv(1024)+ print("Message received from the server", message)+ while True:+ message = input("Enter your message > ")+ mysocket.send(bytes(message.encode('utf-8')))+ if message== "quit":+ break+except socket.errno as error:+ print("Socket error ", error)+finally:+ mysocket.close()