Forum

> > CS2D > General > ATTENTION! Don't run maps you've downloaded!
Forums overviewCS2D overviewGeneral overviewLog in to reply

English ATTENTION! Don't run maps you've downloaded!

46 replies
Page
To the start Previous 1 2 3 Next To the start

old Re: ATTENTION! Don't run maps you've downloaded!

TimeQuesT
User Off Offline

Quote
This is caused by the map scanner. The map loader does not work correctly with maps using blending functions. Here's a version where I removed that code. :

DOWNLOAD

Info: It does not scan maps now. It only searchs for "other" files.
edited 1×, last 05.02.14 06:11:39 pm

old Re: ATTENTION! Don't run maps you've downloaded!

Sparty
Reviewer Off Offline

Quote
@user SaZ Dice: Wow thats alot of tabs opened

user DC Dont take this personal, but every Year,Months (dont know but Day) CS2D is getting Dangerous And people are leaving (i dont think you care or you do) cause of Hacks, I just wondering but are you going to update Cs2D every 2 year? for testing and stuff, BUT! only if you free to do so or when stranded III is released then you can?
anyway That was my opinion

old Re: ATTENTION! Don't run maps you've downloaded!

DC
Admin Off Offline

Quote
@user Sparty: I don't fully understand you. CS2D is updated more frequently than just every 2 years. Of course I will deal with this problem even though I'm busy with Stranded III.

btw.: There always were hackers and cheaters and there always will be. It's impossible to stop them. That's totally off-topic anyway.

old Re: ATTENTION! Don't run maps you've downloaded!

Flacko
User Off Offline

Quote
Correct me if I'm wrong but I think that when you start a CS2D server it first triggers Trigger_Start and all attached entities and then it parses server.lua
This means that any Lua-coded protection is useless (I'm not sure about map scripts though)

Anyways, this would be my solution (if it'd work)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
--stolen and modified from starkz
local disable = {
	debug = {},
	io = {},
	timer = function() end,
	loadstring = function() end,
	addhook = function() end,
	os = {
		clock = os.clock,
		date = os.date,
		difftime = os.difftime,
		getenv = os.getenv,
		setlocale = os.setlocale,
		time = os.time
	}
}

addhook("triggerentity","trigger_if")
function trigger_if(x,y)
	if entity(x, y, "typename") == "Trigger_If" then
		local backup = {}
		for k,v in pairs(disable) do
			backup[k] = _G[k]
			_G[k] = v
		end
		local status, value = pcall(loadstring('return '..entity(x, y, 'str0')))
		for k,v in pairs(backup) do
			_G[k] = v
		end
		if status and value then
			parse('trigger '..entity(x, y, 'trigger'))
		elseif not status then
			error('entity('..x..','..y..'): '..value)
		end
		return 1
	end
end
edited 2×, last 06.02.14 08:41:11 pm

Admin/mod comment

Added "addhook" to your disabled functions /Starkkz

old Re: ATTENTION! Don't run maps you've downloaded!

Starkkz
Moderator Off Offline

Quote
@user Flacko: Totally true. But there's still a problem, you can create a function with loadstring and call it with timers, (those globals you disabled would be activated when the timer is called).

Anyway, I had another similar update but I forgot to put it here.
Update >


I haven't made the protection to timer, but I'll do it soon.
To the start Previous 1 2 3 Next To the start
Log in to replyGeneral overviewCS2D overviewForums overview