Home > Software engineering >  Login with XMLHTTP 7 k7k login result is verified by an dynamic WebBrowser
Login with XMLHTTP 7 k7k login result is verified by an dynamic WebBrowser

Time:09-27

With 7 k7k XMLHTTP login, and dynamic WebBrowser login validation results, directly on the code:
Dim web1 As Object
Private Sub Form_Load ()
The Set web1=Me. Controls. The Add (" SHELL. The EXPLORER. 2 ", "web1", Me)
Web1. Visible=True
Web1. Move 0, 0, 1020, 744,
Web1. Object. Silent=True
The Set XMLHTTP=CreateObject (" Microsoft. XMLHTTP ")
XMLHTTP. Open the "POST", "http://zc.7k7k.com/post_login", False
XMLHTTP. SetRequestHeader content-type ", "" application/x - WWW - form - urlencoded"
XMLHTTP. SetRequestHeader "Connection", "Keep Alive -
"XMLHTTP. Send (" username=tst7k01 & amp; Password=tst7k01 ")
Web1. Object. Navigate "http://www.7k7k.com", 0
The Set XMLHTTP=Nothing
End Sub
Source files can be downloaded pictures renamed. Rar won:

CodePudding user response:

Borrow treasure consult
"With XMLHTTP method POST purchase a"
I grab in IE the POST Data

Grab the Stream:
POST/transfer/buyLoanTransfer. Action HTTP/1.1
Accept: image/GIF image/jpeg, image/pjpeg, image/pjpeg, application/x - the rest - flash, application/msword, application/VND. - ms excel, application/VND. Ms powerpoint, application/xaml + XML, application/x - ms - xbap application/x - ms - application, */*
Referer: http://www.we.com/transfer/loanTransferDetail.action? TransferId=5406298
The Accept - Language: useful - cn
The user-agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; EmbeddedWB from 14.52: http://www.bsalsa.com/EmbeddedWB 14.52; . NET4.0 C; . NET4.0 E; The.net CLR 2.0.50727)
The content-type: application/x - WWW - form - urlencoded
The Accept - Encoding: gzip, deflate
Host: www.we.com
The Content - Length: 106
Connection: Keep Alive -
Cache-control: no - Cache
Cookie: Hm_lvt_16f9bb97b83369e62ee1386631124bb1=1450249491145250 637145250 754; Hm_lpvt_16f9bb97b83369e62ee1386631124bb1=1450251282; JSESSIONID=9 ea10e3e91720a09b3546e7908f968ce92cf6f1f97ff21d47875881214486db3; RrdLoginCartoon=rrdLoginCartoon; JforumUserInfo=% 2 bwck4bqhqxknb5eloovcvwhblgotcxhmxgtorrrwcnwlesxhe5xiij3l2wyz28xcjucukbje41zt % 0 avyrahhg1ksuaim2rgbwex9tmkuzkytmsrcosro6a % 2 bg % 3 d % % 0 a 3 d; IS_MOBLIE_IDPASS=true - true; Newuser=new

=on& CouponId=& amp; Something - contract=on& TransferId=ma3q7LyocdI % 3 d % d % 0 0 a & amp; CurrentPrice=48.08 & amp; Share=1 & amp; CountRatio=0.00

My VB code

PostData="https://bbs.csdn.net/topics/agree-contract=on&share=1"
XMLHTTP. Open the "POST", StrUrl, False
XMLHTTP. SetRequestHeader "Accept", "image/GIF image/jpeg image/pjpeg, image/pjpeg, application/x - the rest - flash, application/msword, application/VND. - ms excel, application/VND. Ms powerpoint, application/xaml + XML, application/x - ms - xbap application/x - ms - application, */*"
XMLHTTP. SetRequestHeader "Referer", StrUrl
XMLHTTP. SetRequestHeader "Accept - Language" and "useful - cn
"XMLHTTP. SetRequestHeader "the user-agent", "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; EmbeddedWB from 14.52: http://www.bsalsa.com/EmbeddedWB 14.52; . NET4.0 C; . NET4.0 E; The.net CLR 2.0.50727)
"XMLHTTP. SetRequestHeader content-type ", "" application/x - WWW - form - urlencoded"
XMLHTTP. SetRequestHeader "Accept - the Encoding", "gzip, deflate
"XMLHTTP. SetRequestHeader "Host", "www.we.com"
XMLHTTP. SetRequestHeader "Content - Length", Len (PostData)
XMLHTTP. SetRequestHeader "Connection", "Keep Alive -
"XMLHTTP. SetRequestHeader "cache-control", "no - Cache"
XMLHTTP. Send (PostData)

Do Until XMLHTTP. ReadyState=4
DoEvents
Loop

Can't the right to buy, can you help me modify the? Thank you

CodePudding user response:

Put a cookie, generally no problem

CodePudding user response:

refer to the second floor HotUs response:
add cookie generally have no problem

Ok thank you I try again
  • Related