This PR changes the core structure of SWAT and abstracts code into separate, yet more appropriate modules.
authenticate.py - created to give an authentication command in swat rather than it be required to start the shell.
logger.py - adds logging capability that is called from main.py to give global logging to the tool.
shell.py - abstracted the SWATShell class into this module, which main.py calls along with cmdloop to start the shell.
utils.py - holds some utility functionality for SWAT such as loading specific folder paths and more
base_command - This was updated to include arguments and self declarations on instantiation. This allows BaseCommand to be carried throughout other custom modules, along with accessible variables.
Related
Summary
This PR changes the core structure of SWAT and abstracts code into separate, yet more appropriate modules.
authenticate.py
- created to give an authentication command in swat rather than it be required to start the shell.logger.py
- adds logging capability that is called frommain.py
to give global logging to the tool.shell.py
- abstracted theSWATShell
class into this module, whichmain.py
calls along withcmdloop
to start the shell.utils.py
- holds some utility functionality for SWAT such as loading specific folder paths and morebase_command
- This was updated to include arguments andself
declarations on instantiation. This allowsBaseCommand
to be carried throughout other custom modules, along with accessible variables.