Today : | at : | Safemode : ON
English French German Spain Italian Dutch Russian Brazil Japanese Korean Arabic Chinese Simplified
Title Author Perms Comnt Modified Category
By --=:[./3r0r-c0d3]:=--
Fivers

Shell Script Untuk Mendapatkan Informasi data center, IP pemilik, Kota dan Negara Dari Nama Domain [./3r0r-c0d3] rwxr-xr-x 0 10:31:00 PM

Title Shell Script Untuk Mendapatkan Informasi data center, IP pemilik, Kota dan Negara Dari Nama Domain
Permission rw-r--r--
Author [./3r0r-c0d3]
Date and Time 10:31:00 PM
Category
Share
 

#!/bin/bash
# A sample shell script to print domain ip address hosting information such as
# Location of server, city, ip address owner, country and network range.
# This is useful to track spammers or research purpose.
# -------------------------------------------------------------------------
# Copyright (c) 2006 nixCraft project <http://cyberciti.biz/fb/>
# This script is licensed under GNU GPL version 2.0 or above
# -------------------------------------------------------------------------
# This script is part of nixCraft shell script collection (NSSC)
# Visit http://bash.cyberciti.biz/ for more information.
# -------------------------------------------------------------------------
# Last updated on Mar/05/2010
# -------------------------------------------------------------------------

# Get all domains
_dom=$@

# Die if no domains are given
[ $# -eq 0 ] && { echo "Usage: $0 domain1.com domain2.com ..."; exit 1; }
for d in $_dom
do
_ip=$(host $d | grep 'has add' | head -1 | awk '{ print $4}')
[ "$_ip" == "" ] && { echo "Error: $d is not valid domain or dns error."; continue; }
echo "Getting information for domain: $d [ $_ip ]..."
whois "$_ip" | egrep -w 'OrgName:|City:|Country:|OriginAS:|NetRange:'
echo ""

done
Jalankan script berikut ini :

./script.sh cyberciti.biz google.com
Contoh yang keluar:

Getting information for domain: cyberciti.biz [ 74.86.48.99 ]... OrgName: SoftLayer Technologies Inc. City: Dallas Country: US NetRange: 74.86.0.0 - 74.86.255.255 OriginAS: AS36351 Getting information for domain: google.com [ 209.85.231.104 ]... OrgName: Google Inc. City: Mountain View Country: US NetRange: 209.85.128.0 - 209.85.255.255
Sumber


0 komentar:

Posting Komentar

terimakasih telah berkomentar dengan bijak, saya harap anda memberi kritik dan saran yang membangun...

Happy Reading ^_^

Diberdayakan oleh Blogger.