mirror of
https://github.com/projectdiscovery/httpx
synced 2026-06-08 16:50:17 +00:00
Merge pull request #2219 from Serizao/patch-1
Dismiss alert lead to take screenshot
This commit is contained in:
@@ -104,6 +104,14 @@ func (b *Browser) ScreenshotWithBody(url string, timeout time.Duration, idle tim
|
||||
if err != nil {
|
||||
return nil, "", err
|
||||
}
|
||||
|
||||
go page.EachEvent(func(e *proto.PageJavascriptDialogOpening) {
|
||||
_ = proto.PageHandleJavaScriptDialog{
|
||||
Accept: true,
|
||||
PromptText: "",
|
||||
}.Call(page)
|
||||
})()
|
||||
|
||||
for _, header := range headers {
|
||||
headerParts := strings.SplitN(header, ":", 2)
|
||||
if len(headerParts) != 2 {
|
||||
|
||||
@@ -713,7 +713,6 @@ func makePrintCallback() func(stats clistats.StatisticsClient) interface{} {
|
||||
builder.WriteString(clistats.String(totalHosts))
|
||||
builder.WriteRune(' ')
|
||||
builder.WriteRune('(')
|
||||
//nolint:gomnd // this is not a magic number
|
||||
builder.WriteString(clistats.String(uint64(float64(hosts) / float64(totalHosts.(int)) * 100.0)))
|
||||
builder.WriteRune('%')
|
||||
builder.WriteRune(')')
|
||||
|
||||
Reference in New Issue
Block a user