Skip to content
Permalink
Browse files
Update defender.py
  • Loading branch information
alhousen committed Apr 26, 2022
1 parent 0306312 commit 345c2ca1332322ec170eb80f43be894327434547
Showing 1 changed file with 3 additions and 2 deletions.
@@ -56,7 +56,8 @@ def check_http_post_attack(request):


if __name__ == "__main__":
ip = ni.ifaddresses('br-abfe242530cd')[ni.AF_INET][0]['addr']
network_interface = "br-abfe242530cd" # CHANGE THIS TO THE CONNECTED NETWORK INTERFACE
ip = ni.ifaddresses(network_interface)[ni.AF_INET][0]['addr']

url = "http://{0}:5000".format(ip)
HOST = "localhost"
@@ -79,7 +80,7 @@ if __name__ == "__main__":
check_availability(url)
check_http_post_attack(response)
check_pragma_attack(response)
pkts = sniff(iface="br-abfe242530cd",prn=lambda x:x.sprintf("{IP:%IP.src% -> %IP.dst%\n}{IP:%IP.ttl%\n}{Raw:%Raw.load%\n}"))
pkts = sniff(iface=network_interface,prn=lambda x:x.sprintf("{IP:%IP.src% -> %IP.dst%\n}{IP:%IP.ttl%\n}{Raw:%Raw.load%\n}"))



0 comments on commit 345c2ca

Please sign in to comment.