-
Notifications
You must be signed in to change notification settings - Fork 842
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remove fullurl from req-res #1337
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm !
$ ./httpx -u projectdiscovery.io -screenshot && nuclei -u output/response/projectdiscovery.io -passive
__ __ __ _ __
/ /_ / /_/ /_____ | |/ /
/ __ \/ __/ __/ __ \| /
/ / / / /_/ /_/ /_/ / |
/_/ /_/\__/\__/ .___/_/|_|
/_/
projectdiscovery.io
[INF] Current httpx version v1.3.4 (latest)
https://projectdiscovery.io
__ _
____ __ _______/ /__ (_)
/ __ \/ / / / ___/ / _ \/ /
/ / / / /_/ / /__/ / __/ /
/_/ /_/\__,_/\___/_/\___/_/ v2.9.13
projectdiscovery.io
[INF] Current nuclei version: v2.9.13 (latest)
[INF] Current nuclei-templates version: v9.6.2 (latest)
[INF] New templates added in latest release: 61
[INF] Templates loaded for current scan: 881
[INF] Targets loaded for current scan: 1
[metatag-cms] [] [info] output/response/projectdiscovery.io/8dc78052bc714ad90b93ebabae752a988f4807e4.txt [Framer 7aa0232]
[tech-detect:cloudflare] [] [info] output/response/projectdiscovery.io/8dc78052bc714ad90b93ebabae752a988f4807e4.txt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was an explicit choice to be consistent with https://github.com/tomnomnom/meg indexing. Indeed it's would break every RFC compliant request/response reader. What do you think if we put the full url at the very bottom of the file like this:
[request]
[response]
\n
\n
[full url]
In this way it should be ignored by parser as it should end processing the body respecting the content-length header or transfer encoding start/end markers.
@Mzack9999 Make sense. $ cat test.txt
GET / HTTP/1.1
Host: scanme.sh
User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 15_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/101.0.4951.58 Mobile/15E148 Safari/604.1
Accept-Charset: utf-8
Accept-Encoding: gzip
HTTP/1.1 200 OK
Connection: close
Content-Length: 2
Content-Type: text/plain; charset=utf-8
Date: Tue, 05 Sep 2023 12:58:52 GMT
ok
https://scanme.sh
$ cat main.go
package main
import (
"bufio"
"bytes"
"fmt"
"net/http"
"os"
)
func main() {
data, _ := os.ReadFile("test.txt")
br := bufio.NewReader(bytes.NewReader(data))
req, err := http.ReadRequest(br)
fmt.Println(err, req)
fmt.Println()
res, err := http.ReadResponse(br, req)
fmt.Println(err, res)
}
$ go run .
<nil> &{GET / HTTP/1.1 1 1 map[Accept-Charset:[utf-8] Accept-Encoding:[gzip] User-Agent:[Mozilla/5.0 (iPhone; CPU iPhone OS 15_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/101.0.4951.58 Mobile/15E148 Safari/604.1]] {} <nil> 0 [] false scanme.sh map[] map[] <nil> map[] / <nil> <nil> <nil> <nil>}
<nil> &{200 OK 200 HTTP/1.1 1 1 map[Content-Length:[2] Content-Type:[text/plain; charset=utf-8] Date:[Tue, 05 Sep 2023 12:58:52 GMT]] 0x40000d0240 2 [] true false map[] 0x40000f2000 <nil>} |
This PR removes fullURL storage when using
-store-response
. Possible solution to #1317.before:
after: