|
kioskboy
初级用户
 
积分 153
发帖 103
注册 2008-3-27
状态 离线
|
『楼 主』:
curl登陆一个网站
使用 LLM 解释/回答一下
http://www.netyi.net/是一个又大又好的 电子书下载网站,里面有很多网友上传的资料。但是下载东西一般要积分的(以前刚注册时花过十几块钱),可以发短信和登陆(每天一分)赚积分,所以我每天都要登陆 http://www.netyi.net/jsLoginStatus.aspx一次
由于抓包后是post登陆
考虑了几天,还是登陆不了,不知道错在哪里
echo off
curl -c Cookie_netyi.txt "http://www.netyi.net/jsLoginStatus.aspx"
curl -H "Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/x-icq, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*" -d "Content-Type: application/x-www-form-urlencoded UserName=***&Password=***&Submit.x=0&Submit.y=0" -b Cookie_netyi.txt http://www.netyi.net/jsLoginStatus.aspx?returnUrl=%2fjsLoginStatus.aspx%3fguid%3d0638a989-eeac-400c-b265-ed1df0c7114d >>netyi.htm
pause
Last edited by kioskboy on 2008-9-7 at 03:53 PM ]
http://www.netyi.net/ is a large and good e-book download website with a lot of materials uploaded by netizens. But generally, downloading things requires points (I spent more than ten yuan when I just registered). You can earn points by sending text messages and logging in (1 point per day), so I need to log in to http://www.netyi.net/jsLoginStatus.aspx once every day.
After packet capturing, it is post login. After thinking about it for a few days, I still can't log in. I don't know where the mistake is.
echo off
curl -c Cookie_netyi.txt "http://www.netyi.net/jsLoginStatus.aspx"
curl -H "Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/x-icq, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*" -d "Content-Type: application/x-www-form-urlencoded UserName=***&Password=***&Submit.x=0&Submit.y=0" -b Cookie_netyi.txt http://www.netyi.net/jsLoginStatus.aspx?returnUrl=%2fjsLoginStatus.aspx%3fguid%3d0638a989-eeac-400c-b265-ed1df0c7114d >>netyi.htm
pause
Last edited by kioskboy on 2008-9-7 at 03:53 PM ]
|
|
2008-8-28 19:41 |
|
|
kioskboy
初级用户
 
积分 153
发帖 103
注册 2008-3-27
状态 离线
|
『第 2 楼』:
使用 LLM 解释/回答一下
如果curl实现不了,用vbs脚本行吗,双击就能够很快登陆的
If curl can't be implemented, can a VBS script work? Double-clicking can quickly log in.
|
|
2008-9-2 19:32 |
|
|
HAT
版主
       
积分 9023
发帖 5017
注册 2007-5-31
状态 离线
|
『第 3 楼』:
使用 LLM 解释/回答一下
gxsanhen 兄在群里给出了一个autoit的解决方案。
不知能否用vbs实现,呼叫 slore 兄。
Brother gxsanhen provided an AutoIt solution in the group. I wonder if it can be implemented with VBS, calling Brother slore.
|

 |
|
2008-9-2 23:12 |
|
|
kioskboy
初级用户
 
积分 153
发帖 103
注册 2008-3-27
状态 离线
|
『第 4 楼』:
使用 LLM 解释/回答一下
autoit 不错,不过还要编译
在没有办法情况下,我才会考虑sendkeys 等类似模拟登陆的方法
curl应该能行吧,有没有人能告诉我用curl到底能登陆这个网站吗,行还是不行啊
AutoIt is good, but it still needs to be compiled.
In the case of no other way, I will consider methods like sendkeys for simulated login.
Curl should work, right? Is there anyone who can tell me whether using curl can log in to this website, yes or no?
|
|
2008-9-3 07:43 |
|
|
ngd
中级用户
   拟谷盗
积分 312
发帖 108
注册 2007-1-21
状态 离线
|
|
2008-9-3 20:29 |
|
|
slore
铂金会员
      
积分 5212
发帖 2478
注册 2007-2-8
状态 离线
|
『第 6 楼』:
使用 LLM 解释/回答一下
Set ie = CreateObject("Internetexplorer.Application")
ie.Navigate "http://www.netyi.net/jsLoginStatus.aspx"
ie.Visible = True
While ie.Busy or ie.ReadyState <> 4
Wend
ie.Document.form2.UserName.value = "slore"
ie.Document.form2.Password.value = "slorelee"
ie.Document.form2.submit
为什么不好好搜索,我是懒的写,如此简单的代码不要告诉我看
不懂。我是按我说的关键字搜索了下点了第2个连接,改了改url,和窗体名而已
就能用,我不知道为什么这么多人喜欢拿来主义……希望不是单单只是和我一样
懒,而是自己可以写出来,起码知道思路可以实现,毕竟这类脚本不是通用的,
可用的地方太少,所以这种针对性的脚本请自己写,不懂就学会搜索……
Set ie = CreateObject("Internetexplorer.Application")
ie.Navigate "http://www.netyi.net/jsLoginStatus.aspx"
ie.Visible = True
While ie.Busy or ie.ReadyState <> 4
Wend
ie.Document.form2.UserName.value = "slore"
ie.Document.form2.Password.value = "slorelee"
ie.Document.form2.submit
Why not search well? I'm too lazy to write. Such a simple code don't tell me you don't understand. I searched according to the keywords I said and clicked the second link, modified the url and form name, and it can be used. I don't know why so many people like to take things ready-made... I hope it's not just as lazy as me, but that they can write it themselves. At least know the idea to achieve it. After all, such scripts are not universal, and there are too few usable places. So please write such targeted scripts yourself. If you don't understand, learn to search...
|

S smile 微笑,L love 爱,O optimism 乐观,R relax 放松,E enthusiasm 热情...Slore |
|
2008-9-4 13:35 |
|
|
HAT
版主
       
积分 9023
发帖 5017
注册 2007-5-31
状态 离线
|
『第 7 楼』:
使用 LLM 解释/回答一下
slore兄终于出手了,学习。
Brother slore finally made a move, learn.
|

 |
|
2008-9-4 13:45 |
|
|
HAT
版主
       
积分 9023
发帖 5017
注册 2007-5-31
状态 离线
|
『第 8 楼』:
Re 6楼
使用 LLM 解释/回答一下
在登陆成功以后,能否再自动点一下“退出”?
我看了一下登陆后的网站代码,“退出”是一个超链接:
<td><img src="images/3003.gif" width="9" height="9"><a href="/quit.aspx?returnUrl=%2fjsLoginStatus.aspx%3fguid%3d0833ef28-c56b-411f-85a4-3ffdf4a81d56">退出</a></td>
After successful login, can you automatically click "Logout" again?
I looked at the website code after logging in. "Logout" is a hyperlink:
<td><img src="images/3003.gif" width="9" height="9"><a href="/quit.aspx?returnUrl=%2fjsLoginStatus.aspx%3fguid%3d0833ef28-c56b-411f-85a4-3ffdf4a81d56">Logout</a></td>
|

 |
|
2008-9-4 22:36 |
|
|
qwertl
中级用户
  
积分 461
发帖 243
注册 2007-10-14
状态 离线
|
『第 9 楼』:
使用 LLM 解释/回答一下
这样是不是也可登陆些不需验证码的邮箱了??
Does this also enable logging into some email boxes that don't require captchas??
|
|
2008-9-4 23:31 |
|
|
slore
铂金会员
      
积分 5212
发帖 2478
注册 2007-2-8
状态 离线
|
|
2008-9-5 11:33 |
|
|
HAT
版主
       
积分 9023
发帖 5017
注册 2007-5-31
状态 离线
|
|
2008-9-5 11:54 |
|
|
kioskboy
初级用户
 
积分 153
发帖 103
注册 2008-3-27
状态 离线
|
『第 12 楼』:
使用 LLM 解释/回答一下
谢谢大家,谢谢各位高手!
Thank you everyone, thank you all the experts!
|
|
2008-9-7 14:59 |
|