免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 18099 | 回复: 17
打印 上一主题 下一主题

用wget 和curl 无法从ip138获取ip地址归属地了 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-07-10 21:25 |只看该作者 |倒序浏览
今天发现不可用wget 和curl 从ip138获取ip地址归属地,昨天还是好好的,今天就不行了,估计是ip138网站做过修改了
#wget  "http://ip138.com/ip8s.asp?ip=58.211.xx.xxx&action=2"
得到的信息是:
<html><body><br><br><script>window.location="/ip8s.asp?ip=58.211.xx.xxx&action=2&jdfwkey=4vetw1";</script><center><h3>如果您的页面没有自动跳转,请<a href="/ip8s.asp?ip=58.211.xx.xxx&action=2&jdfwkey=4vetw1">点击这里</a></h3></center></body></html>

有高手出来分析一下吗?

论坛徽章:
0
2 [报告]
发表于 2010-07-10 21:42 |只看该作者
ip138网站都打不开了

论坛徽章:
0
3 [报告]
发表于 2010-07-10 21:58 |只看该作者
回复 2# markuz


打得开的,我刚刚试过

论坛徽章:
0
4 [报告]
发表于 2010-07-10 23:45 |只看该作者
修改useragent信息,再试

论坛徽章:
0
5 [报告]
发表于 2010-07-11 03:46 |只看该作者
修改useragent信息,再试
yigenjin 发表于 2010-07-10 23:45



    可否具体讲一下!谢谢!

论坛徽章:
0
6 [报告]
发表于 2010-07-11 10:29 |只看该作者

论坛徽章:
0
7 [报告]
发表于 2010-07-11 21:42 |只看该作者
ubuntuer 发表于 2010-07-11 10:29



在IE里是可以的
你可以在linux shell环境下运行一次wget看看。

论坛徽章:
0
8 [报告]
发表于 2010-07-12 08:03 |只看该作者
执行经过和结果:[root@localhost ~]# wget "http://ip138.com/ips.asp?ip=58.251.193.137&action=2"
--2010-07-12 08:02:43--  http://ip138.com/ips.asp?ip=58.251.193.137&action=2
正在解析主机 ip138.com... 221.5.47.136
Connecting to ip138.com|221.5.47.136|:80... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:7817 (7.6K) [text/html]
Saving to: `ips.asp?ip=58.251.193.137&action=2'

100%[===================================================================>] 7,817       --.-K/s   in 0.04s

2010-07-12 08:02:43 (186 KB/s) - `ips.asp?ip=58.251.193.137&action=2' saved [7817/7817]


然后咋看呢?

论坛徽章:
0
9 [报告]
发表于 2010-07-12 08:18 |只看该作者
[root@router ~]#   wget --user-agent="Mozilla/4.0 (compatible; MSIE 7.0b; Windows NT 6.0)"  "http://ip138.com/ip8s.asp?ip=58.251.193.137&action=2"
--08:17:17--  http://ip138.com/ip8s.asp?ip=58.251.193.137&action=2
           => `ip8s.asp?ip=58.251.193.137&action=2'
タ?琩т?诀 ip138.com... 219.153.15.76
タ?硈钡 ip138.com|219.153.15.76|:80... 硈???
?癳? HTTP 璶―?タ?单??莱... 200 OK
??: 247 [text/html]

100%[==================================================================================================================================================================================>] 247           --.--K/s            

08:17:17 (33.65 MB/s) -- ?纗? ˉip8s.asp?ip=58.251.193.137&action=2ˇ [247/247])

[root@router ~]# cat ip8s.asp\?ip\=58.251.193.137\&action\=2
<html><body><br><br><script>window.location="/ip8s.asp?ip=58.251.193.137&action=2&jdfwkey=tdzvt";</script><center><h3>如果您的页面没有自动跳转,请<a href="/ip8s.asp?ip=58.251.193.137&action=2&jdfwkey=tdzvt">点击这里</a></h3></center></body></html>[root@router ~]#

论坛徽章:
0
10 [报告]
发表于 2010-07-12 08:45 |只看该作者
本帖最后由 jzcqx 于 2010-07-12 08:55 编辑

最新消息:
刚刚测试,又可以了,不知道ip138在搞什么鬼!
[root@router ~]# wget "http://ip138.com/ips.asp?ip=58.251.193.137&action=2"
--08:54:53--  http://ip138.com/ips.asp?ip=58.251.193.137&action=2
           => `ips.asp?ip=58.251.193.137&action=2'
タ?琩т?诀 ip138.com... 219.153.15.76
タ?硈钡 ip138.com|219.153.15.76|:80... 硈???
?癳? HTTP 璶―?タ?单??莱... 200 OK
??: 7,817 (7.6K) [text/html]

100%[==================================================================================================================================================================================>] 7,817         --.--K/s            

08:54:53 (85.99 KB/s) -- ?纗? ˉips.asp?ip=58.251.193.137&action=2ˇ [7817/7817])

[root@router ~]# cat ips.asp\?ip\=58.251.193.137\&action\=2
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<TITLE>IP地址查询--手机号码查询归属地 | 邮政编码查询 | 长途电话区号 | 身份证号码验证在线查询网</TITLE>
<META NAME="Generator" CONTENT="ip,IP查询,IP地址查询,ip138,网址之家">
<META NAME="Author" CONTENT="ip138,网址之家">
<META NAME="Keywords" CONTENT="ip,IP查询,IP地址查询,ip138,网址之家">
<META NAME="Description" CONTENT="ip,IP查询,IP地址查询,ip138,网址之家">
<SCRIPT LANGUAGE="JavaScript">
<!--
function checkIP()
{
        var ipArray,ip,j;
        ip = document.ipform.ip.value;

        if(/[A-Za-z_-]/.test(ip)){
                if(!/^([\w-]+\.)+((com)|(net)|(org)|(gov\.cn)|(info)|(cc)|(com\.cn)|(net\.cn)|(org\.cn)|(name)|(biz)|(tv)|(cn)|(mobi)|(name)|(sh)|(ac)|(io)|(tw)|(com\.tw)|(hk)|(com\.hk)|(ws)|(travel)|(us)|(tm)|(la)|(me\.uk)|(org\.uk)|(ltd\.uk)|(plc\.uk)|(in)|(eu)|(it)|(jp))$/.test(ip)){
                        alert("不是正确的域名");
                        document.ipform.ip.focus();
                        return false;
                }
        }
        else{
                ipArray = ip.split(".");
                j = ipArray.length
                if(j!=4)
                {
                        alert("不是正确的IP");
                        document.ipform.ip.focus();
                        return false;
                }

                for(var i=0;i<4;i++)
                {
                        if(ipArray.length==0 || ipArray>255)
                        {
                                alert("不是正确的IP");
                                document.ipform.ip.focus();
                                return false;
                        }
                }
        }
}
function WeatherSearch(){
        document.forms["weathersearch"].submit()
}
function Area2Zip(){
        document.forms["area2zip"].submit()
}
//-->
</SCRIPT>

<STYLE type="text/css">
p,td {font-size:16px}
A:link {
        COLOR: #1c5f82; TEXT-DECORATION: none
}
A:visited {
        COLOR: #1c5f82; TEXT-DECORATION: none
}
A:hover {
        COLOR: #cc5533; TEXT-DECORATION: underline
}
.subt {
        COLOR: #aa3333; FONT-FAMILY: "宋体"; FONT-SIZE: 9pt
}
.tdc {
        COLOR: #333333; FONT-FAMILY: "宋体"; FONT-SIZE: 9pt
}
.tdc1 {
        COLOR: #ffffff; FONT-FAMILY: "宋体"; FONT-SIZE: 9pt
}
.tdc2 {
        COLOR: #008000; FONT-FAMILY: "宋体"; FONT-SIZE: 9pt
}
.bdtj {
        BACKGROUND: #6699cc; BORDER-BOTTOM: #6699cc 1px solid; BORDER-LEFT: #6699cc 1px solid; BORDER-RIGHT: #6699cc 1px solid; BORDER-TOP: #6699cc 1px solid; COLOR: #ffffff; FONT-SIZE: 9pt; HEIGHT: 18px
}
BODY {
        SCROLLBAR-HIGHLIGHT-COLOR: #f7f7f7; SCROLLBAR-SHADOW-COLOR: #f7f7f7; SCROLLBAR-ARROW-COLOR: #EFF1F3; SCROLLBAR-TRACK-COLOR: #EFF1F3; SCROLLBAR-BASE-COLOR: #f7f7f7
}
.ul1{
        width:400px;
        text-align:left;
}
li{
        color:green;
        }
</STYLE>
</HEAD>
<BODY>
<div align="center"><center>
<table cellSpacing="0" cellPadding="0" width="760" align="center" border="0">
        <tr vAlign="bottom">
                <td align="left"><a href="http://www.ip138.com"><b>www.ip138.com 查询网</b></a></td>
                <td align="middle"></td>
                <td align="right"><strong>手机上网查询:wap.ip138.com</strong></td>
        </tr>
        <tr vAlign="top" align="left">
                <td colSpan="3"><hr width="100%" SIZE="1">
                </td>
        </tr>
</table>
</center></div>

<div align="center"><center>
<table height="22" cellSpacing="0" cellPadding="0" width="710" border="0">
        <tr align="middle">
                <td width="179"><b><font color="#008000">→</font></b><a href="http://www.ip138.com/ips8.asp" target="_blank">ip地址所在地查询</a></td>
                <td width="177"><b><font color="#008000">→</font></b><a href="http://qq.ip138.com/train/" target="_blank">国内列车时刻表查询</a></td>
                <td width="177"><b><font color="#008000">→</font></b><a href="http://www.ip138.com/sj/index.htm" target="_blank">手机号码所在地区查询</a></td>
                <td width="177"><b><font color="#008000">→</font></b>&nbsp;<a href="http://qq.ip138.com/weather/" target="_blank">天气预报-预报五天</a></td>
        </tr>
        <tr align="middle">
                <td><b><font color="#008000">→</font></b><a href="http://www.ip138.com/gb.htm" target="_blank">汉字简体繁体转换</a></td>
                <td><b><font color="#008000">→</font></b><a href="http://www.ip138.com/jb.htm" target="_blank">国内国际机票查询</a></td>
                <td><b><font color="#008000">→</font></b><a href="http://www.3533.com/phone/" target="_blank">手机型号大全查询</a></td>
                <td><b><font color="#008000">→</font></b><a href="http://qq.ip138.com/wb/wb.asp" target="_blank">五笔编码拼音查询</a></td>
        </tr>
        <tr align="middle">
                <td><b><font color="#008000">→</font></b><a href="http://qq.ip138.com/tran.htm" target="_blank">在线翻译</a></td>
                <td><b><font color="#008000">→</font></b><a href="http://qq.ip138.com/hl.asp" target="_blank">货币汇率兑换</a></td>
                <td><b><font color="#008000">→</font></b><a href="http://qq.ip138.com/day/" target="_blank">阴阳转换万年历</a></td>
                <td><b><font color="#008000">→</font></b><a href="http://www.ip138.com/post/" target="_blank">邮编查询区号查询</a></td>
        </tr>
        <tr align="middle">
                <td><a href="http://qq.ip138.com/idsearch/" target="_blank">身份证号码查询验证</a></td>
                <td><a href="http://www.ip138.com/ems" target="_blank">EMS邮政速递查询</a></td>
                <td><a href="http://www.ip138.com/carlist.htm" target="_blank">各地车牌查询表</a></td>
                <td><a href="http://www.ip138.com/weizhang.htm" target="_blank">车辆交通违章查询</a></td>
        </tr>
</table>
</center></div>
<form method="post" action="http://qq.ip138.com/weather/search.asp" name="weathersearch" target="_blank">
<input type="hidden" name="k" value="" />
</form>
<form method="post" action="http://www.ip138.com/post/search.asp" name="area2zip" target="_blank">
<input type="hidden" name="area" value="" />
<input type="hidden" name="action" value="area2zip" />
</form>
<table width="80%"  border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
                <td align="center"><h3>ip138.com IP查询(搜索IP地址的地理位置)</h3></td>
        </tr>
        <tr>
                <td align="center"><h1>您查询的IP:58.251.193.137</h1></td>
        </tr>
        <tr>
                <td align="center"><ul class="ul1"><li>本站主数据:广东省深圳市 联通</li><li>参考数据一:广东省深圳市 联通</li><li>参考数据二:广东省深圳市 联通</li></ul></td>
        </tr>
        <tr>
                <td align="center">如果您发现查询结果不详细或不正确,请使用<a href="ip_add.asp?ip=58.251.193.137"><font color="#006600"><b>IP数据库自助添加</b></font></a>功能进行修正<br/><br/>
                <iframe src="/jss/bd_460x60.htm" frameborder="no" width="460" height="60" border="0" marginwidth="0" marginheight="0" scrolling="no"></iframe><br/><br/></td>
        </tr>
        <form method="get" action="ips8.asp" name="ipform" onsubmit="return checkIP();">
        <tr>
                <td align="center">IP地址或者域名:<input type="text" name="ip" size="16"> <input type="submit" value="查询"><input type="hidden" name="action" value="2"></td>
        </tr><br>
<br>
        </form>
</table>
<div align="center"><center>
<table>
        <tr>
                <td align="center">ip138专业7*24小时为您服务</td>
        </tr>
        <tr>
                <td align="center"><small>注:本站的IP数据库为最新的数据库,每10天自动更新一次</small></td>
        </tr>
        <tr>
                <td align="center"><small></small><a href="iplink.htm" target="_blank">欢迎各网站链接本站IP数据库,获取代码按此</a><small></small></td>
        </tr>
</table>
</center></div><table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
                <td align="center"><script type="text/javascript"><!--
google_ad_client = "pub-2647756814688293";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></td>
  </tr>
</table>

<p align="center">如发现小部分ip查询结果不正确请到官方网站<a
href="http://www.apnic.net">http://www.apnic.net</a>查询,以apnic为准</p>
<p align="center"></a>联系我们.请<a href="mail.htm" target="_blank">发email</a>.或给<a
href="http://qq.3533.com:8080/book.asp?siteid=7" target="_blank">我们留言</a>谢谢!</p>
<p align="center"><a href="http://www.miibeian.gov.cn/" target="_blank">粤ICP备05004654号</a></p>
</body>
</html>[root@router ~]#
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP