I'm posting this with permission from
@cash wednesday
I created some code that acts as a Blacklist system for SteamID's and IP Addresses. I created this as the backdoor most likely has some code within to automatically remove bans, this should bypass that because it doesn't use banning, it just kicks them on the "PlayerInitialSpawn" stage, therefor there is no ban to removed by the backdoor.
The code should be placed within a .lua file within your server's "garrymods\lua\autorun"
Code:
--[[
This will kick the players upon joining, it will not ban them, so they cannot use a backdoor to bypass their ban.
You should add SteamID's / IP Addresses when you need to blacklist more players.
--]]
local function spawn( ply )
--[[
Add SteamID's to Blacklist here. The last SteamID on the list must !NOT! have , after it.
Each SteamID added must follow like:
"STEAM_0:0:12345678",
"STEAM_0:0:87654321",
"STEAM_0:0:11112222",
"STEAM_0:0:33330000"
--]]
local BlackList = {
// THESE ARE FAKE STEAMID'S AND SHOULD BE CHANGED/REMOVED.
"STEAM_0:0:12345678",
"STEAM_0:0:87654321",
"STEAM_0:0:11112222",
"STEAM_0:0:33330000"
}
--[[
Add IP Addresses to Blacklist here. The last IP Address on the list must !NOT! have , after it.
Each IP Address added must follow like:
"111.111.111.111",
"222.222.222.222",
"333.333.333.333",
"444.444.444.444"
--]]
local IPBlackList = {
// THESE ARE FAKE IP ADDRESSES AND SHOULD BE CHANGED/REMOVED.
"111.111.111.111",
"222.222.222.222",
"333.333.333.333",
"444.444.444.444"
}
// Change this if you want to change the Blacklist message. " \n " is a new line.
local BlacklistMsg = "\n\nYou cannot join this server.\nYou have been blacklisted"
// Don't touch anything below here. \\
if ply:SteamID(BlackList) then
ply:Kick(BlacklistMsg)
print( ply:GetName().." Attempted to join, but is blacklisted. \n" )
end
if ply:IPAddress(IPBlackList) then
ply:Kick(BlacklistMsg)
print( ply:GetName().." Attempted to join, but is blacklisted. \n" )
end
end
hook.Add( "PlayerInitialSpawn", "kick_blacklisted", spawn )
Alternative pastebin link:
https://pastebin.com/KXsAHqNW
It has a configurable Blacklist message, and it's easy to add SteamID's and IP's by adding them to the tables.
Hopefully this will help some.
If you have any questions feel free to ask.
Click to expand...