Open W1nd0x opened 9 years ago
After deleting the file cans/ROUTABLE/up/72/11/131 where the screenshot should be in, it worked.
Hi,
Thanks for your report. Where was the screenshot file located?
Hi,
Okay, somehow a few screenshots get placed in the home file where the directory scans also is in. So example: /home/screenshot.1.1.1.1.jpg - Bug? /home/scans/ROUTABLE/up/1/1/1/screenshot.1.1.1.1jpg - Where it should be placed?
When importing it goes for the ROUTABLE map but a few files get placed in the /home/ so importing fails since they are not in the correct directory somehow.
The easiest way to fix that will be to change the script http-screenshot
so that it outputs the absolute path of the image.
Do you mind to do that for me and upload it somewhere so I can replace the file easly?
I'll do that soon (I don't know how for now), progress will be tracked here. When the issue is fixed, the code will be merge into master (and new Docker images will be built).
Stay tuned!
Hello
Some more informations
runscans --network 1.2.3.0/24 --output=XMLFork
scans/NET-1.2.3.0_24/up/1/2/3/14.xml
scans/NET-1.2.3.0_24/up/1/2/3/2.xml
scans/NET-1.2.3.0_24/up/1/2/3/25.xml
scans/NET-1.2.3.0_24/up/1/2/3/254.xml
scans/NET-1.2.3.0_24/up/1/2/3/28.xml
screenshot-1.2.3.2-80.jpg
screenshot-1.2.3.25-80.jpg
screenshot-1.2.3.254-443.jpg
screenshot-1.2.3.254-631.jpg
I've moved all screenshots files to the scans/NET-1.2.3.0_24/up/1/2/3/ :)
scans/NET-1.2.3.0_24/up/1/2/3/14.xml
scans/NET-1.2.3.0_24/up/1/2/3/2.xml
scans/NET-1.2.3.0_24/up/1/2/3/25.xml
scans/NET-1.2.3.0_24/up/1/2/3/254.xml
scans/NET-1.2.3.0_24/up/1/2/3/28.xml
scans/NET-1.2.3.0_24/up/1/2/3/screenshot-1.2.3.2-80.jpg
scans/NET-1.2.3.0_24/up/1/2/3/screenshot-1.2.3.25-80.jpg
scans/NET-1.2.3.0_24/up/1/2/3/screenshot-1.2.3.254-443.jpg
scans/NET-1.2.3.0_24/up/1/2/3/screenshot-1.2.3.254-631.jpg
and run
nmap2db -c TEST-NETWORK-001 -s ivreclient -r scans/NET-1.2.3.0_24/up
Traceback (most recent call last):
File "/usr/local/bin/nmap2db", line 114, in <module>
main()
File "/usr/local/bin/nmap2db", line 108, in main
merge=args.merge,
File "/usr/local/lib/python2.7/dist-packages/ivre/db/__init__.py", line 336, in store_scan
raise ValueError("Unknown file type %s" % fname)
ValueError: Unknown file type scans/NET-1.2.3.0_24/up/1/2/3/screenshot-1.2.3.25-80.jpg
my 2 cts
@fccagou that's "normal", since the files are located in the directory you're trying to import.
We should probably catch in nmap2db
the exception we raise in ivre.db
, warn the user and continue. I'll do that first step soon.
I have (for now) no idea how to fix that in the NSE script.
I have implemented some workarounds to at least avoid crashes and to "work in some cases".
Can you (@fccagou et @W1nd0x) test and let me know if that works?
I have just merged #167 so that you can try it. Docker images should be on their way.
Tested in docker built from sources. It's OK for me @p-l-
Hey, i'm trying to import the resultsm but I get the following error:
Why is this happening?