Skip to content

Instantly share code, notes, and snippets.

@rusted
Created December 6, 2009 13:11
Show Gist options
  • Save rusted/250220 to your computer and use it in GitHub Desktop.
Save rusted/250220 to your computer and use it in GitHub Desktop.
#! /bin/bash
#appelle le webService et affiche les informations sur stdout
webService='http://www.webservicex.net/whois.asmx/GetWhoIS'
if [ $# -lt 1 ] ; then
echo -e "usage : $0 hostname [hostname]+ \nexample : $0 google.fr"
exit 1
fi
for i in $@ ; do
curl -s -d HostName="$i" $webService | xpath -q -e '/string/text()'
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment