main.py 2.43 KB
from DoS.icmp import *
from DoS.mqtt import *
from DoS.syn import *
from DoS.udp import *
from fuzzy_attack.fuzzy_attack import *
from fuzzy_attack.mqtt_random_payload_fuzzy import *
from Spoofing.arp import *

def printDOSMenu():
    print("Choose Protocol")
    print("1. ICMP Flooding")
    print("2. SYN Flooding")
    print("3. UDP Flooding")
    print("4. MQTT Publish Flooding")
    select = input("input: ")
    if select == "1":
        TargetIP = input("Target IP: ")
        TargetPort = int(input("Target Port: "))
        while True:
            icmp_flood(TargetIP, TargetPort)
    elif select == "2":
        TargetIP = input("Target IP: ")
        TargetPort = int(input("Target Port: "))
        while True:
            syn_flood(TargetIP, TargetPort)
    elif select == "3":
        TargetIP = input("Target IP: ")
        TargetPort = int(input("Target Port: "))
        while True:
            udp_flood(TargetIP, TargetPort)
    elif select == "4":
        Target_Mqtt_IP = input("Target MQTT Server IP: ")
        Target_Mqtt_Port = int(input ("Target MQTT Server Port: "))
        Target_Topic = input("Target Topic: ")
        while True:
            mqtt_publish_flood(Target_Mqtt_IP, Target_Mqtt_Port, Target_Topic)

def printSpoofingMenu():
    print("Choose Method")
    print("1. ARP Spoofing")
    select = input("input:")
    if select == "1":
        routerIP = input("Router IP : ")
        targetIP = input("Target IP : ")
        arp_spoofing(routerIP, targetIP)

def printFuzzyAttackMenu():
    print("Choose Method")
    print("1. TCP/UDP Fuzzy Attack")
    print("2. MQTT Random Payload Fuzzy Attack")
    select = input("input: ")
    if select == "1":
        method = input("input Protocol (udp/tcp) : ")
        TargetIP = input("Target IP: ")
        TargetPort = int(input("Target Port: "))
        fuzzy_attack(method, TargetIP, TargetPort)
    elif select == "2":
        Target_Mqtt_IP = input("Target MQTT Server IP: ")
        Target_Mqtt_Port = int(input ("Target MQTT Server Port: "))
        Target_Topic = input("Target Topic: ")
        mqtt_ramdom_payload_fuzzy(Target_Mqtt_IP, Target_Mqtt_Port, Target_Topic)


def printMainMenu():
    print("Choose Method:")
    print("1. DOS")
    print("2. SPOOFING")
    print("3. FUZZY_ATTACK")

    select = input("input: ")

    if select=="1":
        printDOSMenu()
    elif select == "2":
        printSpoofingMenu()
    elif select == "3":
        printFuzzyAttackMenu()



printMainMenu()