From 8716c0735f4e158fbab5cc2aa5513670d10a5526 Mon Sep 17 00:00:00 2001 From: Malfurious Date: Sun, 16 Mar 2025 22:24:36 -0400 Subject: 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 --- nsploit/__main__.py | 5 +++-- 1 file 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 -- cgit v1.2.3