精确到楼层的ip查询?

sh/bash/dash/ksh/zsh等Shell脚本
回复
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

精确到楼层的ip查询?

#1

帖子 eexpress » 2009-04-03 11:37

代码: 全选

☎ cat apnic.pl 
#!/usr/bin/perl

my ($ip1,$ip2)=split(/\./,$ARGV[0]);
my $ip="$ip1.$ip2";
print $ARGV[0];
open(who, "whois -h whois.apnic.net $ARGV[0]|");
my $l;
while(<who>){
        last if /$ip/;
}
while(<who>){
        chomp;
        s/$&:\s*//,print " ► $_" if /^descr|^country/;
}
close(who);
● 鸣学
头像
leeaman
帖子: 30702
注册时间: 2007-02-02 18:14
系统: debian sid

Re: 精确到楼层的ip查询?

#2

帖子 leeaman » 2009-04-03 12:00

传说中的马甲杀手? :em06
醉了星星,醉月亮●●●●●The Long Way To Go(*^_^*)
头像
bones7456
帖子: 8495
注册时间: 2006-04-12 20:05
来自: 杭州
联系:

Re: 精确到楼层的ip查询?

#3

帖子 bones7456 » 2009-04-03 12:08

不直观,不明显
关注我的blog: ε==3
头像
sammysun
帖子: 4088
注册时间: 2007-12-08 23:33
来自: SCUT-guangzhou

Re: 精确到楼层的ip查询?

#4

帖子 sammysun » 2009-04-03 12:21

:em06 怎么用?
头像
greco
帖子: 2487
注册时间: 2007-04-06 10:24
来自: ~/Shanghai

Re: 精确到楼层的ip查询?

#5

帖子 greco » 2009-04-03 12:22

:em04
http://silenceisdefeat.com/~greco

代码: 全选

''.join([chr(ord(c)-2) for c in 'O{"G/ockn"ku<"itgeq0ujkBiockn0eqo'])
echo -n "Z3JlY28uc2hpQGdtYWlsLmNvbQ==" | base64 -d
头像
jioyo源
帖子: 3476
注册时间: 2008-10-08 13:48

Re: 精确到楼层的ip查询?

#6

帖子 jioyo源 » 2009-04-03 12:48

sammysun 写了::em06 怎么用?
--------------------------------------
论坛精华贴全集:http://forum.ubuntu.org.cn/viewtopic.php?f=48&t=199845
book:http://forum.ubuntu.org.cn/viewtopic.php?f=21&t=198286
头像
bigdomain
帖子: 10
注册时间: 2007-01-15 17:33

Re: 精确到楼层的ip查询?

#7

帖子 bigdomain » 2009-04-03 13:38

保存代码
chmod +x ./apnic.pl
./apnic.pl 122.231.2.115
122.231.2.115 ► CN ► CHINANET-ZJ Jiaxing node network ► Zhejiang Telecom ► CN ►
头像
xiooli
帖子: 6956
注册时间: 2007-11-19 21:51
来自: 成都
联系:

Re: 精确到楼层的ip查询?

#8

帖子 xiooli » 2009-04-03 13:50

代码: 全选

whois -h whois.apnic.net ip
更详细阿
头像
windwiny
帖子: 2254
注册时间: 2007-03-13 17:26

Re: 精确到楼层的ip查询?

#9

帖子 windwiny » 2009-04-04 1:48

who 是什么玩艺? 还少发了一些东西吧
jyz19880823
帖子: 91
注册时间: 2008-05-28 20:36

Re: 精确到楼层的ip查询?

#10

帖子 jyz19880823 » 2009-04-04 15:04

:em06 :em09
回复