Projects STRLCPY mosint Commits b4c27d2b
🤬
Revision indexing in progress... (symbol navigation in revisions will be accurate after indexed)
  • ■ ■ ■ ■ ■ ■
    mosint.py
    1 1  # https://github.com/alpkeskin
    2  -import json
    3  -from bs4 import BeautifulSoup
     2 +import json, re
    4 3  from insides.bcolors import bcolors
    5 4  from insides.Header import Header
    6 5   
    7  -configfile = open('config.json', "r")
    8  -conf = json.loads(configfile.read())
     6 +with open('config.json', "r") as configFile:
     7 + conf = json.loads(configFile.read())
     8 + 
    9 9  for i in conf:
    10 10   verifyApi = (i['verify-email.org API Key'])
    11 11   socialscan = (i['Social Scan'])
    skipped 13 lines
    25 25  ConfigTree(verifyApi,socialscan,leakeddb,breachedsites,hunterApi,dbdata,tcrwd,pastebindumps,googlesearch,dns,_verbose=True)
    26 26   
    27 27  print("")
     28 + 
     29 +# TODO: Clean boolean in string.
     30 + 
     31 +EMAIL_REGEX = r'(^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$)'
     32 + 
    28 33  while True:
    29 34   mail=input(f"{bcolors.OKBLUE}MAIL > {bcolors.ENDC}")
     35 + 
    30 36   if (mail == "q" or mail == "Q" or mail == "exit"):
    31 37   print("Thank you for using "+f"{bcolors.BOLD}MOSINT{bcolors.ENDC}.")
    32 38   break
    33  - elif (mail.find("@") == -1 and mail.find(".") == -1):
     39 + elif not re.match(EMAIL_REGEX, mail):
    34 40   print(f"{bcolors.FAIL}Email format is wrong!{bcolors.ENDC}")
    35  - break
     41 + continue
    36 42   
    37 43   if (verifyApi != ""):
    38 44   from modules.VerifyMail import VerifyMail
    skipped 51 lines
    90 96   
    91 97   if (dns == "True" or dns == "T" or dns == "true"):
    92 98   from modules.DNS import DNS
     99 + title = "DNS LOOKUP"
     100 + Header(title)
    93 101   DNS(mail,_verbose=True)
    94 102  
    95 103   
Please wait...
Page is in error, reload to recover