Skip to content

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.

Create testing_http_server.py

Abdul Wahab Junaidbb9e2772d182
diff --git a/Python Tools/HTTP_Server/testing_http_server.py b/Python Tools/HTTP_Server/testing_http_server.py
new file mode 100644
index 0000000..559d014
--- /dev/null
+++ b/Python Tools/HTTP_Server/testing_http_server.py
@@ -0,0 +1,11 @@
+#!/usr/bin/python
+import socket
+webhost = 'localhost'
+webport = 8080
+print("Contacting %s on port %d ..." % (webhost, webport))
+webclient = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+webclient.connect((webhost, webport))
+webclient.send(bytes("GET / HTTP/1.1\r\nHost: localhost\r\n\r\n".encode('utf-8')))
+reply = webclient.recv(4096)
+print("Response from %s:" % webhost)
+print(reply.decode())