PDA

View Full Version : LIBCOD: q3dirtravfix & forcing allow downloading



croat1986
13th October 2018, 12:07
Hi guys i need little help.

I had problems with stealing ROCN from my servers - q3dirtrav exploit for COD2 reading my server.cfg and stealing servers RCON.

I know i must then change server.cfg to so something else , example changed server.cfg to mySRV.cfg



but


I aslo want to force players who are connecting to my server so they always have enabled Allowed Downloding with libcod.

i done this in LINUX console

g++ (multilib for x64)


dpkg --add-architecture i386
apt-get update
apt-get install gcc-multilib
apt-get install libmysqlclient-dev:i386
apt-get install g++-multilib

started COD2 server with this command


LD_PRELOAD=libcod2_1_3_nomysql.so ./cod2_lnxded_1_3_cracked +set dedicated 2 +set net_port 28960 +set fs_game pam +exec server.cfg

Question 1) With this LIBCOD 1_3_nomysql , will that fix q3dirtrav exploit (downloaded form here http://killtube.org/downloads/libcod/ )

Question 2) How to force allow Allowed Downloding with LIBCOD ???

kung foo man
13th October 2018, 14:02
I didn't update my libcod for years and the prebuilt binaries are even older

Just use vorons fork and build it from source, its pretty painless, since its only a few .cpp files: https://github.com/voron00/libcod

Once you are running vorons libcod, you can try to "hack" your own server with q3dirtrav and see if everything else still works

Polat
14th October 2018, 06:25
Don't put the rcon in your server.cfg, add the rcon to your startup line. That's better.


LD_PRELOAD=libcod2_1_3_nomysql.so ./cod2_lnxded_1_3_cracked +set dedicated 2 +set net_port 28960 +set fs_game pam +set rcon_password yoursuperpasswordhere

kung foo man
14th October 2018, 15:03
Only problem with that on a "multi user linux root server" is that "top" will show the complete command line of all servers (and hence the rcon password to all other users with shell access)

croat1986
17th October 2018, 13:38
THX guys i got it working.

But still need help with libcod commands, ... i know that libcode has some nice options for admins ( Real Goal's and reason for use codlib (https://killtube.org/showthread.php?2861-Real-Goal-s-and-reason-for-use-codlib) ) and i want to know commands how to use it .. ???

Is there some list of commands ... ?



how to rename player nickname ? ... renameclient: see name


If somebody aslo wants to protect their server ...

downloaded vrons libcod from https://github.com/voron00/libcod

extracted it to VPS folder with FTP

in Linux consocole entered path to folder:
CD /home/cod2/libcod-master

entered command
./doit.sh cod2_1_3

i got

libcod2_1_3.so (150 KB size) ( vorons-libcod2_1_3.zip (50.5 KB ZIP compressed) in attachment)

started server with
LD_LIBRARY_PATH=. LD_PRELOAD=libcod2_1_3.so ./cod2_lnxded_1_3_cracked +set dedicated 2 +set net_port 28960 +set fs_game pam +exec server.cfg

vanfreddy
18th October 2018, 17:57
hi i dont believe there is a real documetation except some older functions in https://znation.nl/cod4script/.i can show u how i get stuff working
for the list of all functions u have to look in this file https://github.com/voron00/libcod/blob/master/gsc.cpp everything under compile are the functions and if u wanna get a idea of how to use it u look at the compile name e.g. "renameclient" its under player ,if u look in the https://github.com/voron00/libcod/blob/master/gsc_player.cpp file there is the function renamclient and it wants a name "char *name;" so the function is called player renameclient(newname);.another example with setvelocity its also in the player.cpp file and it wnats a vector" vec3_t velocity;" so the function looks like this "player setvelocity((x,x,x));"

if there is nothing like this its mostly a get function which work like this varable = player/entity getfunction(); "vel = player getvelocity()"
i hope it helps u a little bit