![]() | 1 nodejx 2014-02-19 15:30:16 +08:00 |
![]() | 2 Comdex 2014-02-19 15:37:17 +08:00 同样想模拟学校的登录正方教务系统,求楼主指点 |
3 yhf OP @nodejx 我已经发现猫腻了, 我用下面的代码查看登录页面的原代码, 返回的居然是另一个网页! import urllib2 command=studentLogin' url = 'http://202.117.120.37/xdjwWebNew/systemAdmin/Login.jsp?command=studentLogin' html = urllib2.urlopen(url).read() print html 这是什么情况!....... |
![]() | 4 nodejx 2014-02-19 16:16:33 +08:00 |
![]() | 5 nodejx 2014-02-19 16:40:14 +08:00 @加入header字段就可以使用requests来get上面的页面了,urllib2我不熟,应该也是可以加入header参数的吧。 |
![]() | 6 nodejx 2014-02-19 16:42:14 +08:00 @yhf应该是urllib2连接超时会自动跳转到docs.python.org/2/library/urllib2.html这个页面。 |
![]() | 7 blueandhack 2014-02-19 17:35:51 +08:00 @yhf 试着用wireshark抓包看看,到底post的是哪个地址。 |
![]() | 8 blueandhack 2014-02-19 17:36:37 +08:00 @yhf 还可以试试使用Cookie欺骗 |
![]() | 9 tan9le 2014-02-19 17:40:12 +08:00 var sharedValue = -333181683 function change(){ var pw = document.form1.password.value; pw = hex_md5(pw); //alert(pw+sharedValue); pw = hex_md5(pw+sharedValue); //用共享数值再次加密 //document.write(pw); document.form1.password.value = pw ; // return true; } 话说排除你那诡异的提交地址的问题之外,页面上的Javascript加密中sharedValue是每次页面刷新都会变的,请注意 |
![]() | 10 zhy0216 2014-02-19 17:44:29 +08:00 很奇怪的样子, 真不行我们有: https://github.com/jeanphix/Ghost.py |
![]() | 12 fucker 2014-02-19 18:18:48 +08:00 xdjw,西电教务,哥们也西安的啊 |
![]() | 16 yhf OP @blueandhack post的地址不就是chrome里查到的request的那个地址吗? |
![]() | 17 Tink PRO 额。。我老早以前做过。。。。同西电 |
18 intosec 2014-02-19 19:31:50 +08:00 用浏览器看看登陆请求POST的是什么数据,看看是否对password进行了加密处理。 PS:这个网站上直接就有猪肉店 |
![]() | 22 zsj950618 2014-02-19 19:50:44 +08:00 教务系统有验证码的怎么破。。。 |
![]() | 24 blueandhack 2014-02-19 21:49:10 +08:00 |
![]() | 25 yutify 2014-02-19 21:50:03 +08:00 via iPhone @blueandhack 为什么我5分钟前发的主题直接沉底呢?没有显示在最上面 http://v2ex.com/t/100970 |
![]() | 26 blueandhack 2014-02-19 21:51:25 +08:00 @yhf 用的Cookie登陆的 |
![]() | 27 crazycookie 2014-02-21 09:05:15 +08:00 没关系的,主要是,你要获得cookies,至于登录后他登录到那边无所谓的。你只要能有权限浏览你想要的页面即可 不管他登录后跳转到什么页面,获得cookies,然后把cookies放到新的请求中去获得 你想要的页面。 PS:我到现在碰到的最心的方式,http auth, cookie 登录, 外加ip和 user agent 验证. 这都被我绕过去了。 关于 表单参数一直变的问题的回答是:有办法。 用Ghost.py. 可以用js去控制填写. 然后把他的返回的dom转换成html即可。 PS again: js的执行结果也在里面哦 做得细致点,伪造下 user-agent, 代理下ip, 基本可以模拟人的访问行为动作了. 算是黑技能了(我好像暴露了什么) |
![]() | 28 reverland 2014-02-22 22:07:48 +08:00 @zsj950618 教务的验证码,如果是指正方教务那种,相当简单,之前我们学校做个[https://github.com/reverland/scripts/tree/master/python/captcha_cl](https://github.com/reverland/scripts/tree/master/python/captcha_cl).如果是谷歌那种,人工吧…… 另外,自从开始用selenium……再也不想自己去打开firebug研究模拟登录了…… |