epi052 / recon-pipeline

An automated target reconnaissance pipeline.
https://recon-pipeline.readthedocs.io/
MIT License
427 stars 96 forks source link

[BUG] searchsploit out of index list error #69

Closed Bad3r closed 4 years ago

Bad3r commented 4 years ago

Describe the bug After completing a full scan I wanted to view searchsploit results using the command: view searchsploit-results it returned a list error EXCEPTION of type 'ValueError' occurred with message: 'list.remove(x): x not in list'

To Reproduce Steps to reproduce the behavior:

  1. install the tool basic on instructions
  2. create a database and attach it
  3. run a full scan on a domain
  4. view searchsploit results after scan completions without errors

Expected behavior view results of searchsploit

Traceback / Error Output debugging traceback

[db-1] recon-pipeline> view searchsploit-results 
EXCEPTION of type 'ValueError' occurred with message: 'list.remove(x): x not in list'
To enable full traceback, run the following command: 'set debug true'
[db-1] recon-pipeline> set debug true
debug - was: False
now: True
[db-1] recon-pipeline> view searchsploit-results 
Traceback (most recent call last):
  File "/home/bad3r/.local/share/virtualenvs/recon-pipeline-B_t2qNnz/lib/python3.8/site-packages/cmd2/cmd2.py", line 1657, in onecmd_plus_hooks
    stop = self.onecmd(statement, add_to_history=add_to_history)
  File "/home/bad3r/.local/share/virtualenvs/recon-pipeline-B_t2qNnz/lib/python3.8/site-packages/cmd2/cmd2.py", line 2064, in onecmd
    stop = func(statement)
  File "/home/bad3r/.local/share/virtualenvs/recon-pipeline-B_t2qNnz/lib/python3.8/site-packages/cmd2/decorators.py", line 223, in cmd_wrapper
    return func(cmd2_app, args)
  File "./pipeline/recon-pipeline.py", line 762, in do_view
    func(args)
  File "./pipeline/recon-pipeline.py", line 713, in print_searchsploit_results
    targets.remove(ipaddr.ipv4_address)
ValueError: list.remove(x): x not in list
EXCEPTION of type 'ValueError' occurred with message: 'list.remove(x): x not in list'

Environment (please complete the following information):

epi052 commented 4 years ago

Is there anything in your searchsploit-results directory?

recon-results/searchsploit-results

Bad3r commented 4 years ago

the folder recon-results/searchsploit-results does not exist. so i am assuming it didn't find any results therefore it didn't create the folder and thats what caused the error

epi052 commented 4 years ago

That would be my first guess, yes. I'll run some tests without the folder to improve the error handling / reporting. Thank you!

epi052 commented 4 years ago

Hey there, would you mind doing one of the following?

  1. zip up your database/results folder and get them to a location where i can download them for testing
  2. make the following code change below and let me know if it resolves the problem