summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMalfurious <m@lfurio.us>2025-03-16 22:24:36 -0400
committerMalfurious <m@lfurio.us>2025-03-16 22:24:36 -0400
commit8716c0735f4e158fbab5cc2aa5513670d10a5526 (patch)
treee20f88265fa2c4a0d1b9da57440ec4ced7504fd3
parentf525e902b574d23d3b80a16a84c55818fabb8144 (diff)
downloadnsploit-8716c0735f4e158fbab5cc2aa5513670d10a5526.tar.gz
nsploit-8716c0735f4e158fbab5cc2aa5513670d10a5526.zip
Import types modules into default script scope
I feel there is a good case for automatically providing scripts with nsploit's custom data container modules. These are typically used directly by a vast majority of exploit scripts. __version__ does not need explicitly set in the user scope dictionary, as it comes from the "lib" import, so remove this line. Signed-off-by: Malfurious <m@lfurio.us>
-rw-r--r--nsploit/__main__.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/nsploit/__main__.py b/nsploit/__main__.py
index 5f326ef..d4d2fa9 100644
--- a/nsploit/__main__.py
+++ b/nsploit/__main__.py
@@ -48,8 +48,9 @@ def target(script, target):
def user_scope(comm):
import nsploit as lib
- scope = { name: getattr(lib, name) for name in dir(lib) }
- scope['__version__'] = __version__
+ import nsploit.types as types
+ scope = { name: getattr(lib, name) for name in dir(lib) }
+ scope |= { name: getattr(types, name) for name in dir(types) }
scope['print'] = elog
scope['io'] = comm
return scope