Sign in to follow this  
Followers 0
CYBERZWERG

RCON Connection (BFP4F)

1 post in this topic

#1 ·  Posted (edited)

Hey guys, 

I'm trying to connect to a Server using RCON via TCP.. The Problem is when trying to send anything the Socket is being Closed!

Login Method = Seed+Password->MD5 (done manually)

My Code: 

#include <GUIConstantsEx.au3>
#include <MsgBoxConstants.au3>
#include <Crypt.au3>
#include <Clipboard.au3>
#include <IE.au3>
;Removed Login Credentials($IP, $PORT,$PASSWORD)
TCPStartup()
$socket = TCPConnect($IP,$PORT)
If $socket = -1 Then
    MsgBox(16, "Error", "Die Verbindung zum Server konnte nicht hergestellt werden!")
    Exit
EndIf

$FirstAnswer = TCPRecv($socket,1024)
MsgBox(0, "Connection Log:", $FirstAnswer)
$Hash = TCPRecv($socket,1024)
MsgBox(0, "Second Answer", $Hash)
$Hash = StringRight($Hash,18);  Cut off The Rest to get Hash
StringLeft($Hash,2)
MsgBox(0, "Showing Hash", $Hash) ; Show Hash
_ClipBoard_SetData($Hash)
TCPSend($socket,StringToBinary("login"&InputBox("Insert Hash+Password","Here:")))
MsgBox(0, "Result:",TCPRecv($socket,200));
TCPCloseSocket($socket)
TCPShutdown()
Output (MsGBoxes):
### Battlefield Play4Free ModManager RCON v8.5
### Digest Seed: foyKGdlAwLOvlGZD
foyKGdlAwLOvlGZD  
foyKGdlAwLOvlGZD
(Entering Hashed Seed+Password)
--> NO RESULT GIVEN!

Hope you understand my messy Code!

Any Help is appreciated!

P.S: Connections isnt Working even when Entering "help" instead of the login

Edited by CYBERZWERG

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  
Followers 0