Saataa andagii !
This commit is contained in:
parent
babfe360b6
commit
77339d0c7c
5 changed files with 8 additions and 11 deletions
21
server/proxy-server/main.py
Normal file
21
server/proxy-server/main.py
Normal 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",
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue