Unicornscan Not Logging To Database
I ran into a couple issues so far trying to get unicornscan up and running. During install, the setup script to get it working with postgesql failed due to /opt/framework3/ being named /opt/framework/ on my copy of BT (was this a recent change?). Easy enough fix by replacing appropriate references.
Now I can do scans and the scan summary shows up in db, but none of the data (viewdata empty in web interface) after running the scan with -epgsqldb. Logging into db directly shows the uni_ipreportdata table is empty (the web interface also has some query issues...display.php needs work I think to make the queries valid). uni_scans is all that is populated but that doesnt contain the port data actually discovered from scan.
Anyone else running BT5 have unicornscan working with postgresql in BT5?
Re: Unicornscan Not Logging To Database
After more searching and debugging, I found the problem so here is the solution for anyone else that runs into this.
In BT5 R1, it seems the version of postgresql doesn't play well with Unicornscan by default with regards to escape characters. Unicornscan uses backslashes for escape characters in some of the major queries, and this causes the queries to fail and rows never get inserted into the database outside of a couple tables. Of course this breaks logging to database, but this also is the root cause of the Web GUI query errors seen (a different error related to invalid syntax of WHERE statement, but must be introduced in the code logic due to the other error).
If you turn off standard conforming strings in /opt/framework.postgresql/data/postgresql.conf (seems it is now on by default), you will still get the warnings in SQL logs (unless you turn those off too) but queries complete successfully and Unicornscan works again.