簡體網站的ResponseText亂碼

遇到了问题?请先进行搜索(中文和英文),然后在此提问

Moderators: tmplinshi, arcticir

au6
Posts: 7
Joined: 15 Aug 2015, 23:00

簡體網站的ResponseText亂碼

23 Jan 2019, 02:19

亂碼來自一款簡體網遊「傲視天地」,以下失敗過的方法:
1.使用FiddlerHexView查看回應文本,亂碼。
2.使用WinHttp.WinHttpRequest.5.1得到的ResponseText,並用ADODB.Stream轉成utf-8、GB2312...其他,亂碼。
3.曾經上某個編碼大全的網站把我的亂碼post上去,然後轉換成其他不同編碼頁的也都顯示亂碼,而且這網站也掛掉了連不上去。
4.StrGet、StrPut、tmplinshi大大的BinArr.ahk有試過幾次。

它的Content-Typeapplication/x-gzip-compressed,其實我在懷疑它是不能直接看,而非亂碼?要解壓縮這個x-gzip才行?
這問題困擾我很久了,本想自己解決但始終弄不好,只好一改潛水習慣浮上來求助。



Fiddler在HexView看到的亂碼
xœeŽM‚0…wžƒt¯…‹¡Ýy9Àh¬––t
èڋ[c4vßûIÞÛ<5è{"ÛàkQíJQ?c}W‹æxØî…V‰G—X'L¤*€ž˜±Ë 48|P“Ö·AÁ­¥‰|Š4c4ª¹4r>›UciÁ­;aà‹}Ç
äzP~ÿ¾ ‚ŠR¤


我的代碼

Code: Select all

#SingleInstance Off
#NoEnv
SetWorkingDir %A_ScriptDir%
SetBatchLines -1
#Include 網路.ahk                            ;功能類似tmplinshi神的Winhttp.ahk

Gui,Add,Edit,x10 y10 w800 h600 v紀錄,
Gui,Add,Button,x380 y615 w45 h23 g開始,開始
Gui,Show,AutoSize,測試
Return

開始:
Gui, Submit, NoHide
Header := {"Host":"s34.astd.37.com"
          ,"User-Agent":"Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0"
          ,"Accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8"
          ,"Accept-Language":"zh-TW,zh;q=0.8,en-US;q=0.5,en;q=0.3"
          ,"Connection":"keep-alive"
          ,"Cookie":"JSESSIONID=01DF5F587FAB8FE66BE9FAE3B1D2D73B"
          ,"Referer":"http://cdn04.aoshitang.com/astd_14-6-1/game/module/gameUI/GameUI.swf?version=12.20.15.38.30_zhangtaov1"
          ,"Content-type":"application/x-www-form-urlencoded"}
Url = http://s34.astd.37.com/root/chat.action?1548202362378
PostData := "length=30&channel=1%2C2%2C3%2C4%2C5%2C6%2C7%2C8%2C9&time=0"
For k,v in ["UTF-8","GB2312","GB18030","BIG5","Unicode"]
  紀錄 .= v ":`n" 網路.下載變數("POST",Url,Header,PostData,,v) "`n`n"
GuiControl,,紀錄,% 紀錄
Return

GuiClose:
ExitApp

Return to “请求帮助”

Who is online

Users browsing this forum: No registered users and 20 guests