![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-08-09 17:38 |
47,811 topics / 349,896 posts / today 1 new / 48,254 members |
| DOS批处理 & 脚本技术(批处理室) » curl 登录一个网站 (注:原句“curl登陆一个网站”中“登陆”是“登录”的意思,按要求直接翻译为“curl 登录一个网站”) |
| Printable Version 1,592 / 11 |
| Floor1 kioskboy | Posted 2008-08-28 19:41 |
| 初级用户 Posts 103 Credits 153 | |
|
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 ] |
|
| Floor2 kioskboy | Posted 2008-09-02 19:32 |
| 初级用户 Posts 103 Credits 153 | |
|
If curl can't be implemented, can a VBS script work? Double-clicking can quickly log in.
|
|
| Floor3 HAT | Posted 2008-09-02 23:12 |
| 版主 Posts 5,017 Credits 9,023 | |
|
Brother gxsanhen provided an AutoIt solution in the group. I wonder if it can be implemented with VBS, calling Brother slore.
|
|
| Floor4 kioskboy | Posted 2008-09-03 07:43 |
| 初级用户 Posts 103 Credits 153 | |
|
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? |
|
| Floor5 ngd | Posted 2008-09-03 20:29 |
| 中级用户 Posts 108 Credits 312 | |
|
curl -c Cookie_netyi.txt -d "UserName=***&Password=***&Submit=登录" http://www.netyi.net/jsLoginStatus.aspx?returnUrl=%2fjsLoginStatus.aspx%3fguid%3dae1f8e99-d322-44b0-8288-abc376a6a154
::Use the correct account and password to log in, and save the login information in Cookie_netyi.txt |
|
| Floor6 slore | Posted 2008-09-04 13:35 |
| 铂金会员 Posts 2,478 Credits 5,212 | |
|
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... |
|
| Floor7 HAT | Posted 2008-09-04 13:45 |
| 版主 Posts 5,017 Credits 9,023 | |
|
Brother slore finally made a move, learn.
|
|
| Floor8 HAT | Posted 2008-09-04 22:36 |
| 版主 Posts 5,017 Credits 9,023 | |
|
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> |
|
| Floor9 qwertl | Posted 2008-09-04 23:31 |
| 中级用户 Posts 243 Credits 461 | |
|
Does this also enable logging into some email boxes that don't require captchas??
|
|
| Floor10 slore | Posted 2008-09-05 11:33 |
| 铂金会员 Posts 2,478 Credits 5,212 | |
|
```vb
Set ie = CreateObject("InternetExplorer.Application") ie.Navigate "http://www.netyi.net/quit.aspx?returnUrl=%2fjsLoginStatus.aspx" ie.Visible = True 'Set whether this IE object is visible here. While ie.Busy Or ie.ReadyState <> 4: Wend ie.Document.form2.UserName.value = "slore" ie.Document.form2.Password.value = "slorelee" ie.Document.form2.Submit While ie.Busy Or ie.ReadyState <> 4: Wend WSH.Sleep 1000 'This sentence is to let you see the successful login. Without this, the next sentence will exit directly. ie.Navigate "http://www.netyi.net/quit.aspx?returnUrl=%2fjsLoginStatus.aspx" While ie.Busy Or ie.ReadyState <> 4: Wend ie.Quit 'You can decide whether to have it or not according to the situation. You can understand what it means by yourself. ``` |
|
| Floor11 HAT | Posted 2008-09-05 11:54 |
| 版主 Posts 5,017 Credits 9,023 | |
|
Got it, thanks a lot!
|
|
| Floor12 kioskboy | Posted 2008-09-07 14:59 |
| 初级用户 Posts 103 Credits 153 | |
|
Thank you everyone, thank you all the experts!
|
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |