Forum

> > CS2D > General > CS2D - Lua Exploits
Forums overviewCS2D overviewGeneral overviewLog in to reply

English CS2D - Lua Exploits

22 replies
Page
To the start Previous 1 2 Next To the start

old Re: CS2D - Lua Exploits

gotya2
GAME BANNED Off Offline

Quote
hotfix.
replaces all ";" with "' in parse, and in player name.

1
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

old Re: CS2D - Lua Exploits

KimKat
GAME BANNED Off Offline

Quote
user gotya2 has written
hotfix.
replaces all ";" with "' in parse, and in player name.

1
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
Confirmed! √
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.
To the start Previous 1 2 Next To the start
Log in to replyGeneral overviewCS2D overviewForums overview