diff --git a/nslookup.py b/nslookup.py new file mode 100644 index 0000000..16bd368 --- /dev/null +++ b/nslookup.py @@ -0,0 +1,14 @@ +import subprocess +from django.db import connection + +domain = input("Enter the Domain: ") +output = subprocess.check_output(f"nslookup {domain}", shell=True, encoding='UTF-8') +print(output) + +smth = "see you later" + +def find_user(username): + with connection.cursor() as cur: + cur.execute(f"""select username from USERS where name = '%s'""" % username) + output = cur.fetchone() + return output