From baa5ec8e339d4c462b8c33cf9fe0bbe896c9229b Mon Sep 17 00:00:00 2001 From: IoanMica <92159342+ioanmica@users.noreply.github.com> Date: Sun, 7 Nov 2021 21:45:35 +0200 Subject: [PATCH 1/3] Create nslookup.py --- nslookup.py | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 nslookup.py diff --git a/nslookup.py b/nslookup.py new file mode 100644 index 0000000..570fb1d --- /dev/null +++ b/nslookup.py @@ -0,0 +1,5 @@ +import subprocess + +domain = input("Enter the Domain: ") +output = subprocess.check_output(f"nslookup {domain}", shell=True, encoding='UTF-8') +print(output) From 630c7b57de8ca3f94914555f29d3e3b965d76918 Mon Sep 17 00:00:00 2001 From: IoanMica <92159342+ioanmica@users.noreply.github.com> Date: Sun, 7 Nov 2021 21:47:02 +0200 Subject: [PATCH 2/3] Update nslookup.py --- nslookup.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/nslookup.py b/nslookup.py index 570fb1d..a86eae7 100644 --- a/nslookup.py +++ b/nslookup.py @@ -1,5 +1,13 @@ 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) + + +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 From 3bf0de6b7220aac5df81820c0a1acc93fcac9229 Mon Sep 17 00:00:00 2001 From: IoanMica <92159342+ioanmica@users.noreply.github.com> Date: Mon, 8 Nov 2021 23:31:13 +0200 Subject: [PATCH 3/3] Update nslookup.py --- nslookup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/nslookup.py b/nslookup.py index a86eae7..16bd368 100644 --- a/nslookup.py +++ b/nslookup.py @@ -5,6 +5,7 @@ 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: