15.03.2008, 10:16
Thanks Sneaky
I recently got told this about this "bug" that crashes the server.
Thank You Very Much.
I recently got told this about this "bug" that crashes the server.
Thank You Very Much.
Originally Posted by Pro
I dont understand why you wont release your sourcecode. A freind of mine just decompiled it, and explained that there is nothing in that code that could possibly encourage any hacking. He even stated that it was hard to understand, just a basic array with names in them, that checks when a player connects if that player has any of those names.
|
Originally Posted by James
how are we meant to trust this.. what if you are creating a security hole...
|
LINK REMOVED, APPERENTLY NO-ONE GIVES A FUCK ABOUT THERE SERVERS, AND KEEP GIVING LINKS OUT TO AN CERTAIN "TOOL" WHICH CAN VIEW THIS FILE'S SOURCE |
No. Im obviously not including the source for a reason. |
Originally Posted by !damo!spiderman
Actually.. I will explain exactly what happens and how to make a fix for your server because that script won't work for everyone
There are reserved names on windows which can't be used as filenames. When the sa-mp server tries writing a file with one of these words as the filename it freezes the server. This can be fixed by either not using name based filenaming system. Or by kicking the player from the server and making sure you don't write the file. I'm not posting these names here directly atm but I will ask Sneaky to release the source code |
Originally Posted by !damo!spiderman
It basically depends on why and when you create a file using a players name. Basically all that script does is kick them OnConnect if they have one of the many names which will crash a windows server when trying to create a file by that name. Some systems may create files OnPlayerDisconnect which is still called when someone is kicked. Basically the best solution for everyone is to use a different file naming convention than player names or prefix a extra letter to their name
|
#include <a_samp>
main(){}
new IllegalNames[][7] = {
"com1","com2","com3",
"com4","com5","com6",
"com7","com8","com9",
"lpt1","lpt2","lpt3",
"lpt4","lpt5","lpt6",
"lpt7","lpt8","lpt9",
"nul","clock$","aux",
"prn","con"
};
public OnPlayerConnect(playerid)
{
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
for(new i = 0; i < sizeof(IllegalNames); i++)
{
if(!strcmp(pName, IllegalNames[i] , true))
{
Kick(playerid);
}
}
return 0;
}