Open intrd opened 4 years ago
Temp fix..
@ main.go
// send requests for each path for every host
for _, path := range paths {
for _, host := range hosts {
// the host portion may contain a path prefix,
// so we should strip that off and add it to
// the beginning of the path.
u, err := url.Parse(host)
if err != nil {
fmt.Fprintf(os.Stderr, "failed to parse host: %s\n", err)
continue
}
//prefixedPath := u.Path
u.Path = ""
// stripping off a path means we need to
// rebuild the host portion too
//host = u.String()
requests <- request{
method: c.method,
host: host,
path: u.Path+path,
headers: c.headers,
followLocation: c.followLocation,
body: c.body,
timeout: time.Duration(c.timeout * 1000000),
}
}
}
https://target.com/xxx.php?u=aaa
becomehttps://target.com?u=aaa/xxx.php
Thank you!