Re: vb expert help needed
Use a packet sniffer to look at the HTTP POST data when signing into the website. I use Ethereal since it's free and it's good.
Then just connect to the server and send the data. The POST data should follow the HTTP header.
Then you'll need to parse the response on the Winsock_DataArrival() event.
Re: vb expert help needed
Thanks Digi, I packet sniffed it.
I did the necessary response but it still does not login.
Re: vb expert help needed
Quote:
Originally Posted by Pouncer
Thanks Digi, I packet sniffed it.
I did the necessary response but it still does not login.
Does it do anything?
Re: vb expert help needed
Hi Hack, thank you fr posting. I hope you can help me.
Code:
Private Sub Form_Load()
winsock.Connect "www.sparkpea.net", 80
End Sub
Private Sub winsock_Connect()
Dim content As String
contet = "[email protected]&pass=mypass123&sublogin=1&submit=Sign+in"
winsock.SendData "POST /signin.php HTTP/1.1" & vbCrLf & _
"Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*" & vbCrLf & _
"Referer: http://www.sparkpea.net/signin.php" & vbCrLf & _
"Accept-Language: en-us" & vbCrLf & _
"Content-Type: application/x-www-form-urlencoded" & vbCrLf & _
"Accept-Encoding: gzip, deflate" & vbCrLf & _
"User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)" & vbCrLf & _
"Host: www.sparkpea.net" & vbCrLf & _
"Content-Length: " & Len(content) & vbCrLf & _
"Connection: Keep-Alive" & vbCrLf & _
"Cache-Control: no-cache" & vbCrLf & _
"Cookie: PHPSESSID=" & vbCrLf & vbCrLf & content & vbCrLf & vbCrLf
End Sub
Private Sub winsock_DataArrival(ByVal bytesTotal As Long)
Dim str As String
winsock.GetData (str)
Debug.Print str
End Sub
Its not printing anything. I packet sniffed it, and put the right headers in to try and login from the signin.php, but please, anything im doing wrong?
Re: vb expert help needed
I'm not sure if a type error or not but
you Dimmed 'content'
and the next line set 'contet' = to "........."
Re: vb expert help needed
Quote:
Originally Posted by re_turner_jr
I'm not sure if a type error or not but
you Dimmed 'content'
and the next line set 'contet' = to "........."
ty, changed it, still makes no difference.
it doesnt print anything or log me in :'(
Re: vb expert help needed
Put Option Explicit at the very top of your code. Then tell us if you get an error or not.
Edit: Also, debug the Winsock_Error() event, ie:
Code:
Private Sub Winsock1_Error(ByVal Number As Integer, Description As String, ByVal Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, CancelDisplay As Boolean)
Debug.Print Description
End Sub
Re: vb expert help needed
I am trying everything guys, it's not working at all for me. Could someone else please packet sniff to confirm i am doing it right?
Code:
Option Explicit
Private Sub Form_Load()
winsock.Connect "www.sparkpea.net", 80
End Sub
Private Sub winsock_Connect()
Dim content As String
content = "[email protected]&pass=mypass123&sublogin=1&submit=Sign+in"
winsock.SendData "POST /signin.php HTTP/1.1" & vbCrLf & _
"Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*" & vbCrLf & _
"Referer: http://www.sparkpea.net/signin.php" & vbCrLf & _
"Accept-Language: en-us" & vbCrLf & _
"Content-Type: application/x-www-form-urlencoded" & vbCrLf & _
"Accept-Encoding: gzip, deflate" & vbCrLf & _
"User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)" & vbCrLf & _
"Host: www.sparkpea.net" & vbCrLf & _
"Content-Length: " & Len(content) & vbCrLf & _
"Connection: Keep-Alive" & vbCrLf & _
"Cache-Control: no-cache" & vbCrLf & _
"Cookie: & vbCrLf & vbCrLf & content & vbCrLf & vbCrLf"
End Sub
Private Sub winsock_DataArrival(ByVal bytesTotal As Long)
Dim str As String
winsock.GetData (str)
Debug.Print str
End Sub
Private Sub winsock_Error(ByVal Number As Integer, Description As String, ByVal Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, CancelDisplay As Boolean)
Debug.Print Description
End Sub
it just does nothing
Re: vb expert help needed
is this not possible then guys?