https://www.youtube.com/watch?v=5NP8y63Ms4owhat is dat?! WDaFk is dat?!!
[Mod] anticheat [anticheat]
- rnd
- Member
- Posts: 220
- Joined: Sun Dec 28, 2014 12:24
- GitHub: ac-minetest
- IRC: ac_minetest
- In-game: rnd
Re: anticheat
1EvCmxbzl5KDu6XAunE1K853Lq6VVOsT
- ManElevation
- Member
- Posts: 896
- Joined: Tue Aug 02, 2016 22:04
- GitHub: ManElevation
- IRC: ManElevation
- In-game: ManElevation
- Location: Madrid,Spain
Re: anticheat
.......rnd wrote:https://www.youtube.com/watch?v=5NP8y63Ms4owhat is dat?! WDaFk is dat?!!
My Public Mods! Discord: Rottweiler Games#3368
- azekill_DIABLO
- Member
- Posts: 7507
- Joined: Wed Oct 29, 2014 20:05
- GitHub: azekillDIABLO
- In-game: azekill_DIABLO
- Location: OMICRON
- Contact:
Re: anticheat
xD i love dat!rnd wrote:https://www.youtube.com/watch?v=5NP8y63Ms4owhat is dat?! WDaFk is dat?!!
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!
DMs are always open if you want to get in touch!
-
- Member
- Posts: 818
- Joined: Tue Apr 14, 2015 01:59
- GitHub: raymoo
- IRC: Hijiri
- In-game: Raymoo + Clownpiece
Re: anticheat
It's been mentioned already in the thread, but it's not a GPL violation because rnd is the copyright author, he wasn't licensed the code to him under the GPL.Linuxdirk wrote:Exactly. It still violates the GPL terms.Naj wrote:Sources of "anticheat_routines.bin" are not distributed. It can't be called open source.azekill_DIABLO wrote:it's open source, it' under LGPL and you can find the public repo here : https://github.com/ac-minetest/anticheat/
As for obfuscation stuff, surely most people here agree (correct me if I am wrong) that the philosophical reasons for "open-source" include encouraging the study of the code or modification of the code. Obfuscation's purpose is to make it harder to study or modify the code, so that seems pretty directly opposed. If those principles don't include study or modification, I am curious to see what those principles are that are still useful. If "open-source" really is broad enough to not include those then rms was right about the naming being a mistake.
Every time a mod API is left undocumented, a koala dies.
Re: anticheat
Oh this is ridicules, I would recommend not using this mod as the author is deliberately trying to obfuscate what thier code is doing and requiring people to disable minetest security features but seriously decompiling the script and posting it here (perfectly legal according to the licensee the author chose) would be way faster and probably more productive then the discussion you are having, at least it would prove that compiling to bytecode is a poor form of obfuscation.
My mods: Mute, Extra TNT blast effectsnyancats_plus and More charcommands
Example CSM mods:Chatlog and Formspec editor
Example CSM mods:Chatlog and Formspec editor
- ExeterDad
- Member
- Posts: 1717
- Joined: Sun Jun 01, 2014 20:00
- In-game: ExeterDad
- Location: New Hampshire U.S.A
Re: anticheat
I have no problem running his code no questions asked. He is a well known and trusted person. His name is on the line here. And his reason for hiding the "brains" of this mod is valid.
If you want to use it, use it and be happy with the free solution he has provided. If you don't want to use it, just move on and let this thread be for support rather than debate.
If you want to use it, use it and be happy with the free solution he has provided. If you don't want to use it, just move on and let this thread be for support rather than debate.
HOMETOWN -Our little server. Keep the HOMETOWN chatter @ http://hometownserver.com - Our server map: http://media.hometownserver.com
- rnd
- Member
- Posts: 220
- Joined: Sun Dec 28, 2014 12:24
- GitHub: ac-minetest
- IRC: ac_minetest
- In-game: rnd
Re: anticheat
Im not regretting the obfuscation - just the responses are worth all of it - educational/hilarious. Just shows most people who pretend to be "experts" are just too lazy to do the work of learning how stuff works/checking stuff and trust "authority" instead - but they have no problem playing "experts" on stuff they dont really understand.
I think i got enough "insight" from comments now and will now disclose the source for anticheat - not that it will help cheaters since checks are randomized (yup, you all got trolled for the sake of me having fun reading forum responses).
anticheat_source.lua
I expect all those "experts" to be very LOUD now and keep explaining how "potentially malicious" my code is
This all explains it - this kind of ignorant, fake expert, lazy attitude = "Trump 2020!" :)
I think i got enough "insight" from comments now and will now disclose the source for anticheat - not that it will help cheaters since checks are randomized (yup, you all got trolled for the sake of me having fun reading forum responses).
anticheat_source.lua
Code: Select all
-- DO NOT INCLUDE THIS WITH SOURCES
-- THIS will produce anticheat_routines.bin.
-- instructions:
-- 1. uncomment in init.lua around line 80:
-- dofile(minetest.get_modpath("anticheat").."/anticheat_source.lua")
-- just run server and .bin is generated. Then comment it again.
-- how to use in code(already done):
-- local anticheat_routines=loadfile(minetest.get_modpath("anticheat").."/anticheat_routines.bin")
-- check_noclip, check_fly, check_player = anticheat_routines(minetest,cheat);
local anticheat_routines = function(minetest,cheat, CHECK_AGAIN, punish_cheat)
-- DETAILED NOCLIP CHECK
local check_noclip = function(pos)
local nodename = minetest.get_node(pos).name;
local clear=true;
if nodename ~= "air" then -- check if forbidden material!
clear = cheat.nodelist[nodename]; -- test clip violation
if clear == nil then clear = true end
end
if not clear then -- more detailed check
local anodes = minetest.find_nodes_in_area({x=pos.x-1, y=pos.y-1, z=pos.z-1}, {x=pos.x+1, y=pos.y+1, z=pos.z+1}, {"air"});
if #anodes == 0 then return false end
clear=true;
end
return clear;
end
-- DETAILED FLY CHECK
local check_fly = function(pos) -- return true if player not flying
local fly = (minetest.get_node(pos).name=="air" and minetest.get_node({x=pos.x,y=pos.y-1,z=pos.z}).name=="air"); -- prerequisite for flying is this to be "air", but not sufficient condition
if not fly then return true end;
local anodes = minetest.find_nodes_in_area({x=pos.x-1, y=pos.y-1, z=pos.z-1}, {x=pos.x+1, y=pos.y, z=pos.z+1}, {"air"});
if #anodes == 18 then -- player standing on air?
return false
else
return true
end
end
local round = function (x)
if x > 0 then
return math.floor(x+0.5)
else
return -math.floor(-x+0.5)
end
end
--main check routine
local check_player = function(player)
local name = player:get_player_name();
local privs = minetest.get_player_privs(name).kick;if privs then return end -- dont check moderators
if cheat.watcher[name] then return end -- skip checking watchers while they watch
local pos = player:getpos(); -- feet position
pos.x = round(pos.x*10)/10;pos.z = round(pos.z*10)/10; -- less useless clutter
pos.y = round(pos.y*10)/10; -- minetest buggy collision - need to do this or it returns wrong materials for feet position: aka magic number 0.498?????228
if pos.y<0 then pos.y=pos.y+1 end -- weird, without this it fails to check feet block where y<0, it checks one below feet
local nodename = minetest.get_node(pos).name;
local clear=true;
if nodename ~= "air" then -- check if forbidden material!
clear = cheat.nodelist[nodename]; -- test clip violation
if clear == nil then clear = true end
end
local fly = (nodename=="air" and minetest.get_node({x=pos.x,y=pos.y-1,z=pos.z}).name=="air"); -- prerequisite for flying, but not sufficient condition
if cheat.players[name].count == 0 then -- player hasnt "cheated" yet, remember last clear position
cheat.players[name].clearpos = cheat.players[name].lastpos
end
-- manage noclip cheats
if not clear then -- player caught inside walls
local moved = (cheat.players[name].lastpos.x~=pos.x) or (cheat.players[name].lastpos.y~=pos.y) or (cheat.players[name].lastpos.z~=pos.z);
if moved then -- if player stands still whole time do nothing
if cheat.players[name].count == 0 then cheat.players[name].cheatpos = pos end -- remember first position where player found inside wall
if cheat.players[name].count == 0 then
minetest.after(CHECK_AGAIN,
function()
cheat.players[name].count = 0;
if not check_noclip(pos) then
punish_cheat(name)-- we got a cheater!
else
cheat.players[name].count = 0; -- reset
cheat.players[name].cheattype = 0;
end
end
)
end
if cheat.players[name].count == 0 then -- mark as suspect
cheat.players[name].count = 1;
cheat.players[name].cheattype = 1;
end
end
end
-- manage flyers
if fly then
local fpos;
fly,fpos = minetest.line_of_sight(pos, {x = pos.x, y = pos.y - 4, z = pos.z}, 1); --checking node maximal jump height below feet
if fly then -- so we are in air, are we flying?
if player:get_player_control().sneak then -- player sneaks, maybe on border?
--search 18 nodes to find non air
local anodes = minetest.find_nodes_in_area({x=pos.x-1, y=pos.y-1, z=pos.z-1}, {x=pos.x+1, y=pos.y, z=pos.z+1}, {"air"});
if #anodes < 18 then fly = false end
end -- if at this point fly = true means player is not standing on border
if pos.y>=cheat.players[name].lastpos.y and fly then -- we actually didnt go down from last time and not on border
-- was lastpos in air too?
local lastpos = cheat.players[name].lastpos;
local anodes = minetest.find_nodes_in_area({x=lastpos.x-1, y=lastpos.y-1, z=lastpos.z-1}, {x=lastpos.x+1, y=lastpos.y, z=lastpos.z+1}, {"air"});
if #anodes == 18 then fly = true else fly = false end
if fly then -- so now in air above previous position, which was in air too?
if cheat.players[name].count == 0 then cheat.players[name].cheatpos = pos end -- remember first position where player found "cheating"
if cheat.players[name].count == 0 then
minetest.after(CHECK_AGAIN,
function()
cheat.players[name].count = 0;
if not check_fly(pos) then
punish_cheat(name)-- we got a cheater!
else
cheat.players[name].count = 0;
cheat.players[name].cheattype = 0;
end
end
)
end
if cheat.players[name].count == 0 then -- mark as suspect
cheat.players[name].count = 1;
cheat.players[name].cheattype = 2;
end
end
end
end
end
cheat.players[name].lastpos = pos
end
return check_noclip, check_fly, check_player;
end
-- this produces compiled version of source
local out = io.open(minetest.get_modpath("anticheat").."\\anticheat_routines.bin", "wb");
local s = string.dump(anticheat_routines);
out:write(s);
out:close()
This all explains it - this kind of ignorant, fake expert, lazy attitude = "Trump 2020!" :)
1EvCmxbzl5KDu6XAunE1K853Lq6VVOsT
- azekill_DIABLO
- Member
- Posts: 7507
- Joined: Wed Oct 29, 2014 20:05
- GitHub: azekillDIABLO
- In-game: azekill_DIABLO
- Location: OMICRON
- Contact:
Re: anticheat
There was no problem, actually. WHy no one watched the code (me inclued)?
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!
DMs are always open if you want to get in touch!
Re: anticheat
Just for the sake of openness, can you post the password to the encrypted zip file, so we can at least verify that the file you posted before actually contains the same source, and you haven't changed a few bits here or there?rnd wrote:Im not regretting the obfuscation - just the responses are worth all of it - educational/hilarious. Just shows most people who pretend to be "experts" are just too lazy to do the work of learning how stuff works/checking stuff and trust "authority" instead - but they have no problem playing "experts" on stuff they dont really understand.
I think i got enough "insight" from comments now and will now disclose the source for anticheat - not that it will help cheaters since checks are randomized (yup, you all got trolled for the sake of me having fun reading forum responses).
-
- Member
- Posts: 818
- Joined: Tue Apr 14, 2015 01:59
- GitHub: raymoo
- IRC: Hijiri
- In-game: Raymoo + Clownpiece
Re: anticheat
Nobody was claiming that you included malicious code, only that you could have done it. Now that you've revealed the code, people can see it and verify that there isn't anything malicious. Everything is working as intended.
Every time a mod API is left undocumented, a koala dies.
Re: anticheat
Not entirely, because he has posted several revisions of the file online and it's entirely possible that some of them contained malicious code before:Byakuren wrote:Nobody was claiming that you included malicious code, only that you could have done it. Now that you've revealed the code, people can see it and verify that there isn't anything malicious. Everything is working as intended.
https://github.com/ac-minetest/antichea ... utines.bin
So for the sake of openness, I strongly suggest not to take rnd's word for it, and always verify yourself that you're not running untrusted code. Especially from people who give you semi- or not obfuscated binaries.
Re: anticheat
could someone try and verify if the code posted is indeed the code used to compile the binary?
My mods: Mute, Extra TNT blast effectsnyancats_plus and More charcommands
Example CSM mods:Chatlog and Formspec editor
Example CSM mods:Chatlog and Formspec editor
- rnd
- Member
- Posts: 220
- Joined: Sun Dec 28, 2014 12:24
- GitHub: ac-minetest
- IRC: ac_minetest
- In-game: rnd
Re: anticheat
UPDATE:
- first post
- improved "code readability" - aka no more binary
Learn how to use decompiler and how lua byte code works and check it yourself or just don't post your "opinions". Nothing is hidden its all available from git commit history.
- first post
- improved "code readability" - aka no more binary
Indeed. And to all those "but but but... previous code could be potentially malicious" out there:Byakuren: Nobody was claiming that you included malicious code, only that you could have done it. Now that you've revealed the code, people can see it and verify that there isn't anything malicious. Everything is working as intended.
Learn how to use decompiler and how lua byte code works and check it yourself or just don't post your "opinions". Nothing is hidden its all available from git commit history.
Whats stopping you from doing that yourself? Also in first post there is now password to previous zip file, which you can find in git history.red-001 could someone try and verify if the code posted is indeed the code used to compile the binary?
1EvCmxbzl5KDu6XAunE1K853Lq6VVOsT
Re: anticheat
Kudos for doing this. Much appreciated.rnd wrote:Also in first post there is now password to previous zip file, which you can find in git history.
Re: anticheat
What does happens, if a player is falling down?
Does this is flying for this anticheat mod?
Does this is flying for this anticheat mod?
- rnd
- Member
- Posts: 220
- Joined: Sun Dec 28, 2014 12:24
- GitHub: ac-minetest
- IRC: ac_minetest
- In-game: rnd
Re: anticheat
It is 'smart' enough to figure out its falling DOWN, 'falling NOT DOWN' however is considered cheat
1EvCmxbzl5KDu6XAunE1K853Lq6VVOsT
- sorcerykid
- Member
- Posts: 1847
- Joined: Fri Aug 26, 2016 15:36
- GitHub: sorcerykid
- In-game: Nemo
- Location: Illinois, USA
Re: anticheat
I've known rnd for a long time, and I have no doubts that he would never include malicious code (at least not purpsosefully) in mods that he releases to the general public. That's not to suggest that binaries are an acceptable distribution method or even that it's wise to blindly trust mod authors that obfuscate code. I'm just speaking for rnd's character. And as both a server operator and fellow developer, I'm confident that he would never risk his reputation in the community all for the sake of some hidden, personal agenda.
- rubenwardy
- Moderator
- Posts: 6978
- Joined: Tue Jun 12, 2012 18:11
- GitHub: rubenwardy
- IRC: rubenwardy
- In-game: rubenwardy
- Location: Bristol, United Kingdom
- Contact:
Re: anticheat
This mod doesn't really work. You can fly for a long time without being spotted, and when it does spot you it doesn't penalise you in any way
- rnd
- Member
- Posts: 220
- Joined: Sun Dec 28, 2014 12:24
- GitHub: ac-minetest
- IRC: ac_minetest
- In-game: rnd
Re: [Mod] anticheat [anticheat]
Its not all that BLACK and WHITE is it? Its like : this mod works in 90% of 'fly' and fails to catch '10%' of fly, but on the long run it will catch remaining 10% cause of randomness of it. Note that is far from 'trivial' to make 'fly' detect thatThis mod doesn't really work.
1. does detect genuine flyers
2. doesn't penalize occasional big jumps/teleports
3. (probably biggest issue) light on resources, even with 50+ players
4. Since this is open source you are welcome to improve to get 91% detection. Are you that good? :) If you are, here are some spots to watch for:
-- simple jumping up is not fly
-- jumping in any way and then falling down is not fly
-- glitching up glitch ladders is not fly
-- standing far out on edge and jumping is not fly
-- jumping (far) over deep holes is not fly ( getting kinda hard now isnt it?)
-- using trampoline to jump up 10 blocks is not fly
-- using teleport to teleport up in air is not fly
Well what you want me to do? In the small false fly detect percentage it would be better to kill possibly innocent player? I think not, but message is still good cause it helps spot cheaters.it does spot you it doesn't penalise you in any way
Next time could you please describe what 'exactly' doesnt work cause this was not helpful in any way.
1EvCmxbzl5KDu6XAunE1K853Lq6VVOsT
- sorcerykid
- Member
- Posts: 1847
- Joined: Fri Aug 26, 2016 15:36
- GitHub: sorcerykid
- In-game: Nemo
- Location: Illinois, USA
Re: anticheat
Alright then, let's use the anti-cheat method that is on the just_test server that routinely penalizes players with false positives, and has caused many people to leave that server.rubenwardy wrote:...and when it does spot you it doesn't penalise you in any way
Incidentally, it relies on Minetest's builtin anti-cheat detection which is basically useless, as anyone can observe by playing that server:
https://github.com/AndrejIT/minimal_ant ... t.lua#L105
Re: [Mod] anticheat [anticheat]
tested in single, but doesnt work at 4.17.1
mb I do something wrong?
to config added: secure.trusted_mods = anticheat
to settings added ["Jozet"]=true,
mb I do something wrong?
to config added: secure.trusted_mods = anticheat
to settings added ["Jozet"]=true,
Re: [Mod] anticheat [anticheat]
That is like, really, unintelligent. Most multiplayer focused mods disable themselves when they are run in singleplayer mode.bosapara wrote:tested in single, but doesnt work at 4.17.1
Try running it on a server, and then logging on with an account that doesn't have the `server` priv, instead.
Re: [Mod] anticheat [anticheat]
My mistake. It was not in single. I mean it was in 'offline'.sofar wrote:That is like, really, unintelligent. Most multiplayer focused mods disable themselves when they are run in singleplayer mode.bosapara wrote:tested in single, but doesnt work at 4.17.1
Try running it on a server, and then logging on with an account that doesn't have the `server` priv, instead.
At the moment finaly see message: "#anticheat: mr_test was caught flying at (31.7,-4.5,159.9)" but noclip detect still doesnt work
-
- Member
- Posts: 129
- Joined: Tue Mar 05, 2019 17:37
- GitHub: mckaygerhard
- IRC: mckaygerhard
- In-game: mckaygerhard
Re: anticheat
LEst translated this stupid sentence:rnd wrote: ↑Tue Aug 22, 2017 14:15We all know whats the "idea" with this "uncomfortable to read source" - stop beating around the bush.
I just wont make it easy for wannabe cheaters - end of story.
Also im not attacking anyone - you are, cause you want me to make it easy for you and i wont.
Maybe thats just how i like to program, using function someFunc0(INPUT_VAR_0_). I like that style :) If thats too hard for you dont bother then... If you check my other mods you will notice normal style. This is just for this particular mod.
i do not show my code cos other will discovered and make better works than me! and i will be forgotten as some guy that make a furry anticheat not used anymore XD
Who is online
Users browsing this forum: No registered users and 62 guests