Local $sDomain = 'https://www.joinquant.com', $sPhone = '', $sPassWord = ''
$oHTTP = ObjCreate("WinHttp.WinHttpRequest.5.1")
$oHTTP.Open('GET', $sDomain, False)
$oHTTP.Send()
$oHTTP.Open('POST', $sDomain & '/user/login/doLogin', False)
$oHTTP.SetRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8')
$oHTTP.SetRequestHeader('Referer', $sDomain & '/user/login/index')
$oHTTP.Send('CyLoginForm%5Busername%5D=' & $sPhone & '&CyLoginForm%5Bpwd%5D=' & $sPassWord)
ConsoleWrite($oHTTP.ResponseText & @CRLF)
$oHTTP.Open('GET', $sDomain & '/user/msg/list?cate=sys', False)
$oHTTP.Send()
IF StringInStr(BinaryToString($oHTTP.ResponseBody, 4), '系统消息') Then MsgBox(0, '', 'success')
|