Garry's Mod

Garry's Mod

Ocen: 33
Find files in Workshop addons!
   
Przyznaj nagrodę
Ulubione
Ulubione
Usuń z ulubionych
Content Type: Addon
Addon Type: Tool
Rozmiar pliku
Zamieszczono
Zaktualizowano
2.619 KB
5 maja 2017 o 10:16
7 lipca 2017 o 14:19
Listy zmian: 8 ( zobacz )

Zasubskrybuj, aby pobrać
Find files in Workshop addons!

W 2 kolekcjach stworzonych przez Cédric GÉRILLE [GiletJaune]
Dev Tests Mohamed
Przedmioty: 50
.bsp editing helpers
Przedmioty: 10
Opis
This tool allows you to search for files in all GMA addons in your game or in your server.
It will browse subscribed as well as auto-downloaded addons!
Addons do not have to be mounted.
On Source dedicated servers, there must be at least 1 player for the search to proceed.
Warning: newly uploaded add-ons are stored outside of the Garry's Mod base folder, so they cannot be accessed from Lua. This means that the lookup will not happen in these add-ons.

Warning: This does not work for newer add-ons that are stored uncompressed in steamapps\workshop\content\4000\ (with the .gma extension), because they are out of reach from the filesystem accessible to Lua.

Instructions
Type find_file_in_gma in the console and read the instructions!

Using cases
- A file is contained in a Workshop addon but you do not know which.
- An addon has been removed from the Workshop and you need to find it, maybe to extract it.

Lua functions
find_file_in_gma.scanAddon( gmaName, toLower, maxHeaderSize, tableToFill, isFirst, shouldYield )
return : (table) table with found files, stored as theTable[fileName]=true gmaName : (string) path to .gma file relative to garrysmod/ folder (ignoring mounting) (optional arguments) toLower : (bool) convert filenames to lowercase maxHeaderSize: (number) bytes to read at the beginning of the .gma file tableToFill : (table) if provided, this is the table that will be filled with found files (arguments only for use in a coroutine) isFirst : (bool) true if single GMA or for the first element of a loop, false otherwise shouldYield : (bool) true if using a coroutine, false otherwise
Komentarzy: 15
Cédric GÉRILLE [GiletJaune]  [autor] 11 maja 2017 o 9:12 
Absolutely, it is for what it is. :steammocking: Finding a file in more than 10 addons is still a hell with gmad.exe anyway.
Cédric GÉRILLE [GiletJaune]  [autor] 11 maja 2017 o 9:10 
I join multiple servers, and my auto-download addons folder has 1800+ GMA files. So yeah, wanting to find a lost map, I definitely could not use gmad.exe.
Cédric GÉRILLE [GiletJaune]  [autor] 11 maja 2017 o 9:04 
Not over 1900 addons just to find 1 single file, you dumb.
jahpeg 11 maja 2017 o 6:26 
You can just use gmad.exe.
Cédric GÉRILLE [GiletJaune]  [autor] 9 maja 2017 o 19:34 
It is supposed to be a genuine 404 error. :steammocking:
taro 9 maja 2017 o 19:33 
Cool.
Btw, is your profile pic supposed to be a 404 icon?
Cédric GÉRILLE [GiletJaune]  [autor] 9 maja 2017 o 19:26 
:steamhappy: Well, it's complicated because it's always possible to kind of hide or obfuscate Lua code.
You just gave me an idea though: making a backdoor finder. Well, not really powerful, but I can capture HTTP requests, RCon password changes in Lua, access password changes in Lua.
taro 9 maja 2017 o 19:04 
Is it possible for you to make a command that looks inside .luas and checks specific parts of the code w/regular expression so for example you can check if one of the addons you have installed gives special stuff to specific steam ids?
Or a command that shows all addons that contain scripts.
I know this makes me sound like I'm some paranoic retard that thinks that every addon in the workshop has a backdoor, but it would be a great addition to this nonetheless.

Anyways, thanks for making this, can't think of a use for it currently, but oh well
Cédric GÉRILLE [GiletJaune]  [autor] 9 maja 2017 o 15:36 
Thanks, I appreciate. :extralife:
Alphagen 9 maja 2017 o 15:17 
-rep for the dev, racism lol.