|
13 | 13 | import random
|
14 | 14 | import time
|
15 | 15 | import re
|
| 16 | +import requests |
16 | 17 | from termcolor import colored
|
17 | 18 | from halo import Halo
|
18 |
| -from termcolor import colored |
19 | 19 |
|
20 |
| -def start_attack(ip, protocol): |
21 |
| - print() |
22 |
| - print(colored("Target set to " + ip + " using " + protocol + ".", "magenta",)) |
23 |
| - print(colored("Starting attack with 16 threads, use CTRL+C to stop at any time", "magenta",)) |
24 |
| - print() |
25 |
| - while True: |
26 |
| - mbSec = round(random.uniform(10, 40), 1) |
27 |
| - hitRate = round(random.uniform(95, 100), 2) |
28 |
| - curThread = random.randint(1, 16) |
29 |
| - if random.randint(1, 1000) < 10: |
30 |
| - print(colored("Thread {}: Thread underpreforming or not responding, restarting...".format(curThread),"red",)) |
31 |
| - print(colored("Thread {}: Thread successfully restarted. Attacking target...".format(curThread),"green",)) |
| 20 | +def get_location(ip): |
| 21 | + response = requests.get(f"https://ipinfo.io/{ip}/json") |
| 22 | + if response.status_code == 200: |
| 23 | + data = response.json() |
| 24 | + city = data.get('city') |
| 25 | + country = data.get('country') |
| 26 | + region = data.get('region') |
| 27 | + timezone = data.get('timezone') |
| 28 | + return city, country, region, timezone |
| 29 | + else: |
| 30 | + print("Failed to fetch location data.") |
| 31 | + return None, None, None, None |
| 32 | + |
| 33 | +def start_attack(ip, protocol, city, country, region, timezone): |
| 34 | + if city: |
| 35 | + print(colored(f"IP: {ip}", "magenta")) |
| 36 | + print(colored(f"Location: {city}", "magenta")) |
| 37 | + print(colored(f"Region: {region}", "magenta")) |
| 38 | + print(colored(f"Country: {country}", "magenta")) |
| 39 | + print(colored(f"Timezone: {timezone}", "magenta")) |
| 40 | + print() |
| 41 | + print(colored("Target set to " + ip + " using " + protocol + ".", "magenta",)) |
| 42 | + print(colored("Starting attack with 16 threads, use CTRL+C to stop at any time", "magenta",)) |
| 43 | + print() |
| 44 | + while True: |
| 45 | + mbSec = round(random.uniform(10, 40), 1) |
| 46 | + hitRate = round(random.uniform(95, 100), 2) |
| 47 | + curThread = random.randint(1, 16) |
| 48 | + if random.randint(1, 1000) < 10: |
| 49 | + print(colored("Thread {}: Thread underperforming or not responding, restarting...".format(curThread),"red",)) |
| 50 | + print(colored("Thread {}: Thread successfully restarted. Attacking target...".format(curThread),"green",)) |
| 51 | + else: |
| 52 | + print(colored("Thread {}: {}MB sent in the last second to target with a {}% Hitrate on requests.".format(curThread, mbSec, hitRate),"green",)) |
| 53 | + time.sleep(0.1) |
32 | 54 | else:
|
33 |
| - print(colored("Thread {}: {}MB sent in the last second to target with a {}% Hitrate on requests.".format(curThread, mbSec, hitRate),"green",)) |
34 |
| - time.sleep(0.1) |
| 55 | + print("Failed to fetch location data. Unable to proceed with the attack.") |
35 | 56 |
|
36 | 57 | def main():
|
37 |
| - print() |
38 |
| - print(colored("Starting Echo Down!", "red")) |
39 |
| - print(colored("I am sure you are using this for legal purposes - Echo", "red")) |
40 |
| - print() |
| 58 | + print() |
| 59 | + print(colored("Starting Echo Down!", "red")) |
| 60 | + print(colored("I am sure you are using this for legal purposes - Echo", "red")) |
| 61 | + print() |
41 | 62 |
|
42 |
| - with Halo(text=colored("Updating", "yellow"), spinner="dots") as h1: |
43 |
| - time.sleep(0.5) |
44 |
| - h1.succeed(colored(" Up to date", "green")) |
| 63 | + with Halo(text=colored("Updating", "yellow"), spinner="dots") as h1: |
| 64 | + time.sleep(0.5) |
| 65 | + h1.succeed(colored(" Up to date", "green")) |
45 | 66 |
|
46 |
| - with Halo(text=colored("Starting Proxy", "yellow"), spinner="dots") as h7: |
47 |
| - time.sleep(0.5) |
48 |
| - h7.succeed(colored(" Proxy online", "green")) |
| 67 | + with Halo(text=colored("Starting Proxy", "yellow"), spinner="dots") as h7: |
| 68 | + time.sleep(0.5) |
| 69 | + h7.succeed(colored(" Proxy online", "green")) |
49 | 70 |
|
50 |
| - with Halo(text=colored("Starting!", "yellow"), spinner="dots") as h10: |
51 |
| - time.sleep(0.5) |
52 |
| - h10.succeed(colored(" Start", "green")) |
| 71 | + with Halo(text=colored("Starting!", "yellow"), spinner="dots") as h10: |
| 72 | + time.sleep(0.5) |
| 73 | + h10.succeed(colored(" Start", "green")) |
53 | 74 |
|
54 |
| - print(colored(''' |
55 |
| - |
56 |
| - ███████╗░█████╗░██╗░░██╗░█████╗░ ██████╗░░█████╗░░██╗░░░░░░░██╗███╗░░██╗ |
57 |
| - ██╔════╝██╔══██╗██║░░██║██╔══██╗ ██╔══██╗██╔══██╗░██║░░██╗░░██║████╗░██║ |
58 |
| - █████╗░░██║░░╚═╝███████║██║░░██║ ██║░░██║██║░░██║░╚██╗████╗██╔╝██╔██╗██║ |
59 |
| - ██╔══╝░░██║░░██╗██╔══██║██║░░██║ ██║░░██║██║░░██║░░████╔═████║░██║╚████║ |
60 |
| - ███████╗╚█████╔╝██║░░██║╚█████╔╝ ██████╔╝╚█████╔╝░░╚██╔╝░╚██╔╝░██║░╚███║ |
61 |
| - ╚══════╝░╚════╝░╚═╝░░╚═╝░╚════╝░ ╚═════╝░░╚════╝░░░░╚═╝░░░╚═╝░░╚═╝░░╚══╝ |
| 75 | + print(colored(''' |
| 76 | + |
| 77 | + ███████╗░█████╗░██╗░░██╗░█████╗░ ██████╗░░█████╗░░██╗░░░░░░░██╗███╗░░██╗ |
| 78 | + ██╔════╝██╔══██╗██║░░██║██╔══██╗ ██╔══██╗██╔══██╗░██║░░██╗░░██║████╗░██║ |
| 79 | + █████╗░░██║░░╚═╝███████║██║░░██║ ██║░░██║██║░░██║░╚██╗████╗██╔╝██╔██╗██║ |
| 80 | + ██╔══╝░░██║░░██╗██╔══██║██║░░██║ ██║░░██║██║░░██║░░████╔═████║░██║╚████║ |
| 81 | + ███████╗╚█████╔╝██║░░██║╚█████╔╝ ██████╔╝╚█████╔╝░░╚██╔╝░╚██╔╝░██║░╚███║ |
| 82 | + ╚══════╝░╚════╝░╚═╝░░╚═╝░╚════╝░ ╚═════╝░░╚════╝░░░░╚═╝░░░╚═╝░░╚═╝░░╚══╝ |
62 | 83 |
|
63 | 84 | ''', 'red'))
|
64 |
| - print(colored(" The most powerful DDoS tool out there","red",attrs=["bold"],)) |
65 |
| - print() |
66 |
| - menu_selections = [ |
67 |
| - 'Start', |
68 |
| - 'Credits', |
69 |
| - 'Exit' |
70 |
| - ] |
71 |
| - print('Pick an option...') |
72 |
| - for i, option in enumerate(menu_selections, start=1): |
73 |
| - print(f'{i}. {option}') |
74 |
| - menu_selection = input('> ') |
75 |
| - if menu_selection == '1': |
76 |
| - menu_selection = 'Start' |
77 |
| - elif menu_selection == '2': |
78 |
| - menu_selection = 'Credits' |
79 |
| - elif menu_selection == '3': |
80 |
| - menu_selection = 'Exit' |
81 |
| - else: |
82 |
| - print(colored("Error: Unknown response at python userInput, promise rejected", "red")) |
83 |
| - exit("userInput void") |
84 |
| - |
85 |
| - match menu_selection: |
86 |
| - case 'Start': |
87 |
| - print("Enter IP address:") |
88 |
| - ip = input(colored("> ", "yellow")) |
89 |
| - if not re.match(r"^(\d{1,3}\.){3}\d{1,3}$", ip): |
90 |
| - print(colored("Error: Invalid IP address format at python userInput, promise rejected", "red")) |
| 85 | + print(colored(" The most powerful DDoS tool out there","red",attrs=["bold"],)) |
| 86 | + print() |
| 87 | + menu_selections = [ |
| 88 | + 'Start', |
| 89 | + 'Credits', |
| 90 | + 'Exit' |
| 91 | + ] |
| 92 | + print('Pick an option...') |
| 93 | + for i, option in enumerate(menu_selections, start=1): |
| 94 | + print(f'{i}. {option}') |
| 95 | + menu_selection = input('> ') |
| 96 | + if menu_selection == '1': |
| 97 | + menu_selection = 'Start' |
| 98 | + elif menu_selection == '2': |
| 99 | + menu_selection = 'Credits' |
| 100 | + elif menu_selection == '3': |
| 101 | + menu_selection = 'Exit' |
| 102 | + else: |
| 103 | + print(colored("Error: Unknown response at python userInput, promise rejected", "red")) |
91 | 104 | exit("userInput void")
|
92 | 105 |
|
93 |
| - print("Select a protocol (TCP, UDP, or HTTP):") |
94 |
| - protocol = input(colored("> ", "yellow")) |
95 |
| - if protocol not in ['TCP', 'UDP','HTTP']: |
96 |
| - print(colored("Error: Invalid protocol at python userInput, promise rejected", "red")) |
97 |
| - exit("userInput void") |
| 106 | + match menu_selection: |
| 107 | + case 'Start': |
| 108 | + print("Enter IP address:") |
| 109 | + ip = input(colored("> ", "yellow")) |
| 110 | + if not re.match(r"^(\d{1,3}\.){3}\d{1,3}$", ip): |
| 111 | + print(colored("Error: Invalid IP address format at python userInput, promise rejected", "red")) |
| 112 | + exit("userInput void") |
| 113 | + |
| 114 | + print("Select a protocol (TCP, UDP, or HTTP):") |
| 115 | + protocol = input(colored("> ", "yellow")) |
| 116 | + if protocol not in ['TCP', 'UDP','HTTP']: |
| 117 | + print(colored("Error: Invalid protocol at python userInput, promise rejected", "red")) |
| 118 | + exit("userInput void") |
98 | 119 |
|
99 |
| - print(colored("Launching with 16 threads.", "cyan")) |
100 |
| - print() |
101 |
| - start_attack(ip, protocol) |
102 |
| - case 'Credits': |
103 |
| - print(colored(' ECHODOWN', 'red', attrs=['bold'])) |
104 |
| - print(colored(''' |
| 120 | + city, country, region, timezone = get_location(ip) |
| 121 | + print(colored("Launching with 16 threads.", "cyan")) |
| 122 | + print() |
| 123 | + start_attack(ip, protocol, city, country, region, timezone) |
| 124 | + case 'Credits': |
| 125 | + print(colored(' ECHODOWN', 'red', attrs=['bold'])) |
| 126 | + print(colored(''' |
105 | 127 | Star us on github!
|
106 | 128 | https://github.com/3kh0/echodown
|
107 | 129 |
|
108 | 130 | Developers
|
109 | 131 | @3kh0
|
110 | 132 | @aeiea
|
111 | 133 | @RuralAnemone
|
| 134 | + @hackinghacker1 |
112 | 135 | ''', 'green'))
|
113 |
| - exit(0) |
114 |
| - case 'Exit': |
115 |
| - exit(0) |
| 136 | + exit(0) |
| 137 | + case 'Exit': |
| 138 | + exit(0) |
116 | 139 |
|
117 | 140 |
|
118 | 141 | if __name__ == "__main__":
|
119 |
| - main() |
| 142 | + main() |
0 commit comments