mirror of
https://github.com/alpkeskin/mosint.git
synced 2026-06-12 21:01:56 +08:00
Update VerifyMail method
Code cleaned, bult-in mail verifier added
This commit is contained in:
parent
d1893cb344
commit
a2e4220640
@ -1,15 +1,13 @@
|
||||
from bs4 import BeautifulSoup
|
||||
import json,requests
|
||||
import requests
|
||||
from verify_email import verify_email
|
||||
from insides.bcolors import bcolors
|
||||
|
||||
|
||||
def VerifyMail(verifyApi,mail,_verbose=None):
|
||||
if _verbose != None:
|
||||
|
||||
verifyurl = "https://app.verify-email.org/api/v1/"+verifyApi+"/verify/"
|
||||
response1 = requests.get(verifyurl+str(mail))
|
||||
html1 = response1.content
|
||||
soup1=BeautifulSoup(html1,"html.parser")
|
||||
strsoup1 = str(soup1)
|
||||
data1 = json.loads(strsoup1)
|
||||
print(f"[{bcolors.HEADER}#{bcolors.ENDC}]" + " Verification result : "+str(data1['status_description']))
|
||||
def VerifyMail(verifyAPIKey, mail, _verbose=None):
|
||||
if _verbose != None:
|
||||
res = requests.get(f"https://app.verify-email.org/api/v1/{verifyAPIKey}/verify/{mail}").json()
|
||||
print(f"[{bcolors.HEADER}#{bcolors.ENDC}] Verify-Email.org result : {res.get('status_description')}")
|
||||
if verify_email(mail):
|
||||
print(f"[{bcolors.HEADER}#{bcolors.ENDC}] Built-in Mail Verify result : {bcolors.OKGREEN}OK{bcolors.ENDC}")
|
||||
else:
|
||||
print(f"[{bcolors.HEADER}#{bcolors.ENDC}] Built-in Mail Verify result : {bcolors.FAIL}FAILED{bcolors.ENDC}")
|
||||
@ -3,4 +3,5 @@ prettytable==0.7.2
|
||||
anytree==2.8.0
|
||||
beautifulsoup4==4.9.3
|
||||
socialscan==1.4.1
|
||||
googlesearch-python
|
||||
googlesearch-python
|
||||
verify-email
|
||||
Loading…
Reference in New Issue
Block a user