-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathusr25
87 lines (71 loc) · 2.01 KB
/
usr25
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
81
82
83
84
85
86
87
#!/usr/bin/python3
#Author :: z3r0day
RED = '\033[1;31;48m'
WHITE = "\33[0m"
GREEN = '\033[1;32;48m'
#SMTP USER BRUTEFORCE
import socket
import sys
import os
import time
import signal
import time
import threading
#importing the required libraries
golo = '''
,--.
{ }
K, }
/ ~Y`
, / /
{_'-K.__/
`/-.__L._
/ ' /`\_}
/ ' /
____ / ' /
,-'~~~~ ~~/ ' /_
,' ``~~~ ',
( Y
{ I
{ - `,
| ', )
| | ,..__ __. Y
| .,_./ Y ' / ^Y J )|
\ |' / | | ||
\ L_/ . _ (_,.'(
\, , ^^""' / | )
\_ \ /,L] /
'-_~-, ` ` ./`
`'{_ )
^^\..___,.--`
'''
#conditional statement for grabing [sys] arguments for username and ip address
print(golo)
time.sleep(1)
print(f"\n [{GREEN}+{WHITE}] {RED}USR-25{WHITE} (v3.0) starting...\n")
#check for correct number of arguments
if len(sys.argv) != 3:
print(f"\n Usage: ./usr25 <{RED}target-ip{WHITE}> <{GREEN}wordlist{WHITE}> \n")
sys.exit(0)
target_ip = sys.argv[1]
user_file = sys.argv[2]
#grabbing the necessary arguments
#check if the given file exists on the system
if os.path.exists(user_file) == False:
print(f'\n[{RED}!{WHITE}]File Not Found....exiting now..\n')
sys.exit(0)
def brute(ip, word):
#socket connection
s = socket.socket()
s.connect((ip, 25))
s.recv(1024)
#here comes the command
s.send(f'VRFY {user}\r\n'.encode())
answer = s.recv(1024).decode()
if not "unknown" in answer.lower():
print(f"[{GREEN}+{WHITE}] {RED}{user}{WHITE} does exist")
s.close()
with open(user_file, 'r') as file:
for line in file.readlines():
user = line.strip()
brute(target_ip, user)