davecheney / httpstat

It's like curl -v, with colours.
MIT License
6.95k stars 382 forks source link

-H does not replace Host header #111

Closed mefju closed 7 years ago

mefju commented 7 years ago

Request send to remote host from following command: httpstat -H 'Host: example.com' http:/example2.com

Contains: Host: example2.com header but not: Host: example.com

moorereason commented 7 years ago

I can't reproduce this.

In the example below, the request header should be Host: www.requestb.in:

$ httpstat -H "Host: www.requestb.in" http://requestb.in/qqx6rgqq

Connected to 104.31.86.204:80

HTTP/1.1 404 Not Found
Server: cloudflare-nginx
Cache-Control: no-cache, no-store
Cf-Ray: 2ec93e406183585b-DFW
Content-Type: text/html; charset=utf-8
Date: Tue, 04 Oct 2016 14:14:57 GMT
Set-Cookie: __cfduid=d5ad855e491a3975c77e0208e9461916f1475590497; expires=Wed, 04-Oct-17 14:14:57 GMT; path=/; domain=.requestb.in; HttpOnly
Connection: keep-alive

Body discarded

   DNS Lookup   TCP Connection   Server Processing   Content Transfer
[      13ms  |           7ms  |             87ms  |             1ms  ]
             |                |                   |                  |
    namelookup:13ms           |                   |                  |
                        connect:21ms              |                  |
                                      starttransfer:108ms            |
                                                                 total:110ms

Captured request is correct:

$ tshark -f "tcp port 80" -O http -Y http.request
...
Hypertext Transfer Protocol
    GET /qqx6rgqq HTTP/1.1\r\n
        [Expert Info (Chat/Sequence): GET /qqx6rgqq HTTP/1.1\r\n]
            [GET /qqx6rgqq HTTP/1.1\r\n]
            [Severity level: Chat]
            [Group: Sequence]
        Request Method: GET
        Request URI: /qqx6rgqq
        Request Version: HTTP/1.1
    Host: www.requestb.in\r\n
    User-Agent: Go-http-client/1.1\r\n
    Accept-Encoding: gzip\r\n
    \r\n
    [Full request URI: http://www.requestb.in/qqx6rgqq]
    [HTTP request 1/1]
gatekeeperhenlee commented 7 years ago

Wow .. Please can i u give me ah proxy server for tnt or payload sir?