Saataa andagii !

This commit is contained in:
Lukian 2024-12-02 11:37:48 +01:00
parent babfe360b6
commit 77339d0c7c
5 changed files with 8 additions and 11 deletions

View file

@ -0,0 +1,21 @@
from scapy.layers.http import *
from scapy.layers.ntlm import *
class Custom_HTTP_Server(HTTP_Server):
def answer(self, pkt):
if pkt.Path == b"/":
return HTTPResponse() / (
"<!doctype html><html><body><h1>OK</h1></body></html>"
)
else:
return HTTPResponse(
Status_Code=b"404",
Reason_Phrase=b"Not Found",
) / (
"<!doctype html><html><body><h1>404 - Not Found</h1></body></html>"
)
server = HTTP_Server.spawn(
port=80,
iface="eth0",
)