Skip to content

Commit

Permalink
Update mosint.py
Browse files Browse the repository at this point in the history
Bugs fixed, code cleaned, TODO added
  • Loading branch information
calganaygun committed Nov 26, 2020
1 parent 710a888 commit b4c27d2
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions mosint.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# https://github.com/alpkeskin
import json
from bs4 import BeautifulSoup
import json, re
from insides.bcolors import bcolors
from insides.Header import Header

configfile = open('config.json', "r")
conf = json.loads(configfile.read())
with open('config.json', "r") as configFile:
conf = json.loads(configFile.read())

for i in conf:
verifyApi = (i['verify-email.org API Key'])
socialscan = (i['Social Scan'])
Expand All @@ -25,14 +25,20 @@
ConfigTree(verifyApi,socialscan,leakeddb,breachedsites,hunterApi,dbdata,tcrwd,pastebindumps,googlesearch,dns,_verbose=True)

print("")

# TODO: Clean boolean in string.

EMAIL_REGEX = r'(^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$)'

while True:
mail=input(f"{bcolors.OKBLUE}MAIL > {bcolors.ENDC}")

if (mail == "q" or mail == "Q" or mail == "exit"):
print("Thank you for using "+f"{bcolors.BOLD}MOSINT{bcolors.ENDC}.")
break
elif (mail.find("@") == -1 and mail.find(".") == -1):
elif not re.match(EMAIL_REGEX, mail):
print(f"{bcolors.FAIL}Email format is wrong!{bcolors.ENDC}")
break
continue

if (verifyApi != ""):
from modules.VerifyMail import VerifyMail
Expand Down Expand Up @@ -90,5 +96,7 @@

if (dns == "True" or dns == "T" or dns == "true"):
from modules.DNS import DNS
title = "DNS LOOKUP"
Header(title)
DNS(mail,_verbose=True)

0 comments on commit b4c27d2

Please sign in to comment.