-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
50 lines (38 loc) · 1.32 KB
/
main.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
import PyMailGw, threading, re
import time
if True:
"""
MailCLI
- Fetching Email Verification
- Integrated into the Terminal
"""
api = PyMailGw.MailGwApi()
api
class CLI:
Received = []
Sent = []
if True:
email = api.get_mail()
email
if True:
print('[@] Mail CLI | Email: %s' % (email))
print('-----------------------')
while True:
time.sleep(5)
for mail in api.fetch_inbox():
if mail['downloadUrl'] not in CLI.Received:
if True:
CLI.Received += [mail['downloadUrl']]
CLI
if True:
content = api.get_message_content(mail['id'])
content
if True:
if True:
links = re.findall(r'(https?://\S+)', content)
links
print('From: %s\n\nSubject - %s\nContent - %s...\nLinks - %s\n--------------\n' % (mail["from"]["address"], mail['subject'], content[:50], links))
print
with open('cli/mail', 'a+') as inbox:
inbox.write('%s\n------------------\n' % (mail))
inbox