@@ -39,7 +39,6 @@ import (
3939 "github.com/projectdiscovery/httpx/static"
4040 "github.com/projectdiscovery/mapcidr/asn"
4141 "github.com/projectdiscovery/networkpolicy"
42- errorutil "github.com/projectdiscovery/utils/errors" //nolint
4342 osutil "github.com/projectdiscovery/utils/os"
4443 "github.com/projectdiscovery/utils/structs"
4544
@@ -69,6 +68,7 @@ import (
6968 "github.com/projectdiscovery/mapcidr"
7069 "github.com/projectdiscovery/rawhttp"
7170 converstionutil "github.com/projectdiscovery/utils/conversion"
71+ errkit "github.com/projectdiscovery/utils/errkit"
7272 fileutil "github.com/projectdiscovery/utils/file"
7373 pdhttputil "github.com/projectdiscovery/utils/http"
7474 iputil "github.com/projectdiscovery/utils/ip"
@@ -2243,7 +2243,14 @@ retry:
22432243 var pHash uint64
22442244 if scanopts .Screenshot {
22452245 var err error
2246- screenshotBytes , headlessBody , linkRequest , err = r .browser .ScreenshotWithBody (fullURL , scanopts .ScreenshotTimeout , scanopts .ScreenshotIdle , r .options .CustomHeaders , scanopts .IsScreenshotFullPage ())
2246+ screenshotBytes , headlessBody , linkRequest , err = r .browser .ScreenshotWithBody (
2247+ fullURL ,
2248+ scanopts .ScreenshotTimeout ,
2249+ scanopts .ScreenshotIdle ,
2250+ r .options .CustomHeaders ,
2251+ scanopts .IsScreenshotFullPage (),
2252+ r .options .CustomHeaders ,
2253+ )
22472254 if err != nil {
22482255 gologger .Warning ().Msgf ("Could not take screenshot '%s': %s" , fullURL , err )
22492256 } else {
@@ -2507,7 +2514,7 @@ func (r *Runner) HandleFaviconHash(hp *httpx.HTTPX, req *retryablehttp.Request,
25072514func (r * Runner ) calculateFaviconHashWithRaw (data []byte ) (string , string , error ) {
25082515 hashNum , md5Hash , err := stringz .FaviconHash (data )
25092516 if err != nil {
2510- return "" , "" , errorutil . NewWithTag ( "favicon" , "could not calculate favicon hash" ). Wrap ( err ) //nolint
2517+ return "" , "" , errkit . Wrapf ( err , "could not calculate favicon hash" )
25112518 }
25122519 return fmt .Sprintf ("%d" , hashNum ), md5Hash , nil
25132520}
0 commit comments