I am trying to connect my bot to hackshield that iBot and agBot are using ..
I managed to connect my bot to hackshield :
Code:
Public Client As Socket = New Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)
Client.Connect("127.0.0.1", 15777)
I think i have to make something like proxy in my bot but i rly don't know how :S
Thank you all in advance
Edit 1 :
I try this now but i got DC when Client is starting :
Code:
Dim serverSocket As New TcpListener(16000)
serverSocket.Start()
serverSocket.AcceptTcpClient()
I try now this , but still isn't working :
Code:
Public Client As Socket = New Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)
Private Sub SRO_Proj_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
' Connect to HS Server.
Client.Connect("127.0.0.1", 15777)
Dim serverSocket As New TcpListener(16000)
serverSocket.Start()
DoBeginAcceptTcpClient(serverSocket)
End Sub
' Thread signal.
Public Shared tcpClientConnected As New ManualResetEvent(False)
' Accept one client connection asynchronously.
Public Shared Sub DoBeginAcceptTcpClient(ByVal listener As TcpListener)
' Set the event to nonsignaled state.
tcpClientConnected.Reset()
' Start to listen for connections from a client.
Console.WriteLine("Waiting for a connection...")
' Accept the connection.
' BeginAcceptSocket() creates the accepted socket.
listener.BeginAcceptTcpClient(New AsyncCallback(AddressOf DoAcceptTcpClientCallback), listener)
' Wait until a connection is made and processed before
' continuing.
tcpClientConnected.WaitOne()
End Sub 'DoBeginAcceptTcpClient
' Process the client connection.
Public Shared Sub DoAcceptTcpClientCallback(ByVal ar As IAsyncResult)
' Get the listener that handles the client request.
Dim listener As TcpListener = CType(ar.AsyncState, TcpListener)
' End the operation and display the received data on
' the console.
Dim client As TcpClient = listener.EndAcceptTcpClient(ar)
' Process the connection here. (Add the client to a
' server table, read data, etc.)
Console.WriteLine("Client connected completed")
' Signal the calling thread to continue.
tcpClientConnected.Set()
End Sub 'DoAcceptTcpClientCallback






