summaryrefslogtreecommitdiff
path: root/domain
diff options
context:
space:
mode:
Diffstat (limited to 'domain')
-rwxr-xr-xdomain18
1 files changed, 10 insertions, 8 deletions
diff --git a/domain b/domain
index 24e2d68..8ce1ccd 100755
--- a/domain
+++ b/domain
@@ -11,6 +11,8 @@ cli.add_argument("hostname", help="the name to search, sans the .tld")
cli.add_argument(
"-t",
"--tlds",
+ # this doesn't do anything because my registry database only has .com, .net,
+ # and .edu
help="list of tlds to search (default: 'com net')",
nargs="+",
default=["com", "net"],
@@ -18,7 +20,7 @@ cli.add_argument(
cli.add_argument(
"--abbrev",
help="search hostname abbrevs, like 'internationalization' => 'i18n'",
- action='store_true'
+ action="store_true",
)
args = cli.parse_args()
@@ -35,10 +37,10 @@ for tld in args.tlds:
c = args.hostname[-1]
domains.append(f"{a}{b}{c}.{tld}")
for domain in domains:
- res = subprocess.run(["whois", domain], stdout=subprocess.PIPE).stdout.decode(
- "utf-8"
- )
- if re.search(regex, res, re.IGNORECASE):
- print("ok:", domain)
- else:
- print("no:", domain)
+ res = subprocess.run(["whois", domain], stdout=subprocess.PIPE).stdout.decode(
+ "utf-8"
+ )
+ if re.search(regex, res, re.IGNORECASE):
+ print("ok:", domain)
+ else:
+ print("no:", domain)