fixed unknown function
This commit is contained in:
parent
8eb90e9f42
commit
8ece1eeaa4
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
cve-2022-46169
|
5
main.go
5
main.go
|
@ -3,6 +3,7 @@ package main
|
|||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strings"
|
||||
|
@ -61,7 +62,7 @@ func checkVuln(vulnUrl string) bool {
|
|||
|
||||
// read the response body for vulnerability check
|
||||
buf := new(strings.Builder)
|
||||
_, err = buf.ReadFrom(resp.Body)
|
||||
_, err = io.Copy(buf, resp.Body)
|
||||
if err != nil {
|
||||
fmt.Println("Error reading response body:", err)
|
||||
return false
|
||||
|
@ -93,7 +94,7 @@ func bruteForcing(vulnURL string) (bool, int, int) {
|
|||
defer resp.Body.Close()
|
||||
|
||||
buf := new(strings.Builder)
|
||||
_, err = buf.ReadFrom(resp.Body)
|
||||
_, err = io.Copy(buf, resp.Body)
|
||||
if err != nil {
|
||||
fmt.Println("Error reading response body:", err)
|
||||
return false, 1, 1
|
||||
|
|
Loading…
Reference in a new issue