NMAP plugin conversion v0.3

This commit is contained in:
Jokob-sk
2023-08-30 08:03:02 +10:00
parent 61df3ec581
commit f9baa603f4
11 changed files with 51 additions and 41 deletions

View File

@@ -22,7 +22,7 @@
"string": "Pholus-Scan (Name discovery)"
},
{
"language_code": "en_us",
"language_code": "es_es",
"string": "Pholus-Scan (Descubrimiento de nombre)"
}
],

View File

@@ -40,12 +40,12 @@ def main():
plug_objects = Plugin_Objects(RESULT_FILE)
# Print a message to indicate that the script is starting.
print('In script:')
mylog('verbose',['[Pholus] In script'])
# Assuming 'values' is a dictionary or object that contains a key 'userSubnets'
# which holds a list of user-submitted subnets.
# Printing the userSubnets list to check its content.
print(values.userSubnets)
mylog('verbose',['[Pholus] Subnets: ', values.userSubnets])
# Extract the base64-encoded subnet information from the first element of the userSubnets list.
# The format of the element is assumed to be like 'userSubnets=b<base64-encoded-data>'.
@@ -123,8 +123,8 @@ def execute_pholus_scan(userSubnets, timeoutSec):
result_list += pholus_output_list
print("List len:", len(result_list))
print("List:", result_list)
mylog('verbose', ["List len:", len(result_list)])
mylog('verbose',["List:", result_list])
return result_list
@@ -133,7 +133,7 @@ def execute_pholus_on_interface(interface, timeoutSec, mask):
# logging & updating app state
mylog('none', ['[PholusScan] Scan: Pholus for ', str(timeoutSec), 's ('+ str(round(int(timeoutSec) / 60, 1)) +'min)'])
mylog('verbose', ['[PholusScan] Scan: Pholus for ', str(timeoutSec), 's ('+ str(round(int(timeoutSec) / 60, 1)) +'min)'])
mylog('verbose', ["[PholusScan] Pholus scan on [interface] ", interface, " [mask] " , mask])
# the scan always lasts 2x as long, so the desired user time from settings needs to be halved