ud
This commit is contained in:
23
directadmin-1.62.4/scripts/ip_info.sh
Normal file
23
directadmin-1.62.4/scripts/ip_info.sh
Normal file
@@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
|
||||
DIG=/usr/bin/dig
|
||||
WHOIS=/usr/bin/whois
|
||||
|
||||
if [ $# -ne 1 ]; then
|
||||
echo "Usage:";
|
||||
echo " $0 ip";
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
if [ ! -x "$DIG" ]; then
|
||||
echo "Cannot find $DIG or it's not executable.";
|
||||
exit 2;
|
||||
else
|
||||
$DIG -x "$1" +noshort 2>&1
|
||||
fi
|
||||
|
||||
if [ -x "$WHOIS" ]; then
|
||||
$WHOIS "$1" 2>&1
|
||||
fi
|
||||
|
||||
exit 0;
|
||||
Reference in New Issue
Block a user