-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL
114 lines (83 loc) · 3.36 KB
/
INSTALL
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
#!/usr/bin/env python
# -*- coding: iso-8859-15 -*-
#github: https://github.com/ZKAW/VerifyMail
import time
import os
import pip
from os import system
from os import path
import shutil
from sys import stdout, exit
DEFAULT, BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, LIGHTGRAY, DARKGRAY, LIGHTRED, LIGHTGREEN, LIGHTYELLOW, LIGHTBLUE, LIGHTMAGENTA, LIGHTCYAN, WHITE, GRAY = '\33[39m', '\33[30m', '\33[31m', '\33[32m', '\33[33m', '\33[34m', '\33[35m', '\33[36m', '\33[37m', '\33[90m', '\33[91m', '\33[92m', '\33[93m', '\33[94m', '\33[95m', '\33[96m', '\33[97m', '\33[30m'
system('clear')
pyth2path = '/usr/bin/python2.7'
pip2path = '/usr/bin/pip2'
conffldr = "/root/.verifymail"
listfldr = "/root/.verifymail/lists"
verifiedfldr = "/root/.verifymail/verified"
domainsfldr = "/root/.verifymail/domainslists"
domainsfile = "/root/.verifymail/domainslists/default.txt"
print(RED + "\n[!] " + LIGHTRED + "REMINDER: THE SCRIPT IS ONLY WORKING WITH" + RED + " Python 2.7 " + LIGHTRED + "!\n")
time.sleep(1.5)
print(BLUE + " Checking if Python 2.7 is installed...")
time.sleep(0.5)
if os.path.exists(pyth2path):
print(BLUE + ' Python 2.7 is ready to use !')
else:
print(LIGHTRED + '\n[!] ' + BLUE + 'Python 2.7 is not installed, installing it for you.\n' + LIGHTBLUE)
time.sleep(1.5)
system('apt-get install python2.7')
time.sleep(0.5)
print(BLUE + "\n Checking if pip2 is installed...")
time.sleep(0.5)
if os.path.exists(pyth2path):
print(BLUE + ' pip2 is ready to use !')
else:
print(LIGHTRED + '\n[!] ' + BLUE + 'pip2 is not installed, installing it for you.\n' + LIGHTBLUE)
time.sleep(1.5)
system('apt-get install python-pip')
time.sleep(0.5)
print(BLUE + "\n Fixing permissions...")
system('chmod +x verifymail')
system('chmod +x INSTALL')
system('chmod +x UNINSTALL')
system('chmod +x UPDATE')
time.sleep(0.5)
if not os.path.exists(conffldr):
print(BLUE + "\n Creating .verifymail config files in " + conffldr + LIGHTBLUE)
time.sleep(0.5)
print(BLUE + "\n Creating " + conffldr + LIGHTBLUE)
os.makedirs(conffldr)
time.sleep(0.5)
if not os.path.exists(listfldr):
print(BLUE + "\n Creating " + listfldr + LIGHTBLUE)
os.makedirs(listfldr)
time.sleep(0.5)
if not os.path.exists(verifiedfldr):
print(BLUE + "\n Creating " + verifiedfldr + LIGHTBLUE)
os.makedirs(verifiedfldr)
time.sleep(0.5)
if not os.path.exists(domainsfldr):
print(BLUE + "\n Creating " + domainsfldr + LIGHTBLUE)
os.makedirs(domainsfldr)
time.sleep(0.5)
if not os.path.exists(domainsfile):
print(BLUE + "\n Writing basic domains list in " + domainsfile + LIGHTBLUE)
time.sleep(0.5)
with open(domainsfile, 'a') as domains:
domains.write('gmail.com\n')
domains.write('hotmail.com\n')
domains.write('hotmail.fr\n')
domains.write('outlook.com\n')
domains.write('orange.fr\n')
domains.write('wanadoo.fr\n')
domains.write('laposte.net\n')
print(BLUE + '\n Installing requirements from "requirements.txt" file\n' + LIGHTBLUE)
time.sleep(0.5)
system('pip2 install -r requirements.txt')
time.sleep(0.5)
print(BLUE + '\n Copying the script in /usr/bin for executing it by typing ' + LIGHTBLUE + '"verifymail"')
shutil.copy2('verifymail', '/usr/bin/')
time.sleep(0.5)
print(BLUE + '\n The script is now installed, restart your terminal and type ' + LIGHTBLUE + '"verifymail"' + BLUE + '\n to launch it !\n')
quit()