Shut up DickHead
Forum
CS2D General CS2D - Lua ExploitsCS2D - Lua Exploits
22 repliesShut up DickHead
replaces all ";" with "' in parse, and in player name.
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
addhook("join","_join") function _join(id)	 	parse("setname "..id.." "..player(id,"name"):gsub("[;\"\']","")) end _parse = parse function parse(txt)	 	_parse(txt:gsub("[;\"\']","")) end
edited 1×, last 13.01.13 11:17:11 pm
gotya2 has written
Confirmed! hotfix.
replaces all ";" with "' in parse, and in player name.
replaces all ";" with "' in parse, and in player name.
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
addhook("join","_join") function _join(id)	 	parse("setname "..id.." "..player(id,"name"):gsub("[;\"\']","")) end _parse = parse function parse(txt)	 	_parse(txt:gsub("[;\"\']","")) end
This Lua script will prevent the average hacker from exploiting game servers with a direct approach Lua injection technique. I am quite sure this will prevent 75% of all Lua injections that occur in CS2D, so if you are concerned about security add this simple patch or try to implement it somehow into your RPG Lua scripts or what have you and your game server will become more or less better secured.