From 86fc6bc573392196b5b4ee5a87b81287cd72b6cf Mon Sep 17 00:00:00 2001 From: ZKAW <40537436+ZKAW@users.noreply.github.com> Date: Tue, 10 Jul 2018 02:38:17 +0200 Subject: [PATCH] Updated to v1.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The domain update is here ! (v1.2) • Add custom domains creator • Less lags • Reviewed the translation --- INSTALL | 38 +++++++--- UNINSTALL | 2 +- verifymail | 200 +++++++++++++++++++++++++++++++++++----------------- version.txt | 2 +- 4 files changed, 168 insertions(+), 74 deletions(-) diff --git a/INSTALL b/INSTALL index a7092e9..a362c59 100644 --- a/INSTALL +++ b/INSTALL @@ -23,6 +23,9 @@ 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") @@ -41,7 +44,7 @@ else: system('apt-get install python2.7') -time.sleep(1.5) +time.sleep(0.5) print(BLUE + "\n Checking if pip2 is installed...") @@ -60,22 +63,39 @@ system('chmod +x verifymail') system('chmod +x INSTALL') system('chmod +x UNINSTALL') system('chmod +x UPDATE') +time.sleep(0.5) -print(BLUE + "\n Creating .verifymail config files in /root/.verifymail" + LIGHTBLUE) -time.sleep(0.5) -print(BLUE + " Creating /root/.verifymail/" + LIGHTBLUE) -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) -print(BLUE + " Creating /root/.verifymail/lists" + LIGHTBLUE) -time.sleep(0.5) + time.sleep(0.5) if not os.path.exists(listfldr): + print(BLUE + "\n Creating " + listfldr + LIGHTBLUE) os.makedirs(listfldr) -print(BLUE + " Creating /root/.verifymail/verified" + LIGHTBLUE) -time.sleep(0.5) + 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) diff --git a/UNINSTALL b/UNINSTALL index 9451885..03fea95 100644 --- a/UNINSTALL +++ b/UNINSTALL @@ -8,7 +8,7 @@ from os import system 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' -yes = {'yes', 'y', 'YES', 'Y',} +yes = {'yes', 'y', 'YES', 'Y'} no = {'no' ,'n', 'NO', 'N', ''} choice = raw_input(LIGHTBLUE + "\n Do you really want to uninstall me ? :'( (y/n): ").lower() diff --git a/verifymail b/verifymail index d223453..1681165 100644 --- a/verifymail +++ b/verifymail @@ -14,19 +14,38 @@ import socket from os import system from sys import stdout, exit -#from validate_email import validate_email + results = [] lng = [] conffldr = "/root/.verifymail" listfldr = "/root/.verifymail/lists" verifiedfldr = "/root/.verifymail/verified" +domainsfldr = "/root/.verifymail/domainslists" +domainsfile = "/root/.verifymail/domainslists/default.txt" + +#missinglibs + if not os.path.exists(conffldr): os.makedirs(conffldr) if not os.path.exists(listfldr): os.makedirs(listfldr) if not os.path.exists(verifiedfldr): os.makedirs(verifiedfldr) +if not os.path.exists(domainsfldr): + os.makedirs(domainsfldr) +if not os.path.exists(domainsfile): + 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') + domains.close() + + os.chdir(conffldr) system('clear') @@ -35,11 +54,14 @@ DEFAULT, BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, LIGHTGRAY, DARKGRAY, LI + + + +#language + locale.setlocale(locale.LC_ALL, "") lng = locale.getlocale(locale.LC_MESSAGES)[0] -#langage - if 'fr' in lng: print("\n") print(LIGHTBLUE + "Langue" + BLUE + " française " + LIGHTBLUE + "reconnue, ajustement de la traduction...") @@ -57,6 +79,7 @@ if 'fr' in lng: {3}[{2}1{3}]{2} Effectuer une recherche pour une seule email. {3}[{2}2{3}]{2} Effectuer une recherche depuis une liste d'email. {3}[{2}3{3}]{2} Créer une liste d'email. + {3}[{2}4{3}]{2} Créer une liste de domaines. {3}[{1}0{3}]{1} Quitter. @@ -86,18 +109,27 @@ if 'fr' in lng: LastNameVar = " Nom: " - FileNameVar = " Nom du fichier: " + FileNameVar = " Nom de la liste: " AddedListVar1 = '\n\n Liste ajoutée/modifiée avec succès sous le nom "' AddedListVar2 = '" pour ' + AddedListVar3 = ' avec "' + GoodByeVar = "\n Merci d'avoir utilisé" MultiFileNameVar = " Nom du fichier de sauvegarde: " ActualPathVar = " Chemin actuel: " + DomainToUseVar = " Domaines à utiliser " + + DomainCreatorVar = ''' + {0}Écrivez le {1}domaine {0}[ex: {1}gmail.com{0}], appuyez sur {1}ENTRER{0} pour en écrire un autre. + Faites {1}CTRL + C {0}quand vous avez terminé. + '''.format(LIGHTMAGENTA, MAGENTA) + CanceledVar = ''' {0}************************************ @@ -127,6 +159,7 @@ else: {3}[{2}1{3}]{2} Suchen Sie nach einer einzelnen E-Mail. {3}[{2}2{3}]{2} Führen Sie eine Suche mit einer E-Mail-Liste durch. {3}[{2}3{3}]{2} Erstellen Sie eine E-Mail-Liste. + {3}[{2}4{3}]{2} Erstellen Sie eine Liste von Domänen {3}[{1}0{3}]{1} Verlassen. @@ -156,18 +189,27 @@ else: LastNameVar = " Name: " - FileNameVar = " Name der Datei: " + FileNameVar = " Liste name: " AddedListVar1 = '\n\n Liste hinzugefügt / geändert erfolgreich unter dem Namen "' AddedListVar2 = '" für ' + AddedListVar3 = ' mit "' + GoodByeVar = "\n Vielen Dank für die Verwendung von" MultiFileNameVar = " Name der Sicherungsdatei: " ActualPathVar = " Aktueller Pfad: " + DomainToUseVar = " Zu verwendende Domains " + + DomainCreatorVar = ''' + {0}Schreiben Sie {1}Domain {0}[ex: {1}gmail.com{0}], drücken Sie {1}ENTER {0}um eine weitere Domain zu schreiben. + Drücken Sie {1}STRG + C {0}wenn Sie fertig sind. + '''.format(LIGHTMAGENTA, MAGENTA) + CanceledVar = ''' {0}************************************ @@ -198,6 +240,7 @@ else: {3}[{2}1{3}]{2} Efectuar una búsqueda de un único correo electrónico. {3}[{2}2{3}]{2} Buscar en una lista de correo electrónico. {3}[{2}3{3}]{2} Crear una lista de correo electrónico. + {3}[{2}4{3}]{2} Crea una lista de dominios. {3}[{1}0{3}]{1} Salir. @@ -227,18 +270,27 @@ else: LastNameVar = " Apellido: " - FileNameVar = " Nombre de fichero: " + FileNameVar = " Nombre de la lista: " AddedListVar1 = '\n\n Lista añadida/modificada con éxito bajo el nombre "' AddedListVar2 = '" para ' + AddedListVar3 = ' con "' + GoodByeVar = "\n Gracias por usar" MultiFileNameVar = " Nombre del fichero de copia de seguridad: " ActualPathVar = " Camino actual: " + DomainToUseVar = " Dominios para usar " + + DomainCreatorVar = ''' + {0}Escribe el {1}dominio {0}[ex: {1}gmail.com{0}], presiona {1}ENTRAR {0}para escribir otro. + Presione {1}CTRL + C {0}cuando termine. + '''.format(LIGHTMAGENTA, MAGENTA) + CanceledVar = ''' {0}************************************ @@ -268,6 +320,7 @@ else: {3}[{2}1{3}]{2} Perform a search of a single email. {3}[{2}2{3}]{2} Perfom a search from an email list. {3}[{2}3{3}]{2} Create an email list. + {3}[{2}4{3}]{2} Create a list of domains. {3}[{1}0{3}]{1} Exit. @@ -297,18 +350,27 @@ else: LastNameVar = " Last name: " - FileNameVar = " Name of the file: " + FileNameVar = " List name: " AddedListVar1 = '\n\n List added/modified with success under the name "' AddedListVar2 = '" for ' + AddedListVar3 = ' with "' + GoodByeVar = "\n Thanks for using" MultiFileNameVar = " Name of the backup file: " ActualPathVar = " Actual path: " + DomainToUseVar = " Domains to use " + + DomainCreatorVar = ''' + {0}Write {1}domain {0}[ex: {1}gmail.com{0}], press {1}ENTER {0}to write another. + Press {1}CTRL + C {0}when finished. + '''.format(LIGHTMAGENTA, MAGENTA) + CanceledVar = ''' {0}************************************ @@ -344,7 +406,7 @@ def welcome(): {1} ╚═══╝ ╚══════╝╚═╝ ╚═╝╚═╝╚═╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚══════╝ {3}╔╗ ┬ ┬ ╔═╗╦╔═╔═╗╦ ╦ {0}─── {3}╠╩╗└┬┘ ╔═╝╠╩╗╠═╣║║║ - -> v1.1 {3}╚═╝ ┴ ╚═╝╩ ╩╩ ╩╚╩╝ + -> v1.2 {3}╚═╝ ┴ ╚═╝╩ ╩╩ ╩╚╩╝ {2}The possible is already done, {1}working on the impossible.'''.format(LIGHTGRAY, MAGENTA, LIGHTMAGENTA, LIGHTRED, RED, GRAY) @@ -511,7 +573,7 @@ def multi(): StoppedVar = InvalidPathVar print("\n" + LIGHTBLUE + ActualPathVar + BLUE + os.getcwd() + "/\n") lists = os.listdir(listfldr) - print(lists) + print(" " + str(lists)) inputfil = raw_input(LIGHTMAGENTA + MultiInputVar + LIGHTGRAY) multifilename = raw_input(LIGHTMAGENTA + MultiFileNameVar + LIGHTGRAY) system('clear') @@ -569,6 +631,8 @@ def multi(): multi() if ask.upper() == "3": creator() + if ask.upper() == "4": + domaincreator() if ask.upper() == "0": exit(0) except: @@ -585,11 +649,13 @@ def multi(): try: ask = raw_input(LIGHTMAGENTA + " VerifyMail > " + LIGHTGRAY) if ask.upper() == "1": - single() + single() if ask.upper() == "2": multi() if ask.upper() == "3": creator() + if ask.upper() == "4": + domaincreator() if ask.upper() == "0": exit(0) @@ -620,6 +686,8 @@ def creator(): try: + os.chdir(listfldr) + prenom = raw_input (LIGHTMAGENTA + FirstNameVar + LIGHTGRAY) @@ -631,74 +699,79 @@ def creator(): - outF = open("/root/.verifymail/lists/" + filename + ".txt", "a") - - - - -#prenom.nom - outF.write(prenom+"."+nom+"@gmail.com\n") - outF.write(prenom+"."+nom+"@hotmail.com\n") - outF.write(prenom+"."+nom+"@hotmail.fr\n") - outF.write(prenom+"."+nom+"@outlook.com\n") - outF.write(prenom+"."+nom+"@orange.fr\n") - outF.write(prenom+"."+nom+"@wanadoo.fr\n") - outF.write(prenom+"."+nom+"@laposte.net\n") - - - - -#nom.prenom - - - - outF.write(nom+"."+prenom+"@gmail.com\n") - outF.write(nom+"."+prenom+"@hotmail.com\n") - outF.write(nom+"."+prenom+"@hotmail.fr\n") - outF.write(nom+"."+prenom+"@outlook.com\n") - outF.write(nom+"."+prenom+"@orange.fr\n") - outF.write(nom+"."+prenom+"@wanadoo.fr\n") - - outF.write(nom+"."+prenom+"@laposte.net\n") + os.chdir(domainsfldr) + print("\n" + LIGHTBLUE + ActualPathVar + BLUE + os.getcwd() + "/\n") + lists = os.listdir(domainsfldr) + print(" " + str(lists) + "\n") + defaultdomain = {'', ' ', 'default', 'default.txt'} + domaintouse = raw_input (LIGHTMAGENTA + DomainToUseVar + "[BLANK = default.txt]: " + LIGHTGRAY) -#prenomnom + if domaintouse in defaultdomain: + domaintouse = "default.txt" + with open("/root/.verifymail/domainslists/" + domaintouse, "r") as ins: + array = [] + os.chdir(listfldr) + text_file = open(filename, "a") + for line in ins: + array.append(line) + text_file.write(prenom + "." + nom + "@" + line) + text_file.write(nom + "." + prenom + "@" + line) + text_file.write(prenom + nom + "@" + line) + text_file.write(nom + prenom + "@" + line) + text_file.close() - outF.write(prenom+nom+"@gmail.com\n") - outF.write(prenom+nom+"@hotmail.com\n") - outF.write(prenom+nom+"@hotmail.fr\n") - outF.write(prenom+nom+"@outlook.com\n") - outF.write(prenom+nom+"@orange.fr\n") - outF.write(prenom+nom+"@wanadoo.fr\n") - outF.write(prenom+nom+"@laposte.net\n") + system('clear') + os.chdir(conffldr) + print(LIGHTGRAY + AddedListVar1 + MAGENTA +filename+ LIGHTGRAY + AddedListVar2 + MAGENTA + prenom + ' ' + nom + LIGHTGRAY + "\n" + AddedListVar3 + MAGENTA + domaintouse + LIGHTGRAY + '" !\n') + aide() + except KeyboardInterrupt: + system('clear') + aide() -#nomprenom +def domaincreator(): + system('clear') + os.chdir(domainsfldr) + print(DomainCreatorVar) + domainfilename = raw_input(LIGHTMAGENTA + "\n File name: " + LIGHTGRAY) + while True: + with open(domainfilename, 'a') as domainlist: - outF.write(nom+prenom+"@gmail.com\n") - outF.write(nom+prenom+"@hotmail.com\n") - outF.write(nom+prenom+"@hotmail.fr\n") - outF.write(nom+prenom+"@outlook.com\n") - outF.write(nom+prenom+"@orange.fr\n") - outF.write(nom+prenom+"@wanadoo.fr\n") - outF.write(nom+prenom+"@laposte.net\n") + try: + domainname = raw_input(LIGHTMAGENTA + " Domain name: " + LIGHTGRAY) + domainlist.write(domainname + '\n') + print(LIGHTMAGENTA + " Domain added: " + MAGENTA + domainname) + except KeyboardInterrupt: + while True: + try: + system('clear') + print(LIGHTMAGENTA + "\n Domain list saved in " + MAGENTA + domainsfldr + "/" + domainfilename + LIGHTMAGENTA + " !\n") + domainlist.close() + aide() + ask = raw_input(LIGHTMAGENTA + " VerifyMail > " + LIGHTGRAY) + if ask.upper() == "1": + single() + if ask.upper() == "2": + multi() + if ask.upper() == "3": + creator() + if ask.upper() == "4": + domaincreator() + if ask.upper() == "0": + exit(0) + except: + exit(0) - outF.close() - system('clear') - print(AddedListVar1 + MAGENTA +filename+ LIGHTGRAY + AddedListVar2 + MAGENTA + prenom + ' ' + nom + LIGHTGRAY + ' !\n') - aide() - except KeyboardInterrupt: - system('clear') - aide() welcome() aide() @@ -713,10 +786,11 @@ while True: multi() if ask.upper() == "3": creator() + if ask.upper() == "4": + domaincreator() if ask.upper() == "0": exit(0) - except: print("\n" + MAGENTA + GoodByeVar + LIGHTMAGENTA + " VerifyMail " + MAGENTA + "!\n") exit(0) diff --git a/version.txt b/version.txt index 9459d4b..5625e59 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.1 +1.2