aerissecure / nse

Nmap NSE scripts
29 stars 13 forks source link

Replace PhantomJS with Headless Chrome? #16

Closed freb closed 5 years ago

freb commented 6 years ago

Headless chrome is interesting and I think it would avoid the xvfb requirement when running from a headless device without display server (https://github.com/ariya/phantomjs/issues/14376).

It could also potentially be faster than phantomjs since it would be a running instance of headless chrome instead of a cold boot for each run.

The main issue I see right now is that phantomjs takes a full page screen capture and chromedp doesn't seem to support that, at least not easily, as the library appears to be in flux. The solution presented here didn't end up having any of the pull requests merged, so it doesn't help us: https://github.com/chromedp/chromedp/issues/82

If we don't care about full screen, we could just us an approach, like the following (or a simple chromedp approach): https://sensepost.com/blog/2017/gowitness-a-new-tool-for-an-old-idea/

freb commented 5 years ago

Since you can get PhantomJS as a static binary and I haven't had any issues with rendering since the last JS code changes, I don't think switching provides any benefits.