Small Exploit Fix.
voogru
Naturally Modified (ex. NS programmer) Join Date: 2002-10-31 Member: 1827Members, Retired Developer, NS1 Playtester, Contributor, Constellation
<div class="IPBDescription">For the "aliens becoming marines" thing</div> I knew about this bug for a while, it was just a matter of time before some moron figured it out.
I have had it fixed on my server ever since i found it and i emailed flayra quietly about the bug and i told him about it and how it was done.
for the server admins who want to fix this (who wouldnt want to fix it?) i released a small metamod plugin that prevents them from running the command if they are not a commander.
The full source and DLL are here: <a href='http://www.voogru.net/www/bugfix.zip' target='_blank'>http://www.voogru.net/www/bugfix.zip</a>
I dont have linux so i cant compile it on linux, however thats why the source is there so you can compile it on linux <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' valign='absmiddle' alt='smile.gif'><!--endemo-->
Post if you have any problems with it.
This is in reply to:
<a href='http://www.unknownworlds.com/forums/index.php?act=ST&f=8&t=16580' target='_blank'>http://www.unknownworlds.com/forums/in...=ST&f=8&t=16580</a>
<a href='http://www.unknownworlds.com/forums/index.php?act=ST&f=1&t=16593' target='_blank'>http://www.unknownworlds.com/forums/in...=ST&f=1&t=16593</a>
<a href='http://www.unknownworlds.com/forums/index.php?act=ST&f=26&t=16573&' target='_blank'>http://www.unknownworlds.com/forums/in...T&f=26&t=16573&</a>
I included the needed metamod files, so for windows it should compile right out of the box.
Edit: It also now includes a linux compile.
I have had it fixed on my server ever since i found it and i emailed flayra quietly about the bug and i told him about it and how it was done.
for the server admins who want to fix this (who wouldnt want to fix it?) i released a small metamod plugin that prevents them from running the command if they are not a commander.
The full source and DLL are here: <a href='http://www.voogru.net/www/bugfix.zip' target='_blank'>http://www.voogru.net/www/bugfix.zip</a>
I dont have linux so i cant compile it on linux, however thats why the source is there so you can compile it on linux <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' valign='absmiddle' alt='smile.gif'><!--endemo-->
Post if you have any problems with it.
This is in reply to:
<a href='http://www.unknownworlds.com/forums/index.php?act=ST&f=8&t=16580' target='_blank'>http://www.unknownworlds.com/forums/in...=ST&f=8&t=16580</a>
<a href='http://www.unknownworlds.com/forums/index.php?act=ST&f=1&t=16593' target='_blank'>http://www.unknownworlds.com/forums/in...=ST&f=1&t=16593</a>
<a href='http://www.unknownworlds.com/forums/index.php?act=ST&f=26&t=16573&' target='_blank'>http://www.unknownworlds.com/forums/in...T&f=26&t=16573&</a>
I included the needed metamod files, so for windows it should compile right out of the box.
Edit: It also now includes a linux compile.
Comments
That contains the fix, which is 9 lines of code.
<!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->void ClientCommand(edict_t *pEntity)
{
if(FStrEq(Cmd_Argv(0), "stopcommandermode") && strcmp(g_engfuncs.pfnInfoKeyValue(g_engfuncs.pfnGetInfoKeyBuffer(pEntity), "model" ), "commander"))
{
RETURN_META(MRES_SUPERCEDE);
}
RETURN_META(MRES_HANDLED);
}<!--c2--></td></tr></table><span class='postcolor'><!--ec2-->
Also, you will need the metamod source to compile it. I took out the metamod source since i am running out of space on my website.
But instead of mucking around with voogru's stuff and trying to adapt it, I just added it to spidermonkey in version 0.82 .
If you're a windows admin I would suggest sticking with voogru's since you won't have to put up with my banner when ppl join your server,
but if you're a linux admin and u just can't wait for the fix, then here u go.
Besides the banner, admins don't have to worry about spidermonkey mucking with anything else on their server, it doesn't do anything on it's own. It just adds serverside commands that can be found in the readme
P.S. Thanks for not adding anything extra (ie, banners).
<!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' valign='absmiddle' alt='tounge.gif'><!--endemo--> <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' valign='absmiddle' alt='tounge.gif'><!--endemo--> <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' valign='absmiddle' alt='tounge.gif'><!--endemo--> (nudge)
a makefile would be nice <!--emo&;)--><img src='http://www.unknownworlds.com/forums/html/emoticons/wink.gif' border='0' valign='absmiddle' alt='wink.gif'><!--endemo-->
Very nice work by the way.
a makefile would be nice <!--emo&;)--><img src='http://www.unknownworlds.com/forums/html/emoticons/wink.gif' border='0' valign='absmiddle' alt='wink.gif'><!--endemo--><!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
You will need the AdminMod install directory to compile AM scripts.
cd Adminmod/scripting/myscripts <--place the .sma file there
Edit the .sma to your likeings, Or leave it alone if your unsure.
then to compile it.
./compile name.sma
or
./compile_all
Lacking any error's, you should now have a .amx file in your Adminmod/scripting/mybinaries. Or ../mybinaries
Move or copy to your hlds_l/addons/adminmod/scripts
Make entry in your plugin.ini.
Reload the map.
FYI1: Admin_Reload, will only reload your ini or config files. It wont force a plugin reload until map reloads.
FYI2: You should ALWAYS use the -a switch when unzipping things in linux. IE: unzip -a name.zip.
EDIT:
LOL, OPS. Actually took a look at the attachment. This is not a adminmod plugin(see what happens when you make assumptions. Good thing I just had a shower. Foot doesn't taste so bad.). Its a metamod plugin. So although the above is how to compile adminmod plugins, it's not needed for this. This script is already compiled. Both win32 and *unix bins are included. Just place the .so file in your hlds_l/ns/addons/metamod/dlls. and edit your metamod.ini file.
gcc -I../includes -o 104fix.so voogru_api.cpp 2> ../help.txt
yes i did it with unzip -a
but i'm use to having a make file as well....i bet i'm missing a silly flag as i'm not use to running gcc for myself.
Update:
My site appears to be down so i put the file up on my game server.
<a href='http://www.voogru.net/www/bugfix.zip' target='_blank'>http://www.voogru.net/www/bugfix.zip</a>
I included the needed metamod files, so for windows it should compile right out of the box.
Update:
My site appears to be down so i put the file up on my game server.
<a href='http://www.voogru.net/www/bugfix.zip' target='_blank'>http://www.voogru.net/www/bugfix.zip</a>
I included the needed metamod files, so for windows it should compile right out of the box.<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
hahah, i'm an idiot
Ooops <!--emo&:0--><img src='http://www.unknownworlds.com/forums/html/emoticons/wow.gif' border='0' valign='absmiddle' alt='wow.gif'><!--endemo-->
forgot to include the dll in that zip, its on there now.
meta load bugfix
And the bugfix will load. But how do I get it to load automatically? I tried putting:
// Load Bugfix
meta load bugfix
At the end of the server.cfg, but it didn't work.
-Brendan
aka SandTyger
win32 dlls/bugfix.dll
But instead of mucking around with voogru's stuff and trying to adapt it, I just added it to spidermonkey in version 0.82 .
If you're a windows admin I would suggest sticking with voogru's since you won't have to put up with my banner when ppl join your server,
but if you're a linux admin and u just can't wait for the fix, then here u go.
Besides the banner, admins don't have to worry about spidermonkey mucking with anything else on their server, it doesn't do anything on it's own. It just adds serverside commands that can be found in the readme<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
Thank you! Great plugin!
Edit:
Hmm - i have many problems with it so i will try the other plugin.
Here is a mirror for the win one.
www.cofrfps.com/downloads/bugfix.zip
It would be kinda impossible for me to release the source and hide that in it.
That's why I added it to spidermonkey instead of just letting people who run linux servers wait it out till 1.04
This is definetly voogru's find, I'm totally out of the loop as far as bugs/exploits , had someone already managed to compile the bugfix for linux i wouldn't have bothered with adding it in to spidermonkey.
but that hasn't happened, so any server admin can install voogru's bugfix plugin for their windows server, or my spidermonkey plugin with the fix built in for their linux server.
So as long as the server admins are committed enough to their server to learn how to work metamod then it doesn't much matter how open it is
i sent you a IM on another thing i found and would like to see if you could add to this plugin.