19 lines
505 B
Python
Executable file
19 lines
505 B
Python
Executable file
#!/usr/bin/env python3
|
|
"""Wrapper around `check_if_email_exists`."""
|
|
|
|
import json
|
|
import pprint
|
|
import subprocess
|
|
|
|
import smolcgi
|
|
|
|
smolcgi.require_cool_client("This script is not publicly available, sorry!")
|
|
|
|
if not smolcgi.query_string_dec:
|
|
smolcgi.require_input("Provide an email address to check.")
|
|
|
|
smolcgi.header(20, "text/plain")
|
|
command = ["/usr/local/bin/check_if_email_exists", smolcgi.query_string_dec]
|
|
output = subprocess.check_output(command).decode()
|
|
pprint.pprint(json.loads(output)[0])
|