Commits

Joshua Bonsink  committed 8e4995c

Added more options for the ddos ping flooding attack

  • Participants
  • Parent commits 67ebab7

Comments (0)

Files changed (2)

File scenario/ddos_flooding/client_cmd.py

 from scenario.ddos_flooding.config import ClientDescription
 from scenario.ddos_flooding.attacks.http_get_flood import start_http_get_flood
 from scenario.ddos_flooding.attacks.tcp_syn_flood import start_syn_flood
+from scenario.ddos_flooding.attacks.ping_flood import start_ping_flood
            
 class ClientCMD(CCMD):
     
 
     def ping_flood(self, sock, data):
         """Start ping flood."""        
-        self.node.ping(sock, data, threaded=True)
+        start_ping_flood(self.node, sock, data)
 
     def get_request_flood(self, sock, data):
         """Start http get request flood."""

File scenario/ddos_flooding/config.py

         """Specify the settings here."""
         self.event = 'forward_to_bots'
         self.bot_event = 'ping_flood'
-        self.hostname = 'google.com'
+        self.hostname = '192.168.1.1'       
+        
+        self.packet_size = 56  
+        self.interval = 0.0001
+        self.verbose = True
+        
+        #Used in netns and emulation mode
+        self.num_packets = 100000 
+        
+        #Only used in emulation mode
         self.timeout = 1000
-        self.num_pings = 10
-        self.packet_size = 55    
+        
+        #Only used in netns mode
+        self.preload = 10       
         
 class HttpGetFloodCmd(object):
     """
         """Specify the settings here."""
         self.event = 'forward_to_bots'
         self.bot_event = 'syn_flood'
-        self.hostname = 'google.com'        
+        self.hostname = '192.168.1.1'        
         self.port = 80
         self.num_packets = 1000000
         self.num_threads = 100