Ulysses
Ulysses Stuff => General Chat & Help and Support => Topic started by: PossessiveDemon on May 10, 2016, 06:49:20 AM
-
This sub-forum is only for help or discussion regarding projects created by Team Ulysses. If you are requesting help, please search the forums FIRST to make sure your question has not already been answered. If you still need help, fill in the following information.
My ULib/ULX versions (run "ulx version" in console):
ULib v2.60
ULX v3.70
Game mode(s) I am having this problem on:
DarkRP
Lua errors shown in console, if any:
None.
I looked at the config.txt, and all it contained was "lol".
I changed the MOTD in game, and it added the MOTD option, but "lol" was still there.
After a reboot, my ULX settings go back to how they were.
I mean like, group inheritance, command access, etc.
I honestly don't know why..
Now, I know the title is the same as others, but I'm on about the MOTD, not sbox_ variables.
Thanks in advance.
-
You're saying that your server's data\ulx\config.txt file contained nothing but "lol"? But when you changed the MOTD setting, it contained 'lol' plus the newly changed MOTD line underneath it?
If that is the case, it sounds like you have a rouge addon that's messing with your config file (or someone has gotten access to your FTP/RCON). Does the MOTD setting go away (the config.txt gets reset to 'lol') on mapchange or when you reboot your server? One thing to try right away is to remove all of your addons except ULX/ULib, and see if the config file keeps getting reset to 'lol'.
-
You're saying that your server's data\ulx\config.txt file contained nothing but "lol"? But when you changed the MOTD setting, it contained 'lol' plus the newly changed MOTD line underneath it?
If that is the case, it sounds like you have a rouge addon that's messing with your config file (or someone has gotten access to your FTP/RCON). Does the MOTD setting go away on mapchange or when you reboot your server? One thing to try right away is to remove all of your addons except ULX/ULib, and see if the config file keeps getting reset to 'lol'.
To your first part, that's exactly right.
MOTD goes away after a mapchange/restart/etc.
I've tried editing it to the default config.txt, rebooted, and it goes back to "lol".
It's stressing me out, but as we speak, I'm downloading the files, rather than having to delete addons and then the player's times resetting.
Also, is there a file that keeps note of the player's playtime?
-
If you're talking about UTime data, that should be stored in the SQLLite database in the garrysmod root called 'sv.db', which contains a lot of other data (for DarkRP, etc.) as well.
You definitely have some bit of code that's resetting the ulx_config.txt. Workshop addons are harder to look through, but you can quickly search through addons in your garrysmod\addons folder- You can do a find in files to look for lines containing "file.write(", then filter those to see any lines that mention ulx_config.txt. Alternately, you could just keep disabling addons one by one until it stops overwriting the config. It's a tedious process, but do let us know what you find.
-
Also, is there a file that keeps note of the player's playtime?
Player data (including playtime recorded by UTime) is stored in the SQLite database file for Garry's Mod servers, or /sv.db.
ninja'd :(
-
If you're talking about UTime data, that should be stored in the SQLLite database in the garrysmod root called 'sv.db', which contains a lot of other data (for DarkRP, etc.) as well.
You definitely have some bit of code that's resetting the ulx_config.txt. Workshop addons are harder to look through, but you can quickly search through addons in your garrysmod\addons folder- You can do a find in files to look for lines containing "file.write(", then filter those to see any lines that mention ulx_config.txt. Alternately, you could just keep disabling addons one by one until it stops overwriting the config. It's a tedious process, but do let us know what you find.
UTime data, that's it, thank you.
I'm currently downloading 2.8GB of data, then I'm going to do a file search, as you said.
Would I just have to use the Windows search, or use an external program?
What would be best?
I would do that, but I have like, 20 players on at the moment.
-
Understandable. Windows Grep is a good tool that does the job efficiently: http://www.wingrep.com/, but you can also search windows for *.lua, drag all the files into your editor of choice (Notepad++, Sublime, etc.), then use their "find in all open files" feature.
Secondly, if you find the .gma files for your workshop addons, you can extract them manually and then search through them as well. See this guide here: https://steamcommunity.com/sharedfiles/filedetails/?id=431638110
There is an addon made by a member on the forums that can search your lua files on the server while it is running. It mainly detects specific lua keywords/functions that could potentially cause you problems. Unfortunately, it is not set up to detect file.write, which is what we are most likely looking for.
http://forums.ulyssesmod.net/index.php?topic=8477.0
I should also note that you may want to take a peek in your server's garrysmod\lua\autorun folder- there are a lot of files in there that are important for gmod, but somebody may have snuck something unwanted in there.
-
Understandable. Windows Grep is a good tool that does the job efficiently: http://www.wingrep.com/, but you can also search windows for *.lua, drag all the files into your editor of choice (Notepad++, Sublime, etc.), then use their "find in all open files" feature.
Secondly, if you find the .gma files for your workshop addons, you can extract them manually and then search through them as well. See this guide here: https://steamcommunity.com/sharedfiles/filedetails/?id=431638110
There is an addon made by a member on the forums that can search your lua files on the server while it is running. It mainly detects specific lua keywords/functions that could potentially cause you problems. Unfortunately, it is not set up to detect file.write, which is what we are most likely looking for.
http://forums.ulyssesmod.net/index.php?topic=8477.0
I should also note that you may want to take a peek in your server's garrysmod\lua\autorun folder- there are a lot of files in there that are important for gmod, but somebody may have snuck something unwanted in there.
I've gone through all of it, and there's nothing that relates to the config.txt.
Nothing that writes to it, and I've gone through the code of every .gma and through the lua/autorun; addons; data, etc.
This is stressing me out, aha.
-
Try searching for both "file.write" (with regular expressions disabled), as well as "fileWrite"
New plan: Modify the following lines in ULX code and change "config.txt" to something else, say "config_alt.txt"
https://github.com/TeamUlysses/ulx/blob/master/lua/ulx/base.lua#L95
https://github.com/TeamUlysses/ulx/blob/master/lua/ulx/data.lua#L74
Then, on mapchange, a new config file should be generated. See if that one persists and can have settings saved to it, and doesn't get overwritten with 'lol'. If that works, then you will need to dig deeper to find the call that overwrites the file. If the newly named file gets changed to "lol", then there might be a bug someone is abusing with the config saving code, and we'll need to look into it further.
One more thought- do you have sv_allowupload or sv_allowcslua enabled? I'm curious if one of your active/online players is causing trouble...
-
Try searching for both "file.write" (with regular expressions disabled), as well as "fileWrite"
New plan: Modify the following lines in ULX code and change "config.txt" to something else, say "config_alt.txt"
https://github.com/TeamUlysses/ulx/blob/master/lua/ulx/base.lua#L95
https://github.com/TeamUlysses/ulx/blob/master/lua/ulx/data.lua#L74
Then, on mapchange, a new config file should be generated. See if that one persists and can have settings saved to it, and doesn't get overwritten with 'lol'. If that works, then you will need to dig deeper to find the call that overwrites the file. If the newly named file gets changed to "lol", then there might be a bug someone is abusing with the config saving code, and we'll need to look into it further.
One more thought- do you have sv_allowupload or sv_allowcslua enabled? I'm curious if one of your active/online players is causing trouble...
Renaming the files worked.
I couldn't find anything code wise that was writing to the config.txt, or to the ULX folder at all.
I searched the .GMA's and I searched the server files.
I have another problem, though should I create a new thread for that?
-
PossesiveDemon, we only provided a work around.
You still have the same exact problem.
You have an exploit on your server.
It's likely possible it could affect more than just ULX.
Sorry for the bad news, but, you're not fixed.
-
PossesiveDemon, we only provided a work around.
You still have the same exact problem.
You have an exploit on your server.
It's likely possible it could affect more than just ULX.
Sorry for the bad news, but, you're not fixed.
Server is rebooting every 5 minutes.
5/10/2016 6:34:47 PM Stop SYSTEM 127.0.0.1 Monitoring (max query not responding) script
5/10/2016 6:34:50 PM Start SYSTEM 127.0.0.1 Monitoring (max query not responding) script
5/10/2016 6:34:56 PM Restart SYSTEM 127.0.0.1 Monitoring (max query not responding)
I'm adding every addon one by one.
I'm losing my patience.
-
I have another problem, though should I create a new thread for that?
It would be a good idea.
-
PossesiveDemon, we only provided a work around.
You still have the same exact problem.
You have an exploit on your server.
It's likely possible it could affect more than just ULX.
Sorry for the bad news, but, you're not fixed.
I removed everything, put it back in, and it's all good now.
Reboot issues were to do with the server.cfg, same as why the console wasn't working.
-
Did you ever happen to identify the rogue addon? What were your addons on the server before, compared to the addons on your server now?