PDA

View Full Version : Need Some Help


Kyle_Was_Here
06-22-2003, 10:50 PM
I don't think this is very advanced **** but the other forums we all ****ed up and i coulnd't post in them.

Basically what I need to do is connect to a website through a proxy using an msinet.ocx control. It's possible to do it with winsock but since im not sure what the header format for the website is (because the website changes) I've decided to do it through inet.

I've never proxy chained in the address bar but thats essentially what I need to do here.

pugamsish
06-23-2003, 10:04 AM
use winsock for the connection

Kyle_Was_Here
06-23-2003, 03:50 PM
Thats what I thought too but I'm thinking my header information is incorrect. This is what I have so far for wskSocket_connect(Index as integer):

strmsg = "Post " + script + " HTTP/1.0" + vbCrLf
strmsg = strmsg + "Accept: */*" + vbCrLf
strmsg = strmsg + "Referer: " + refer + vbCrLf
strmsg = strmsg + "Accept - Language: en -us" + vbCrLf
strmsg = strmsg + "Connection: Close" + vbCrLf
strmsg = strmsg + "User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90)" + vbCrLf
strmsg = strmsg + "Host: " + domain
wskSocket(Index).SendData strmsg

script is the page that im trying to get (http://www. domain/script)

everything else is obvious. i got these headers from an http interceptor program which is basically acts as a proxy on your computer then shows you the requests sent to it so the headers should be correct. They don't seem to work.

Kyle_Was_Here
06-24-2003, 02:25 AM
ok well i fixed the header info:

strMsg = "POST " & domain & " HTTP/1.1" & vbCrLf
strMsg = strMsg & "Host: " & host & vbCrLf
strMsg = strMsg & "Connection: close" & vbCrLf

That is the correct header info but im now getting a forceful rejection when i use winsock. If you could show me how to do it with inet it would work way better for this project.

nscopex
06-24-2003, 01:59 PM
Heres one. Should be commented enough.

Idbeholda
06-24-2003, 02:39 PM
or you can just get the **** from http://www.freevbcode.com or http://www.vbcode.com.

Kyle_Was_Here
06-24-2003, 05:37 PM
I believe that file came from vbcode.com if im not mistaken because I've seen it once. It should work but for some reason I get "connection forcefully rejected" which shouldnt happen. What I'm making is an id maker and it's fully functional except for proxy support. Without proxies you get banned after 15-16 ids.