Raised This Month: $ Target: $400
 0% 

Rcon tool for srcds.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Lis
Member
Join Date: Jul 2008
Old 12-29-2008 , 10:59   Rcon tool for srcds.
Reply With Quote #1

The main sourcecode is from:
http://developer.valvesoftware.com/wiki/Source_RCON_Protocol
exactly the
http://www.asyserver.com/~cstrike/rcon.c

Hello everyone.
I think the hlsw tool got a little overgrown to suite my needs.
1. I do not want to create an account just to enter "sm plugins refresh" some time.
2. I do not like programms who send unnecessary data over the net.
3. I hate programms who can only be configured after reading 20 pages of manuals.

So here is the alternative:

qry_rcon.bat:
Quote:
rem ------ Syntax ------
rem clircon -P"rcon_password" -a127.0.0.1 -p27015 command
rem ------ Notes ------
rem %* is a 'placeholder for every command' that is given to the batch file itselve.
rem It should not be removed. Therefore you can use the "run..." command from the starmenu.
rem ------ Usage ------
rem edit the qry_rcon.bat file and drag the batch file into the "run..." box which
rem can be found in the startmenu.
rem use qry_rcon.bat status to get the the status of your srcds server
clircon.exe -P"passwordhere" -aiphere -p27015 %*
pause
Attached Thumbnails
Click image for larger version

Name:	clircon_screen.jpg
Views:	1995
Size:	60.3 KB
ID:	35234  
Attached Files
File Type: zip clircon.zip (4.2 KB, 831 views)
File Type: zip clircon_src.zip (2.2 KB, 425 views)
__________________

Last edited by Lis; 12-29-2008 at 11:12.
Lis is offline
Send a message via ICQ to Lis Send a message via MSN to Lis
BAILOPAN
Join Date: Jan 2004
Old 12-29-2008 , 12:26   Re: Rcon tool for srcds.
Reply With Quote #2

Nice idea -- indeed HLSW is bloated and ugly.
__________________
egg
BAILOPAN is offline
abelp
Senior Member
Join Date: May 2008
Old 12-29-2008 , 13:16   Re: Rcon tool for srcds.
Reply With Quote #3

I wish something like this existed for my iphone.
Very Awesome..
abelp is offline
Lis
Member
Join Date: Jul 2008
Old 12-29-2008 , 18:05   Re: Rcon tool for srcds.
Reply With Quote #4

Thanks. A windows GUI version will follow soon. Right now I have some problems using MinGW with the new Windows SDK.

@abelp: Well I try to release a multios version. I never made any programms for the iphone but maybe i could release one.
__________________

Last edited by Lis; 12-29-2008 at 18:10.
Lis is offline
Send a message via ICQ to Lis Send a message via MSN to Lis
Jamster
Veteran Member
Join Date: Jun 2008
Old 12-29-2008 , 19:00   Re: Rcon tool for srcds.
Reply With Quote #5

Oh damn, this RULES. Thank you so much, what a great idea. Dumped this baby in my windows folder for global command line goodness.
Jamster is offline
dcx2
Senior Member
Join Date: Sep 2011
Old 07-29-2012 , 12:54   Re: Rcon tool for srcds.
Reply With Quote #6

I know this is an *old* post but I really want a tool like this to work for me. I tried to download and use it, but it doesn't seem to work for me. I modified the source a little bit so it would call WSAGetLastError() so I can see what the error was, instead of "connect() failed. no error". I am getting error code 10061, WSAECONNREFUSED. It didn't matter what IP I tried; WAN, LAN, or 127.0.0.1 all do not work.

I sometimes run two servers on the same laptop, and I noticed that it did in fact work with my second server, but only with the LAN IP. The major difference is that the working server does set sv_lan and does not set ip via the command line, while the server that I can't connect to does not set sv_lan and does set the ip to my WAN.

I even disabled my firewall to make sure it wasn't that.

One thing that I found odd was that the non-working server only has one UDP port open, while the working server has two UDP ports and a TCP port. Seeing that it was UDP I tried to switch the source over to UDP-based connectionless datagrams but that did not seem to help, recvfrom times out.

Does anyone by chance have any insight into what's causing the problem?

EDIT: removing the +ip command from the command-line parameters makes it so other ports show up for the srcds process. I think that's what was stopping me from connecting. But I'm not sure if I need that +ip for non-LAN people to connect to my server. And I can still only connect with the LAN address, not 127.0.0.1, and I'd prefer to use localhost in case my LAN IP changes.
__________________

Last edited by dcx2; 07-29-2012 at 13:00.
dcx2 is offline
tonihenkel
Junior Member
Join Date: Mar 2015
Old 01-04-2016 , 08:11   connect () failed .: Result too large
Reply With Quote #7

Hello there,
works for me the script for a long time. I use it for my Ark Survival Server for synchronization with the time, because he REALTIME runs (10h night, 14h day).
But since short I get this error message:

Quote:
C: \ Users \ Administrator \ Desktop \ sync Ark-Time> echo off
Run Script: 14:04
connect () failed .: Result too large
My script:

Quote:
echo off


set wartezeit=300
set kommando=SetTimeOfDay

:anfang:
set hour=%time:~0,2%
set min=%time:~3,2%
echo Ausfuehren Skript: %hour%:%min%
clircon -P"HIDDENHERE" -a194.97.164.176 -p27020 %kommando% %hour%:%min%
ping /n %wartezeit% localhost >nul
goto anfang
tonihenkel is offline
butaford
Member
Join Date: Mar 2011
Old 07-15-2017 , 10:22   Re: Rcon tool for srcds.
Reply With Quote #8

For Linux and FreeBSD
Take here: https://goo.gl/fzvSJr
Code:
#!/bin/sh
rconbin="/full/path/rcon/bin"
rcon="rconpassword"
ip="ip address"
port="port server"
##################################################################
scriptname="`basename "$0"`"
if [ ! -f $rconbin ]; then
        echo "Rcon bin file not found" 1>&2
        echo "Please check file path" 1>&2
        exit 1
fi
#if [ $# -eq 0 ]; then
if [ "x$*" = "x" ]; then
        echo "Usage: $scriptname  <command server>" 1>&2
        echo "Example: $scriptname status" 1>&2
    else
        $rconbin -P"$rcon" -a$ip -p$port "$*"
fi
Click image for larger version

Name:	screenshot.png
Views:	688
Size:	78.9 KB
ID:	164187Click image for larger version

Name:	screenshot_2.png
Views:	758
Size:	66.0 KB
ID:	164201
Attached Files
File Type: gz srcds_rcon_tool.tar.gz (17.9 KB, 454 views)

Last edited by butaford; 07-16-2017 at 03:56. Reason: add script
butaford is offline
raiden_it
Member
Join Date: Aug 2011
Old 03-12-2020 , 08:42   Re: Rcon tool for srcds.
Reply With Quote #9

@butaford
Did not worl on linux x64, CSS v5394425, SourceMod v1.10.0.6478, Metamod:Source v1.10.7-dev
Quote:
Illegal size -559038737
or
Quote:
connect() failed.: Connection refused
- then server self restarting
raiden_it is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:33.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode