Показать сообщение отдельно

  #16  
Старый 07.12.2009, 05:02
x[0]x
Banned
Регистрация: 02.12.2008
Сообщений: 43
С нами: 9178715

Репутация: 4
По умолчанию

http://packetstormsecurity.org/filedesc/bing-ip2hosts-0.1.tar-gz.html
PHP код:
#!/bin/bash
# bing-ip2hosts - Enumerate hostnames from Bing.com for an IP address.
# Bing.com is Microsoft's search engine which has an IP: search parameter.
#
# By Andrew Horton aka urbanadventurer, MorningStar Security
# www.morningstarsecurity.com
#
# Released at Kiwicon III (kiwicon.org), November 2009
# License: GPLv3
VERSION=0.1
ANIMATION
=1

if [ -"$1" ] || [ "$1" == "-h" ] || [ "$1" == "--help" ]; then
echo -"Usage: $0 [--noanimation] <IP>
bing-ip2hosts (
$VERSION)- Enumerate hostnames from Bing.com for an IP address.
Bing.com is Microsoft's search engine which has an IP: search parameter.

By Andrew Horton aka urbanadventurer, MorningStarSecurity
www.morningstarsecurity.com
"
exit 1
fi

if [ "$1" == "--noanimation" ]; then
 ANIMATION
=0
 shift
 ARGV
=$*
fi

animation
="/-\|"
IP="$1"
num_vhosts=10
page
=0

all_hosts
=`mktemp -p . -t ip2hosts.tmp.XXXXXX`

while [ 
"$num_vhosts== 10 ]; do
 if [ 
$ANIMATION == ]; then
  
echo -en "${animation: $(( $page )) :1}"
 
fi
 url
="http://m.bing.com/search/search.aspx?A=webresults&Q=ip%3a$IP&D=Web&SI=$page""0"
 
out=`mktemp -p . -t ip2hosts.tmp.XXXXXX`
 
wget --"$out" "$url"
 
vhosts=`cat "$out"| egrep -o  "(<span class=\"c2\">)[^<]+(<\/)" | sed -e 's/<span class="c2">\|<\///g'`
 
num_vhosts=`echo "$vhosts" | wc -l`
 echo -
"$vhosts>> "$all_hosts"
 
rm -"$out"
 
let page=$page+
 
if [ $ANIMATION == ]; then
  
echo -ne "\b"
 
fi
done

cat 
"$all_hostscut -'/' -f 1 tr '[:upper:]' '[:lower:]' sort uniq
rm 
-"$all_hosts

Последний раз редактировалось x[0]x; 07.12.2009 в 05:05..
 
Ответить с цитированием