Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TLS certificate #110

Open
merkleID opened this issue Oct 26, 2022 · 1 comment
Open

TLS certificate #110

merkleID opened this issue Oct 26, 2022 · 1 comment

Comments

@merkleID
Copy link

Hi,

I'm trying to use capture-website to loop through the list created by a network-scan during my vulnerability assessments.
The problem is that, in LANs, appliances usually use a self-signed certificate and capture-website seems unable to ignore a certificate error and so to generate a valid screenshot of the webpage.

This is the typical error I get:

capture-website https://172.16.0.2 --output=1.png
Error: net::ERR_CERT_AUTHORITY_INVALID at https://172.16.0.2
at navigate (/usr/local/lib/node_modules/capture-website-cli/node_modules/puppeteer/lib/cjs/puppeteer/common/FrameManager.js:156:23)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async FrameManager.navigateFrame (/usr/local/lib/node_modules/capture-website-cli/node_modules/puppeteer/lib/cjs/puppeteer/common/FrameManager.js:131:21)
at async Frame.goto (/usr/local/lib/node_modules/capture-website-cli/node_modules/puppeteer/lib/cjs/puppeteer/common/FrameManager.js:512:16)
at async Page.goto (/usr/local/lib/node_modules/capture-website-cli/node_modules/puppeteer/lib/cjs/puppeteer/common/Page.js:1167:16)
at async internalCaptureWebsiteCore (file:///usr/local/lib/node_modules/capture-website-cli/node_modules/capture-website/index.js:281:2)
at async internalCaptureWebsite (file:///usr/local/lib/node_modules/capture-website-cli/node_modules/capture-website/index.js:161:10)
at async captureWebsite.file (file:///usr/local/lib/node_modules/capture-website-cli/node_modules/capture-website/index.js:438:21)
at async file:///usr/local/lib/node_modules/capture-website-cli/cli.js:287:3

Any work-around for this?

thanks,
Luca

@sindresorhus
Copy link
Owner

You can pass in the ignoreHTTPSErrors option to the launchOptions option: https://pptr.dev/api/puppeteer.browserconnectoptions.ignorehttpserrors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants