Jump to content
Sign in to follow this  
Slaiochi

Server Emulation Program

Recommended Posts

Slaiochi

$TCPStart = TCPStartup()

$DASocket = TCPListen("127.0.0.1", 5000, 100)

If $DASocket = -1 Then Exit

GUICreate("Server", 300, 400)

$send = GUICtrlCreateButton("Send Packet", 15, 15, 100, 30)

$connections = GUICtrlCreateList("", 15, 60, 270, 330)

GUISetState()

While 1

$msg = GUIGetMsg()

If $msg = -3 Then

Exit

EndIf

If $msg = $send Then

HexSend("AA 00 13 7E 1B 43 4F 4E 4E 45 43 54 45 44 20 53 45 52 56 45 52 0A ")

EndIf

$ConnectedSocket = TCPAccept($DASocket)

If $ConnectedSocket >= 0 Then

GUICtrlSetData($connections, "Client Connected! - " & $ConnectedSocket)

EndIf

Sleep (100)

WEnd

Func HexSend($Hex)

$Str = StringSplit($Hex," ")

$Hex = ''

For $x = 1 to $Str[0]

If $Str[$x] Then

$Hex &= Chr((Dec($Str[$x])))

EndIf

Next

$Socket = TCPConnect("127.0.0.1", 80)

TCPSend($Socket, $Hex)

EndFunc

When the game connects, I alt+tab out of it, open WPE and attach it to my Server. I go to the server and click "Send Packet", WPE reports absolutely no packets being sent. I know it's because the server isn't opening a connection with the client, my question is how would I do this?

Thanks in Advance! :)

Edited by Slaiochi

Share this post


Link to post
Share on other sites
poisonkiller

Wait... I dont understand. Do you want to make a connection with a game? If yes, then answer should be, that its impossible. If no, then do you want to connect to your client? If yes, then could you post ur clients code?

Share this post


Link to post
Share on other sites
Slaiochi

If I had the client source I'd gladly post it. I'm trying to make an emulated server (private server) in autoit, for a very basic 2D RPG.

Share this post


Link to post
Share on other sites
poisonkiller

Ok, if u are trying to make a private server, then i cant help you. But I have some questions. How do you know that this RPG uses port 5000, how do u know commands what that game uses and how can you know if that game even uses TCP?

Edited by poisonkiller

Share this post


Link to post
Share on other sites
Slaiochi

I know it uses port 5000, here's the proof.

Posted Image

I used oleDbg to change the IP/Port It connects to, it's connecting to localhost : 5000

I know it uses TCP because I nearly got one working in C# before I almost ripped my hair out :)

Edited by Slaiochi

Share this post


Link to post
Share on other sites
Sardith

I know it uses port 5000, here's the proof.

Posted Image

I used oleDbg to change the IP/Port It connects to, it's connecting to localhost : 5000

I know it uses TCP because I nearly got one working in C# before I almost ripped my hair out :)

I bet you got it to work in C#... Good luck lol. Play Darkages much? Talk to SiLo or take it to DAhelp, not here.


[font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×