Author | Message | Time |
---|---|---|
zeroirc | i wanna connect with Socks4 Proxy :My code: 'FA0 - 4000 wsD2GS.Senddata Chr(&H4) & Chr(&H1) & Chr(&HFA) & Chr(&H0) & Host & "zero" & Chr(&H0) :Recv: 00 5B FA 00 D3 E9 10 84 My code doesnt work.. :( Please help me | August 31, 2008, 3:37 AM |
Yegg | Not sure how different it would be to implement Socks4 as opposed to Socks5, but check this out: http://botdev.valhallalegends.com/documents/vbsocks5.html | August 31, 2008, 3:56 AM |
Ringo | [quote author=zeroirc link=topic=17630.msg179589#msg179589 date=1220153834] i wanna connect with Socks4 Proxy :My code: 'FA0 - 4000 wsD2GS.Senddata Chr(&H4) & Chr(&H1) & Chr(&HFA) & Chr(&H0) & Host & "zero" & Chr(&H0) :Recv: 00 5B FA 00 D3 E9 10 84 My code doesnt work.. :( Please help me [/quote] Look's abit iffy. 1st, the port 4000 should be 0xa00f? 2nd, the host variable, i'm assuming this is a string, like "1.2.3.4"? 3rd, erm, "zero"? try somthing like this: [code] Private Declare Function send Lib "ws2_32" (ByVal S As Long, ByRef Buf As Any, _ ByVal buflen As Long, ByVal Flags As Long) As Long Private Declare Function inet_addr Lib "ws2_32" (ByVal InAddress As String) As Long Private Declare Function htons Lib "ws2_32" (ByVal hostshort As Integer) As Integer Private Declare Sub RtlMoveMemory Lib "kernel32" (ByRef destination As Any, _ ByRef Source As Any, ByVal numbytes As Long) Dim bData(8) As Byte bData(0) = &H4 bData(1) = &H1 Call RtlMoveMemory(bData(2), htons(4000), 2) Call RtlMoveMemory(bData(4), inet_addr("1.2.3.4"), 4) bData(8) = &H0 Call send(wsD2GS.SocketHandle, bData(0), 9, 0) [/code] That should then send somthing like 04 01 0f a0 01 02 03 04 00 Then, if you get a 0x5B responce still it mean's you're request was rejected for what ever reassion. (assuming the port and IP were correct) hope this helps | August 31, 2008, 6:22 AM |
PiaNKA | I wrote a tutorial on this like 4 years ago. I'll post it when I get back home. | September 1, 2008, 7:03 PM |
zeroirc | Thank you Yegg, PiaNKA! (Thank you very much for your kindness. Ringo.) it does work! :) | September 8, 2008, 2:30 AM |
Yegg | [quote author=zeroirc link=topic=17630.msg179733#msg179733 date=1220841037] Thank you Yegg, PiaNKA! (Thank you very much for your kindness. Ringo.) it does work! :) [/quote] You should post your solution (even if it happens to look terrible) so that maybe future attempts by others can also be helped. | September 8, 2008, 4:19 AM |
Sixen | [quote author=Yegg link=topic=17630.msg179737#msg179737 date=1220847589] You should post your solution (even if it happens to look terrible) so that maybe future attempts by others can also be helped. [/quote] QFT. I'd actually like to see this. | September 8, 2008, 6:20 AM |
BreW | I don't get why anybody who knows how to read the official documentation would need an example along with it? Seems pretty straightforward. | September 8, 2008, 7:11 PM |
Sixen | [quote author=brew link=topic=17630.msg179741#msg179741 date=1220901075] I don't get why anybody who knows how to read the official documentation would need an example along with it? Seems pretty straightforward. [/quote] Didn't even know about that. Then again, I wasn't looking, the thread just caught my attention. | September 8, 2008, 11:23 PM |