• Welcome to Valhalla Legends Archive.
 

VB Socks 5 Help

Started by BaDDBLooD, October 09, 2004, 08:39 AM

Previous topic - Next topic

BaDDBLooD

Upon connecting to the proxy ( this is in vb6 )



        With Buffer
            .InsertBYTE &H5
            .InsertBYTE &H1
            .InsertBYTE &H0
            .SendPacket frmMain.sckBNCS, SOCKS
        End With



When you Recieve Chr(&H5) & Chr(&H0)

YOu then send:



                With Buffer
                    .InsertBYTE &H5
                    .InsertBYTE &H1
                    .InsertBYTE &H0
                    .InsertBYTE &H1
                    .InsertDWORD inet_addr(Bot.Server)
                    .InsertWORD htons("6112")
                    .SendPacket frmMain.sckBNCS, SOCKS
                End With



Then when you Recieve Chr(&H5) & Chr(&H0) & Chr(&H0) & Chr(&H1) Your request was granted?

These are my Other failed responses:



        Case Chr(&H5) & Chr(&H1) & Chr(&H0) & Chr(&H1)
            AddChat frmMain.rtbChat, vbRed, "SOCKS 5: Request Failed, General Server Failure"
        Case Chr(&H5) & Chr(&H2) & Chr(&H0) & Chr(&H1)
            AddChat frmMain.rtbChat, vbRed, "SOCKS 5: Request Failed, Connection Not Allowed By Ruleset"
        Case Chr(&H5) & Chr(&H3) & Chr(&H0) & Chr(&H1)
            AddChat frmMain.rtbChat, vbRed, "SOCKS 5: Request Failed, Network Unreachable"
        Case Chr(&H5) & Chr(&H4) & Chr(&H0) & Chr(&H1)
            AddChat frmMain.rtbChat, vbRed, "SOCKS 5: Request Failed, Host Unreachable"
        Case Chr(&H5) & Chr(&H5) & Chr(&H0) & Chr(&H1)
            AddChat frmMain.rtbChat, vbRed, "SOCKS 5: Request Failed, Connection Refused"
        Case Chr(&H5) & Chr(&H6) & Chr(&H0) & Chr(&H1)
            AddChat frmMain.rtbChat, vbRed, "SOCKS 5: Request Failed, TTL Expired"
        Case Chr(&H5) & Chr(&H7) & Chr(&H0) & Chr(&H1)
            AddChat frmMain.rtbChat, vbRed, "SOCKS 5: Request Failed, Command Not Supported"
        Case Chr(&H5) & Chr(&H8) & Chr(&H0) & Chr(&H1)
            AddChat frmMain.rtbChat, vbRed, "SOCKS 5: Request Failed, Address type not supported"
        Case Else
            AddChat frmMain.rtbChat, vbRed, "SOCKS 5: Request Failed, Unknown Error"



I have always gotten:



        Case Else
            AddChat frmMain.rtbChat, vbRed, "SOCKS 5: Request Failed, Unknown Error"



When i try and connect to a proxy.

This is what i Recieve for responses



[8:43:57 AM] 0000:  05 00                                             ...............
[8:43:57 AM] SOCKS 5: Connected, Authenticating...
[8:43:57 AM] 0000:  05 00 00 01 42 77 8C 8C 11 E6                     ..BwŒŒæ......
[8:43:57 AM] SOCKS 5: Request Failed, Unknown Error





There are only two kinds of people who are really fascinating: people who know absolutely everything, and people who know absolutely nothing.

BaDDBLooD

I found the problem



Select Case Mid(Data, 1, 5)



Should be



Select Case Mid(Data, 1, 4)



In the packetlog



[8:43:57 AM] 0000:  05 00 00 01 42 77 8C 8C 11 E6                     ..BwŒŒæ......



05 *00* means Accepted, that ranges from 0x00 to 0x08
There are only two kinds of people who are really fascinating: people who know absolutely everything, and people who know absolutely nothing.