Adding proxy use in headless binary download (#3290)

* Adding proxy use in headless binary download

* bumping utils
dev
Mzack9999 2023-02-09 15:31:49 +01:00 committed by GitHub
parent 454a883241
commit 518944f6e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 3 deletions

View File

@ -80,7 +80,7 @@ require (
github.com/projectdiscovery/sarif v0.0.1
github.com/projectdiscovery/tlsx v1.0.2
github.com/projectdiscovery/uncover v1.0.2
github.com/projectdiscovery/utils v0.0.6
github.com/projectdiscovery/utils v0.0.8
github.com/projectdiscovery/wappalyzergo v0.0.79
github.com/stretchr/testify v1.8.1
gopkg.in/src-d/go-git.v4 v4.13.1

View File

@ -603,8 +603,8 @@ github.com/projectdiscovery/tlsx v1.0.2 h1:2bbfPQLuMIhs6FPmGsIcAo3uJaB2E+9ssJtZ8
github.com/projectdiscovery/tlsx v1.0.2/go.mod h1:WW+PdBImrqnMl18v4Brp3OsbnO4A1tqYPUcfiVtjNLM=
github.com/projectdiscovery/uncover v1.0.2 h1:mRFzflYyvwKkHd3XKufMlDRrb6p1mjFZTSHoNAUpFwo=
github.com/projectdiscovery/uncover v1.0.2/go.mod h1:lz4QYfArSA6jJkXyB71kN2/Pc7IW7nJB8c95n7xtwqY=
github.com/projectdiscovery/utils v0.0.6 h1:6SDn/5E5NxrAfcYrZ7omXPmiU9n8p0rKXZ4BAOQyzbw=
github.com/projectdiscovery/utils v0.0.6/go.mod h1:PCwA5YuCYWPgHaGiZmr53/SA9iGQmAnw7DSHuhr8VPQ=
github.com/projectdiscovery/utils v0.0.8 h1:yPl/DwhW0IGnWNjapcw03g97ria8ZM8fH5PbcX4QFUo=
github.com/projectdiscovery/utils v0.0.8/go.mod h1:dZqlayNwgCGn2HgYfKrI71RjBEyKsEPovrU+UDfpQWw=
github.com/projectdiscovery/wappalyzergo v0.0.79 h1:hWMxNysxC/P6fxnu6c+opqf5L27hHQ9wD1QzPRCb+I8=
github.com/projectdiscovery/wappalyzergo v0.0.79/go.mod h1:HvYuW0Be4JCjVds/+XAEaMSqRG9yrI97UmZq0TPk6A0=
github.com/projectdiscovery/yamldoc-go v1.0.3-0.20211126104922-00d2c6bb43b6 h1:DvWRQpw7Ib2CRL3ogYm/BWM+X0UGPfz1n9Ix9YKgFM8=

View File

@ -14,6 +14,7 @@ import (
"github.com/projectdiscovery/nuclei/v2/pkg/types"
fileutil "github.com/projectdiscovery/utils/file"
reflectutil "github.com/projectdiscovery/utils/reflect"
stringsutil "github.com/projectdiscovery/utils/strings"
)
@ -53,6 +54,12 @@ func New(options *types.Options) (*Browser, error) {
chromeLauncher = chromeLauncher.NoSandbox(true)
}
// we need to set go rod internal value with reflection
launcherInternalBrowser := reflectutil.GetUnexportedField(chromeLauncher, "browser")
if internalInstance, ok := launcherInternalBrowser.(*launcher.Browser); ok {
internalInstance.IgnoreCerts = true
}
executablePath, err := os.Executable()
if err != nil {
return nil, err