Skip to content

Commit

Permalink
add script (email_verifier) (#7)
Browse files Browse the repository at this point in the history
* add script (email_verifier)

* add library

* change req and so on

* used black

* Little fixes

* Main and .gitignore fixes

Co-authored-by: Minerm <minerm@mail.ru>
Co-authored-by: manmolecular <regwebghost@yandex.ru>
  • Loading branch information
3 people authored Jul 16, 2020
1 parent 7fd9dbb commit 56ba429
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Custom
.idea/
.DS_Store

# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down
22 changes: 22 additions & 0 deletions src/scripts/osint/email_verifier/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env python3

from verify_email import verify_email

from src.core.base.osint import OsintRunner, PossibleKeys
from src.core.utils.response import ScriptResponse
from src.core.utils.validators import validate_kwargs


class Runner(OsintRunner):
def __init__(self, logger: str = __name__):
super(Runner, self).__init__(logger)

@validate_kwargs(PossibleKeys.KEYS)
def run(self, *args, **kwargs) -> ScriptResponse.success or ScriptResponse.error:
email = kwargs.get("email")
result = verify_email(email)
if not result:
return ScriptResponse.success(
result=result, message=f"Sorry, email {email} does not exist"
)
return ScriptResponse.success(result=result, message=f"Email {email} exists")
7 changes: 7 additions & 0 deletions src/scripts/osint/email_verifier/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
aiodns==2.0.0
aiosmtpd==1.2
atpublic==1.0
cffi==1.14.0
pycares==3.1.1
pycparser==2.20
verify-email==2.4.1

0 comments on commit 56ba429

Please sign in to comment.