Garry's Mod

Garry's Mod

33 次評價
Find files in Workshop addons!
   
獎勵
加入最愛
已加入最愛
移除最愛
Content Type: Addon
Addon Type: Tool
檔案大小
發佈於
更新時間
2.619 KB
2017 年 5 月 5 日 上午 10:16
2017 年 7 月 7 日 下午 2:19
8 項更新註記 (檢視)

訂閱以下載
Find files in Workshop addons!

在 Cédric GÉRILLE [GiletJaune] 的 2 個收藏中
Dev Tests Mohamed
50 個項目
.bsp editing helpers
10 個項目
描述
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
15 則留言
Cédric GÉRILLE [GiletJaune]  [作者] 2017 年 5 月 11 日 上午 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]  [作者] 2017 年 5 月 11 日 上午 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]  [作者] 2017 年 5 月 11 日 上午 9:04 
Not over 1900 addons just to find 1 single file, you dumb.
jahpeg 2017 年 5 月 11 日 上午 6:26 
You can just use gmad.exe.
Cédric GÉRILLE [GiletJaune]  [作者] 2017 年 5 月 9 日 下午 7:34 
It is supposed to be a genuine 404 error. :steammocking:
taro 2017 年 5 月 9 日 下午 7:33 
Cool.
Btw, is your profile pic supposed to be a 404 icon?
Cédric GÉRILLE [GiletJaune]  [作者] 2017 年 5 月 9 日 下午 7: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 2017 年 5 月 9 日 下午 7: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]  [作者] 2017 年 5 月 9 日 下午 3:36 
Thanks, I appreciate. :extralife:
Alphagen 2017 年 5 月 9 日 下午 3:17 
-rep for the dev, racism lol.