AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Rcon Befehle senden

Ein Thema von Neuni · begonnen am 21. Mai 2005 · letzter Beitrag vom 24. Mai 2005
Antwort Antwort
Neuni

Registriert seit: 25. Feb 2004
815 Beiträge
 
Delphi 7 Personal
 
#1

Rcon Befehle senden

  Alt 21. Mai 2005, 14:30
Hi,
sicherlich kennen einige von euch Counterstrike. Ich möchte nun Rcon-Commands (zum map welchseln und so) an den Server senden. Im Internet hab ich das hier mal gefunden.
Zitat:
Remote App sends a UDP packet to the server on the server's port (e.g., 127.0.0.1:27015):

The packet should start with 4 consecutive bytes of 255 (32-bit integer -1) and the string:

"challenge rcon\n".

The server will respond to the requesting system on the purported remote IP address and port with four 255's and:

"challenge rcon number\n" where number is an unsigned int32 number.

To issue the actual rcon, the remote App then responds with a UDP packet containing 4 255s and:

"rcon number \"password\" rconcommands" where password is the rcon_password ( should be enclosed in quotes as noted so that multiple word passwords will continue to work ), number is the unsigned int32 number received from the server and rconcommands is the actual rcon command string.

If the remote App fails to send the appropriate challenge number, waits too long to send the challenge, or uses an invalid password more than a few times in the course of a few seconds, the remote App will be assumed to be malicious and the actual ip address used by the remote host will be permanently and automatically banned from the server (as with the addip command). You can use listip to see the list of banned ip addresses on a server.
Mein Problem ist nun, dass ich das irgendwie nicht hinbekomme mit diesem "unsigned int32 number" & co.

Das ganze soll hinterher mal über PHP laufen, aber wenn jemand weiß wie ich das in Delphi machen kann, wäre mir auch schon geholfen, da es ja vom Prinzip her gleich sein wird.

Kann mir bitte einer erklären wie ich das machen muss?
Danke schonmal.
  Mit Zitat antworten Zitat
Neuni

Registriert seit: 25. Feb 2004
815 Beiträge
 
Delphi 7 Personal
 
#2

Re: Rcon Befehle senden

  Alt 23. Mai 2005, 13:11
Keiner ne Idee?
  Mit Zitat antworten Zitat
Benutzerbild von ste_ett
ste_ett

Registriert seit: 10. Sep 2004
Ort: Dülmen
464 Beiträge
 
Delphi 7 Professional
 
#3

Re: Rcon Befehle senden

  Alt 23. Mai 2005, 13:34
Mit "four 255's" ist 4x ASCII 255 gemeint = ˙˙˙˙

Zum Server: '˙˙˙˙challenge rcon' + #10

Vom Server: '˙˙˙˙challenge rcon number + #10'
number = UINT_32 (0..4294967296) Diese Nummer ist sowas wie eine SessionId, die du für jeden Befehl mitsenden musst, z.B. 2515893

Zum Server: '˙˙˙˙number "dein rcon passwort" befehl' + #10
z.B. ˙˙˙˙2515893 "Dies ist mein Passwort" map de_storm
Stefan
"Geht nicht!" ist keine Fehlerbeschreibung und "Hab ich schon versucht!" keine Antwort!

Hey, it compiles! Ship it!
  Mit Zitat antworten Zitat
Neuni

Registriert seit: 25. Feb 2004
815 Beiträge
 
Delphi 7 Personal
 
#4

Re: Rcon Befehle senden

  Alt 23. Mai 2005, 14:10
Danke erstmal.
So, ich mache das nun so:
Code:
<?php

    $fp = fsockopen('udp://moppel.net', 27015, $errno, $error, 5) OR die($error."(".$errno.")");


    fwrite($fp, "˙˙˙˙challenge rcon\n");


    while(!feof($fp)) {
//LESEN
        $buffer = fread($fp, 1024);
        echo $buffer;
    }
    fclose($fp); // Verbindung beenden

?>
Das Verbinden klappt, aber das senden dauert ewig....nach 2min. sendezeit hab ichs aufgegeben

Wo kann den da ser Fehler sein, dass das Senden so lange dauert?
  Mit Zitat antworten Zitat
Neuni

Registriert seit: 25. Feb 2004
815 Beiträge
 
Delphi 7 Personal
 
#5

Re: Rcon Befehle senden

  Alt 24. Mai 2005, 20:24
*umguck* Keiner ne Idee?
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 22:41 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz