Skip to content
Snippets Groups Projects
Commit 095cee20 authored by Jiří Rája's avatar Jiří Rája 🔥
Browse files

Merge branch '1-update-msf_mod-response' into 'master'

Resolve "Update msf_mod response"

Closes #1

See merge request beast-public/cryton/cryton-modules!4
parents 9c1d4e84 ea587e95
No related branches found
No related tags found
No related merge requests found
......@@ -56,12 +56,12 @@ def execute(arguments: dict) -> dict:
### Input parameters
Every module has its own input parameters specified. These input parameters are given as a dictionary to the
module `execute` (when executing the module) or `validate` (when validating the module parameters) function.
module `execute` (when executing the module) or `validate` (when validating the module parameters) function.
### Output parameters
Every attack module returns a dictionary with following keys:
| Parameter name | Parameter meaning |
| Parameter name | Parameter description |
|----------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `return_code` | Numeric representation of result (0, -1, -2) <br />0 (OK) means the module finished successfully<br />-1 (FAIL) means the module finished unsuccessfully<br />-2 (EXCEPTION) means the module finished with an unhandled error |
| `mod_out` | Parsed output of module. Eg. for bruteforce module, this might be a list of found usernames and passwords. |
......
......@@ -140,6 +140,9 @@ def execute(args: dict) -> dict:
if 'Success' in data or ('[+]' in data and '[-]' not in data):
ret_vals.update({'return_code': 0, 'mod_out': str(data)})
else:
ret_vals.update({'return_code': -1, 'mod_err': str(data)})
return ret_vals
# get sessions after
after_sessions = msf.get_sessions(target_host=target, tunnel_peer=target)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment