From 8cb888a9f841792e2976e95e658a31f85979ea9d Mon Sep 17 00:00:00 2001 From: Malfurious Date: Fri, 12 Jan 2024 06:34:38 -0500 Subject: rev: Expose modules' contents through package This is the start of an overarching change meant to simplify sploit library imports. In general, all packages (directories) are intended to export all the classes, methods, and variables of their contained modules. This way users need only import the package, which leads to less verbose import statements (and usually fewer import statements). We would still like to gate objects behind their respective packages, rather than providing the whole world with `from sploit import *` so that users can still have some amount of control over what is brought into their global namespace. Beware: For code internal to sploit, full module imports should probably continue to be used. Otherwise, there is a possibility for circular imports if two modules from two packages cross import. Signed-off-by: Malfurious --- sploit/rev/__init__.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sploit/rev/__init__.py b/sploit/rev/__init__.py index 0d0dc9b..42e2f5b 100644 --- a/sploit/rev/__init__.py +++ b/sploit/rev/__init__.py @@ -1,6 +1,4 @@ -from . import ( - elf, - gadget, - ldd, - r2, -) +from .elf import * +from .gadget import * +from .ldd import * +from .r2 import * -- cgit v1.2.3