将相同的请求发送到Squid,但是在使用masscan时收到400 Bad Request错误

时间:2019-09-07 06:52:05

标签: http squid http-status-code-400

我有一个hello.txt文件,其中包含以下内容:

GET http://www.google.com/ HTTP/1.1
Host: www.google.com

使用netcat可以正常工作:

cat hello.txt | nc 212.8.251.116 62138

但是当我使用masscan时,出现400错误:

# bin/masscan 207.180.212.139 -p62138 --banners --source-port 61000 --hello-file[62138] hello.txt

Starting masscan 1.0.6 at 2019-09-06 12:48:57 GMT
 -- forced options: -sS -Pn -n --randomize-hosts -v --send-eth
Initiating SYN Stealth Scan
Scanning 1 hosts [1 port/host]
Discovered open port 62138/tcp on 207.180.212.139
Banner on port 62138/tcp on 207.180.212.139: [title] ERROR: The requested URL could not be retrieved
Banner on port 62138/tcp on 207.180.212.139: [http] HTTP/1.1 400 Bad Request\x0d\x0aServer: squid/3.5.27\x0d\x0aMime-Version: 1.0\x0d\x0aDate: Fri, 06 Sep 2019 12:48:59 GMT\x0d\x0aContent-Type: text/html;charset=utf-8\x0d\x0aContent-Length: 3548\x0d\x0aX-Squid-Error: ERR_INVALID_URL 0\x0d\x0aVary: Accept-Language\x0d\x0aContent-Language: en\x0d\x0aX-Cache: MISS from de8g.t1ip.com\x0d\x0aX-Cache-Lookup: NONE from de8g.t1ip.com:62138\x0d\x0aConnection: close\x0d\x0a\x0d

但是使用Wireshark我看到发送的内容是相同的:

enter image description here enter image description here

我用十六进制对发送的数据进行了比较,这是相同的。

如果请求相同,为什么其中之一会导致错误?

0 个答案:

没有答案