史萊姆論壇

史萊姆論壇 (http://forum.slime.com.tw/)
-   程式語言討論區 (http://forum.slime.com.tw/f76.html)
-   -   如何用查詢字串登入此網站 (http://forum.slime.com.tw/thread225465.html)

rank 2008-02-21 10:26 AM

如何用查詢字串登入此網站
 
http://www.emailcash.com.tw/default.asp?
如何用查詢字串登入這網站
我試了試都辦不到,雖然折衷方案是使用WebBrowser元件填單
但是我還是希望能用網址一次完成
:on_22:

mini 2008-02-21 03:17 PM

不知 查詢字串 是指什麼??
是指: 以一行網址字串來登入網站嗎...?

假設
送出一個 abc@n.n 與 123456 的帳號密碼

一般來說要以一行網址輸入達成登入網站的話
可以這麼寫
http://www.emailcash.com.tw/default.asp?userid=ch@n.n&password=123456
但結果是不行的

用 Ethereal 分析了一下
發現他是透過 cookie 方式
送出帳號密碼

所以可能無法單純的用 "查詢字串" 辦到

Ethereal 的擷取資訊
使用 GreenBrowser 瀏覽器
語法:

POST /default.asp? HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
Referer: http://www.emailcash.com.tw/default.asp?
Accept-Language: zh-tw
Content-Type: application/x-www-form-urlencoded
UA-CPU: x86
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Maxthon; GreenBrowser)
Host: www.emailcash.com.tw
Content-Length: 29
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: EmailCash=FontSize=small; ASPSESSIONIDQARRTSTQ=DNGJJPOAOMGHMIAAOGAPMLON; unid=; __utma=216336130.1604281599.1203573736.1203573736.1203573736.1; __utmb=216336130; __utmc=216336130; __utmz=216336130.1203573736.1.1.utmccn=(referral)|utmcsr=forum.slime.com.tw|utmcct=/thread225465.html#post1891571|utmcmd=referral
userid=abc@n.n&password=123456


HTTP/1.1 200 OK
Connection: Keep-Alive
Server: Microsoft-IIS/5.0
Date: Thu, 21 Feb 2008 06:19:15 GMT
X-Powered-By: ASP.NET
Content-Type: text/html; Charset=big5
Cache-control: private
Transfer-encoding: chunked
Content-Encoding: gzip
Set-Cookie: unid=; expires=Tue, 16-Dec-2008 16:00:00 GMT; path=/
Set-Cookie: EmailCash=FontSize=small; path=/

...


rank 2008-02-21 06:56 PM

那如果執意要這樣做是有法可破嗎?或是根本沒辦法?

飛行船大大 2008-02-29 08:35 AM

引用:

作者: rank (文章 1891571)
http://www.emailcash.com.tw/default.asp?
如何用查詢字串登入這網站
我試了試都辦不到,雖然折衷方案是使用WebBrowser元件填單
但是我還是希望能用網址一次完成
:on_22:

我正在找 ,雖然折衷方案是使用WebBrowser元件填單

請教 rank大大 可以發個實例 給我參考嗎 ??
~多謝~

cwvdavid 2008-02-29 05:24 PM

這個頁面, 在他們的後台,
是直接用Request去抓post的資料
(也就是說...不抓get的資料)

因此,在網址上加參數是無效的...
http://www.emailcash.com.tw/default....x&password=ooo

如果是用網頁去run...

可以自己在電腦建一個網頁...然後定期去呼叫...至於value要設什麼就自己決定吧
引用:

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=BIG5">
</head>
<body>
<FORM action="http://www.emailcash.com.tw/default.asp?" method="post">
帳號:<INPUT type="text" name="userid" size="20" class="lb1" style="font-size:12px"><br>
密碼:<INPUT type="password" name="password" size="10" class="lb1" style="font-size:12px"><br>
<INPUT type="submit" value="登入" class="lbu1" style="font-size:13px">
</FORM>
</body>
</html>


rank 2008-03-03 12:10 AM

感謝cwvdavid!
後來我用POST送可以了
用WebBrowser的Navigate把POST data填好送出去


所有時間均為台北時間。現在的時間是 08:51 AM

Powered by vBulletin® 版本 3.6.8
版權所有 ©2000 - 2024, Jelsoft Enterprises Ltd.

『服務條款』

* 有問題不知道該怎麼解決嗎?請聯絡本站的系統管理員 *


SEO by vBSEO 3.6.1