summaryrefslogtreecommitdiffstats
path: root/Reaktor
diff options
context:
space:
mode:
authormakefu <root@pigstarter.de>2014-06-16 17:25:08 +0200
committermakefu <root@pigstarter.de>2014-06-16 17:25:08 +0200
commit12b9b3c3080ded934425f6eda59de26ec6a103eb (patch)
tree9d3a1a251482f791db7ad9f06be83c91976d95e7 /Reaktor
parent16cde649f07ea8fe67765237c7d28ab710ddf761 (diff)
add stolen domain lookup shitz
Diffstat (limited to 'Reaktor')
-rw-r--r--Reaktor/commands/taken28
1 files changed, 28 insertions, 0 deletions
diff --git a/Reaktor/commands/taken b/Reaktor/commands/taken
new file mode 100644
index 00000000..0b7424ed
--- /dev/null
+++ b/Reaktor/commands/taken
@@ -0,0 +1,28 @@
+#!/bin/sh
+#!/bin/bash
+
+# domainavailable
+# Fast, domain name checker to use from the shell
+# Use globs for real fun:
+# domainavailable blah{1..3}.{com,net,org,co.uk}
+# Inspired by foca / giles:
+# http://gilesbowkett.blogspot.com/2009/02/simple-bash-domain-availability.html
+
+trap 'exit 1' INT TERM EXIT
+
+for d in $@;
+do
+if host $d | grep "NXDOMAIN" >&/dev/null; then
+ if whois $d | grep -Ei "(No match|NOT FOUND|Status: free)" >&/dev/null; then
+ echo "$d available";
+ else
+ if whois $d >&/dev/null;then
+ echo "$d taken";
+ else
+ echo "$d - whois not available"
+ fi
+ fi
+else
+ echo "$d taken";
+fi
+done