Forum

> > CS2D > General > CS2D Dedicated Server Software
Forums overviewCS2D overviewGeneral overviewLog in to reply

English CS2D Dedicated Server Software

317 replies
Page
To the start Previous 1 2 3 4 515 16 Next To the start

old Re: CS2D Dedicated Server Software

Lee
Moderator Off Offline

Quote
Guest has written
you don't get it DC, EVERY game is hackable even the MOST secured game is HACKABLE..

Look at GunZ with it's top security system yet you see people hacking, CS2D Max might have a decent security but you cant say its impossible to hack, he was a CLIENT at another person's Dedi server and he DID was hacking, next time ill take a screenshot when I see him


Not if the variables are stored on the server side. In 0104, the variables are stored client side and sent to the server, which makes it extremely hackable. However if you want to hack max server, you'll have to be able to find a vulnerability in the server itself, then presume command over the server processing, before you can even hack the game. If you have to do all these first, it might just be easier to hack the root access to the real server itself.

Of course, specially crafted packets may still allow a few people to do speed hacks but the server will check the difference between distance/time to determine its velocity. Wall hacks are impossible seeing as collision detection is now on the server side (I Presume) as are ammo and weapon hacks (if money is on the server side as well) The server crashing is actually a fairly simple fix. The original cs2d uses the first 2 bytes to craft the PacketID and another variable. In this case it sends 250 twice to join, which is FAFA (this is the join code for 0104), translated into short it will be 64250. The max's first variable is a short, which has a range up to 65025, which is FE01 in Hex. However 0104's msgid check code is 255: (first byte of a short), which automatically goes over 65280. Thus creating a type overflow, which is probably unhandled resulting in the server crashing.

If anyone is interested in a temporary solution, I have created a script that restarts the server every time it crashes:

OS: Linux
Language: Python
Dependencies: Python standard libraries
Code:

import os
import time
import sys

while 1:
     
     def run(program, *args):
          pid = os.fork()
          if not pid:
          os.execvp(program, (program,) + args)
          return os.wait()[0]

     run("./cs2d_dedicated", "")
     time.sleep(1)

Instructions, put this in the dedicated directory, and then just run this script. Everytime that the server crashes, it sends an exit code back and the script will start over again.

old Re: CS2D Dedicated Server Software

DC
Admin Off Offline

Quote
what you say is not true. I'm not sure if you can crash a server this way but:
• a short ranges from 0 to 65535
• blitzmax does not crash on type overflows. it wraps the value (e.g.: 65538 in a short will be changed to 2 automatically!)

old Re: CS2D Dedicated Server Software

Lee
Moderator Off Offline

Quote
DC has written
what you say is not true. I'm not sure if you can crash a server this way but:
• a short ranges from 0 to 65535
• blitzmax does not crash on type overflows. it wraps the value (e.g.: 65538 in a short will be changed to 2 automatically!)


strange, C limits short types up to FE01, but then again Java only goes up to 32767

Reaper has written
Do you have to run this script with screen, or is it like a bouncer which will stay online, no matter if you close the console.


If you want to create a truely transparent process, use:

(python ./check.py > server.log 2>&1 &) &

at the sharp sign, this is a double background and will not close down after you sign off the console (basically double forking) and the stdout will be routed to server.log

But there's not point to this since you won't be able to see the actual data in real time, you might as well just use the screen utility.

old Re: CS2D Dedicated Server Software

Redemption
COMMUNITY BANNED Off Offline

Quote
@lee: I have no idea what you are saying but it seems right

@DC: This dedi program works pretty good. The only thing is that no joins my server

old Re: CS2D Dedicated Server Software

Guest

Quote
@leegao, a short type is made up of two bytes which makes 65536 different possibilities. but the range is a question of perspective, you can say a short type goes from 0-65535 or from -32767 - 32767 or however you wanna interpret it. fact is over the network only these two bytes will be sent which make the short type and cs2dmax will receive these two bytes as short type and interpret it however blitzmax does. if you wanna overflow a short type you probably would have to use more than two bytes but then its not a short type again. i dont think it works like this. i would say the server doesnt crash cuz of a overflow, blitzmax is pretty new and seems to be a pretty high language. i would say the server crashes because it somehow can't handle special values.

old Re: CS2D Dedicated Server Software

Redemption
COMMUNITY BANNED Off Offline

Quote
@3rr0r: Well sometimes it crashes because of uPraTe6, aka blackmopheus. He figured out that high ammount of data sent to the server at a consecutive rate makes it laggy and crashes it. Pretty smart for a hacker. Not sure if you were saying this because I didnt read the whole thing.

old Re: CS2D Dedicated Server Software

Lee
Moderator Off Offline

Quote
Actually I believe that this problem could have another source. The strings in Max are sent with preset length, however a forged packet with a FF as the length byte and only say 100 bytes in total would result in an index out of range error.

old Re: CS2D Dedicated Server Software

DC
Admin Off Offline

Quote
cs2dmax does not send one single string to the masterserver to register in the serverlist.

however I did not change the code for this. I don't know why it doesn't work with 0.1.0.7 on your server.

old Re: CS2D Dedicated Server Software

Guest

Quote
hmm doesnt work for me either... it says ot found when i do ./
and when i do it without ./ it says -bash wrong command or smth similar

i have suse 10.3 (i believe oO)
so help me plz... wanna set up a server

oh btw... i cant login/register... it says wrong password and when i try to register it says my name already taken
hell yeah

old Re: CS2D Dedicated Server Software

Lee
Moderator Off Offline

Quote
rumpel has written
hmm doesnt work for me either... it says ot found when i do ./
and when i do it without ./ it says -bash wrong command or smth similar

i have suse 10.3 (i believe oO)
so help me plz... wanna set up a server

oh btw... i cant login/register... it says wrong password and when i try to register it says my name already taken
hell yeah


First problem. You're obviously in the wrong directory, cd to the directory with the server in then run the server thru ./ execute.

Secondly, if it says name already taken then use a different name...

old Re: CS2D Dedicated Server Software

Guest

Quote
well

./cs2d_dedicated: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: Error 40

so how where can i dl them so installthem? and how ;:O

old Re: CS2D Dedicated Server Software

rumpel
User Off Offline

Quote
okay thanks works...
last question:
for a mapcyle i have to put more sv_map in the server.cfg, right?

// nvm found mapcycle.cfg

// the server doesnt show up in the lobby and yes its a fine server

//
okay got that too

so last thing: how can i run the server in background?

// okay got this too (did it with screen :s)
edited 3×, last 15.08.08 10:09:18 am

old Re: CS2D Dedicated Server Software

Lee
Moderator Off Offline

Quote
Also if you want to save the outputs of the server just reroute the stdout to a logfile (Basically add > log.txt after the ./executable_file)
To the start Previous 1 2 3 4 515 16 Next To the start
Log in to replyGeneral overviewCS2D overviewForums overview