I am trying to steal a module of mine, to test my module security.
I have a module that returns a function, doesn't set the script variables to nil, but it does set the script's parent to nil.
It only errors when HttpService.HttpEnabled is disabled, so that is a potential attack vector. I tried making a script that gets the instance of the module script when it errors using ScriptContext.Error, but that doesn't seem to work.
I've tried a method involving getfenv() and getting the script variable, but that seems to only get globally defined functions and variables in the module script, and leaves out the local functions and variables. All my important functions and variables are local, not global. I need to use a method to get the local and global functions and variables, not just the globals.
If you need to tell me the method in a private place, please contact me on roblox. I understand if you are concerned about others knowing how to do this.

1 comment
Can you be concrete about what needs to be kept hidden? In particular, what is the public interface, and what is an attacker trying to steal?