Merge pull request #12 from caggle/minor-changes
Minor changes to address some issues
This commit is contained in:
Коммит
94fa0849b5
|
@ -113,10 +113,11 @@ class Target:
|
|||
elif isinstance(one_task, task.NessusTask):
|
||||
nessus_results = one_task.runNessusScan()
|
||||
if (nessus_results):
|
||||
# TODO: Need to be more precise about this time check
|
||||
epoch_cdate = nessus_results.histories()[0].creation_date
|
||||
cdate = datetime.datetime.fromtimestamp(float(epoch_cdate))
|
||||
if(cdate.date() < datetime.date.today()):
|
||||
# Checking the creation day of the scan to see if it's
|
||||
# older than 15 days
|
||||
if(cdate.date() < (datetime.date.today() - datetime.timedelta(days=15))):
|
||||
self.resultsdict.update({'nessus': "OLD"})
|
||||
else:
|
||||
logger.info("[+] Tenable.io scan kicked off.")
|
||||
|
|
|
@ -291,9 +291,9 @@ class MozillaHTTPObservatoryTask(Task):
|
|||
if find_executable('observatory'):
|
||||
# Found in path, run the command
|
||||
logger.info("[+] Running HTTP Observatory scan...")
|
||||
cmd = "observatory --format json -z --rescan " \
|
||||
cmd = "observatory --format=report -z --rescan " \
|
||||
+ self.tasktarget.targetdomain + " > /app/results/" \
|
||||
+ self.tasktarget.targetdomain + "/httpobs_scan.json"
|
||||
+ self.tasktarget.targetdomain + "/httpobs_scan.txt"
|
||||
observatory_cmd = utils.sanitise_shell_command(cmd)
|
||||
p = subprocess.Popen(observatory_cmd, stdout=subprocess.PIPE, shell=True)
|
||||
p.wait()
|
||||
|
@ -338,11 +338,11 @@ class DirectoryBruteTask(Task):
|
|||
logger.info("[+] Running dirb scan...")
|
||||
if "URL" in self.tasktarget.getType():
|
||||
cmd = "/app/vendor/dirb222/dirb " + self.tasktarget.targetname \
|
||||
+ "/ /app/vendor/dirb222/wordlists/small.txt -o /app/results/" \
|
||||
+ "/ /app/vendor/dirb222/wordlists/common.txt -o /app/results/" \
|
||||
+ self.tasktarget.targetdomain + "/https_dirb_common.txt -f -w -S -r"
|
||||
else:
|
||||
cmd = "/app/vendor/dirb222/dirb https://" + self.tasktarget.targetdomain \
|
||||
+ "/ /app/vendor/dirb222/wordlists/small.txt -o /app/results/" \
|
||||
+ "/ /app/vendor/dirb222/wordlists/common.txt -o /app/results/" \
|
||||
+ self.tasktarget.targetdomain + "/https_dirb_common.txt -f -w -S -r"
|
||||
|
||||
dirbscan_cmd = utils.sanitise_shell_command(cmd)
|
||||
|
|
Загрузка…
Ссылка в новой задаче