Jump to content

  • Log in with Facebook Log in with Twitter Log In with Google Log In with Steam Sign In
  • Create Account
Photo

Simple lua protection

- - - - -

  • Please log in to reply
4 replies to this topic

#1
OFFLINE   Purple

Purple

    Advanced Member

  • Banned
  • PipPipPipPip
  • 157 posts
56
Getting Better

We all know there are always going to be some sort of exploit in ET always has always will so for me and my server what i've gone ahead and done just to prevent any way shape or form of guid spoofing mainly is a simple lua file that just whitelists your admin level.

--[[
Simple Lua protection by purple
]]

function et_InitGame( levelTime, randomSeed, restart )
	local SecName = "Simple Sec"
	et.RegisterModname(SecName)

end

function et_ClientConnect( clientNum, firstTime, isBot )
	local clientIp = et.Info_ValueForKey( et.trap_GetUserinfo(clientNum), "ip" )
	local banTime = "300y" -- change this to your ban duration
	local Reason = "Not Whitelisted." -- change this to your ban reason
	local adminLevel = "7" -- change this to your Admin level
	
	if et.G_shrubbot_level( clientNum ) == adminLevel and clientIp ~= "YOUR IP ADDRESS HERE" then -- put your ip address here.
		et.trap_SendConsoleCommand( et.EXEC_APPEND, "!ban ".. clientNum.." "..banTime.." "..Reason.." \n" ) --ban the user.
	end
	
end


#2
OFFLINE   hellreturn

hellreturn

    Management

  • Management
  • PipPipPipPip
  • 2693 posts
158
On the road to fame

http://mygamingtalk....category/8-lua/

 

Thank you :)



#3
OFFLINE   gaoesa

gaoesa

    Advanced Member

  • Management
  • PipPipPipPip
  • 4391 posts
341
Will become famous
  • LocationFinland

For silEnT mod, the mod built admin level protection (http://mygamingtalk....adminProtection) works both reliably and with less inconvenience than this.



#4
OFFLINE   twt_thunder

twt_thunder

    Regular Member

  • Members
  • PipPipPip
  • 68 posts
13
A step in the right direction
  • LocationNorway

good idea, but for me its useless as I have dynamic ip and it changes....



#5
OFFLINE   hellreturn

hellreturn

    Management

  • Management
  • PipPipPipPip
  • 2693 posts
158
On the road to fame

Could be helpful to NQ users or any mod which needs protection. ;) 






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users