Register for your free account! | Forgot your password?

Go Back   elitepvpers › Popular Games › Silkroad Online › SRO Coding Corner
You last visited: Today at 20:07

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



A Question About PHConnector

Discussion on A Question About PHConnector within the SRO Coding Corner forum part of the Silkroad Online category.

Reply
 
Old   #1
 
tarekwiz's Avatar
 
elite*gold: 0
Join Date: Apr 2012
Posts: 26
Received Thanks: 7
A Question About PHConnector

I Have Coded A Very Very Simple Program That when you Press A Button It Stands/sit But I wanted To Test it and i didn't know how to connect it to silkroad through PHConnector Here's My Code
PHP Code:
Imports System.Net.Sockets
Imports System
.Text

Public Class Form1
    
Public Client As Socket = New Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)
    
Dim clientSocket As New System.Net.Sockets.TcpClient()
    Private 
Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        
Try
            
Client.Connect("localhost", 15778)
        Catch 
ex As Exception
            MsgBox
("You Didnt Start PHConnecter")
            
Label1.Text = "Not Connected"
            
Label1.ForeColor = Color.Red

        End 
Try

        If 
Client.Connected = True Then
            Label1
.Text = "Connected"
            
Label1.ForeColor = Color.Green
            Button1
.Enabled = False

        End 
If
    
End Sub


    
Public Sub SendPacket(ByVal OpCode As String, ByVal sData As String, ByVal Enc As Boolean)
        
Using buffer As New IO.MemoryStream
            Using w 
As New IO.BinaryWriter(buffer)
                
w.Write(CUShort(0)) ' Size is 0 because it 'cannot' be known yet.
                w.Write(CUShort("&H" + OpCode)) ' 
Converts the string Opcode to a UInt16, reading the Opcode as a hexadecimal representation
                
If Enc = True Then
                    w
.Write(CUShort(3)) ' Encryption flag phConnector
                Else
                    w.Write(CUShort(1)) ' 
No-encryption flag phConnector
                End 
If
                For 
n = 0 To sData.Length / 2 - 1 ' Each byte is two characters and starting from 0 so decreasing by 1
                    w.Write(CByte("&H" & sData.Substring(n * 2, 2))) ' 
Writes every byte
                Next

                w
.BaseStream.Position = 0 ' Resets the position to write the size
                w.Write(CUShort(w.BaseStream.Length - 6)) ' 
Writes the size to the '0' placeholder
                w
.Flush() ' Makes sure the data is written to the buffer
                Client.Send(buffer.ToArray) ' 
Sends the buffer to the Socket
            End Using
        End Using
    End Sub

    
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        SendPacket
("704F", "04", False)
     
    
End Sub


    End 
Class 
And Here is my PHconnector's Ini File
PHP Code:
[phConnector]
IP=121.128.133.30
Port
=15778
LoginListenPort
=15778
WorldListenPort
=15777
BotPort
=22580
ServerBlock
=
ClientBlock=
Dev=0 
Thanks For Your Time

Solved But I Used Ibot's Hackshield But I Need To Know How do i redirect the Client To My Bot?? So I Can Send It Directly Or I Need The PhConnector's Source Code So I Can Find How

Solved But I Used Ibot's Hackshield But I Need To Know How do i redirect the Client To My Bot?? So I Can Send It Directly Or I Need The PhConnector's Source Code So I Can Find How

Please Close I Used NUCONNECTOR and Worked Perfectly
Now I Need To Find Out Movement Packets And How To Sendthem From VB>NET but Ill Search And if you know how Please Post How
Thanks
tarekwiz is offline  
Old   #2
 
elite*gold: 0
Join Date: Jul 2012
Posts: 2
Received Thanks: 0
please can u give me PH link ?
zakrialom is offline  
Reply


Similar Threads Similar Threads
Can't start phconnector.exe
04/26/2014 - SRO Private Server - 4 Replies
So, I wanted to bot on my friend's p-server and he gave me the advice to use KDbot. The problem is that I need to launch the file phconnector.exe and it won't start, instead I get the message "The program can't start bcause MSVCr100.dll is missing from your computer. Try reinstalling the program to fix this problem." So please, do anyone know how I can fix this?
Need HELP....PhConnector.exe Can't Run...
03/23/2012 - SRO Private Server - 2 Replies
When I'm Double Click PhConnector.exe it Said: phConnector01.exe-Bad Image The Application or DLL C:\WINDOWS\System32\MSVCR100.dll is not a valid Windows Image.Please Check This Against Your Installation Diskette How can i Fix This???HELP ME Please...
PHCONNECTOR FROM KDBOT
12/29/2011 - SRO Private Server - 6 Replies
i`m Using windows 7 ... when i try to open phconnector i got this error http://i41.tinypic.com/sg77gk.png i have installed net framework 4... and redistribute patch...any idea?
PhConnector keeps crashing!!!
12/15/2011 - SRO Private Server - 0 Replies
I'm using KD Bot and the PhConnector always crashes when there is 1 player near me,or too many mobs,I dont know what to do...I have to bot where there are like 3-4 mobs instead on big spots with 20 mobs. Any1 experiencing same problems? Any fixes?
Using SrProxy instead of phConnector
07/22/2011 - SRO Coding Corner - 8 Replies
Hello guys, I'm now using phConnector for a long time . I hate phconnector because it crashes tooo much and it makes my tests fail. While parsing groupspawn etc. , it gives random crashes. Even i dont login with my tool(bc maybe my tool makes phCon. crash) it still crashes.Dunno why. But im not able to send and receive packets with SrProxy as i tried to do it. I heard packets should be encrypted first ! But how :D I was sending packets each second with Srproxy + wpepro , i never had...



All times are GMT +1. The time now is 20:07.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.