Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › MultiPlayer Game Hacks & Cheats › Steam Games Hacks & Cheats › Garry's Mod Hacks & Cheats › Garry's Mod Discussions & Help › Scan all files and directories in lua directory

Scan all files and directories in lua directory

Posts 1–13 of 13 · Page 1 of 1
Blue Kirby
Blue Kirby
Scan all files and directories in lua directory
So I was on the GmodZ server and was looking for exploits when I found a net message named "AntCheatCheck". Curious I wanted to look through all the files one by one and realized I was doing bullshit work. So I decided to code a full directory scanner. Took a while because I had file.Open and file.Find mixed up for some stupid ass reason, but here you go. You can use this for whatever. I'll use it to find a string in a particular lua file on the go. This can also be used for other things, but I might as well release it. Mostly useful for exploit finding. Have fun

Code:
local function Scan( returnfiles, path )
	local files, dirs = file.Find( (returnfiles and ((path and path.."/" or "").."*.lua") or (path and path or "").."*"), "lsv", "namedesc" );
	
	return (returnfiles and files or dirs);
end

local function ReadFile( filename, mode ) --Custom file.Read function since I overwrite mine. I'll leave this in here so you understand how it works.
	local f = file.Open( filename, "r", mode );
	
	if (!f) then return end
	
	local contents = f:Read( f:Size() );
	f:Close()
	
	return contents;
end

local dirs = Scan( );
local i = 0;
local currentdir = dirs[1];

repeat
	i=i+1
	currentdir = dirs[i] or false;
	
	if (currentdir) then
	
		local scanneddir = Scan( false, currentdir.."/" ) or {};
		
		for k, v in pairs( scanneddir ) do
			scanneddir[k] = tostring(dirs[i]).."/"..v
		end
		
		table.Add( dirs, scanneddir );
	end
until currentdir == false or i == 1000 --Have a safe at 1000 so you don't crash

for _, file in pairs( Scan( true ) ) do --Go through normal lua folder
	print( ReadFile( file, "lsv" ) or "" );
end

for _, dir in pairs( dirs ) do --Go through all the directories we just made
	local files = Scan( true, dir ); --Get the table of all the files
	
	for _, file in pairs( files ) do --Go through all the files
		print( ReadFile( dir.."/"..file, "lsv" ) ); --Print the contents of the file.
	end
end
#1 · edited 13y ago · 13y ago
KI
kila58
The anti cheat is shitty.
You can:
1. Destroy the timer that runs every 30 seconds
2. Run your script like this: sv_allowcslua 1;runscriptshithere;sv_allowcslua

A few other useless methods not worth posting.
The AC is literally 8 lines of code, I have seen it myself.
So no point in detouring dem hooks, because it just check if sv_allowfcslua and sv_cheats is on 1 or not ran by the 30 second timer mentioned above.
Fail coder is fail.
#2 · 13y ago
Blue Kirby
Blue Kirby
Already intercepted the code and posted how to bypass. Ultra shitty method is ultra shitty.
#3 · 13y ago
MeepDarknessMeep
MeepDarknessMeep
Just wondering... is there any way to save the file into your lua folder or something?
#4 · 13y ago
Blue Kirby
Blue Kirby
Quote Originally Posted by MeepDarknessMeep View Post
Just wondering... is there any way to save the file into your lua folder or something?
Not unless you want to code your own module.
#5 · 13y ago
KI
kila58
*cough* Like that one tyler has *cough*
#6 · 13y ago
Blue Kirby
Blue Kirby
If you use this code correctly, you can grab the lua files the server sends to you and save them. I'm not releasing that code though and I recommend no one else does so people have to figure it out.
#7 · 13y ago
AM
Ammart
I got the script but what do I type in console?
#8 · 13y ago
Atheon
Atheon
This is the method i use. I think its quite a bit simpler but i believe it accomplishes the same thing.

Code:
function ShowLua()
	local function recursion(directory)
		local files, directories = file.Find( directory.."*", "LUA" )
		
		for k,v in pairs(files) do
			MsgN("Directory is "..directory..v)
			local f = file.Open(directory..v, "r", "LUA")
			MsgN(f:Read(f:Size()))
			f:Close()
			MsgN("\n\n\n\n\n\n")
		end
		
		for k,v in pairs(directories) do
			recursion(directory..v.."/")
		end	
	end
	recursion("")
end
#9 · edited 13y ago · 13y ago
supersillykid556
supersillykid556
this is when i wish i had taked some time to learn LUA better late then never
#10 · 13y ago
Blue Kirby
Blue Kirby
Quote Originally Posted by Atheon View Post
This is the method i use. I think its quite a bit simpler but i believe it accomplishes the same thing.

Code:
function ShowLua()
	local function recursion(directory)
		local files, directories = file.Find( directory.."*", "LUA" )
		
		for k,v in pairs(files) do
			MsgN("Directory is "..directory..v)
			local f = file.Open(directory..v, "r", "LUA")
			MsgN(f:Read(f:Size()))
			f:Close()
			MsgN("\n\n\n\n\n\n")
		end
		
		for k,v in pairs(directories) do
			recursion(directory..v.."/")
		end	
	end
	recursion("")
end
Yours scans all the files, not just lua files. And mine is more complicated because I don't ever release final versions of scripts here. I usually release shitty versions so people have to fix them up.
#11 · edited 13y ago · 13y ago
MeepDarknessMeep
MeepDarknessMeep
Finally figured out how to use this. Thanks so much for the code
#12 · 13y ago
WA
waffles667
Just wondering, how do you use this exactly?
#13 · 13y ago
Posts 1–13 of 13 · Page 1 of 1

Post a Reply

Similar Threads

  • How to make your own private server. With files and allBy carbonnade in Realm of the Mad God Private Servers Tutorials/Source Code
    136Last post 11y ago
  • All Files In Combat Arms DirectoryBy CoderNever in Combat Arms Discussions
    11Last post 16y ago
  • How to split and scan large files.By rsswifi in Combat Arms Mods & Rez Modding
    12Last post 15y ago
  • trading Warrock HAcking files : contains all addresses and moreBy obsedianpk in Trade Accounts/Keys/Items
    8Last post 18y ago
  • PB is scanning computer filesBy frelacer in WarRock - International Hacks
    13Last post 19y ago

Tags for this Thread

None