2017-04-06 12 views

答えて

1

bashから要求ヘッダーを見つけるには、単にcurlを使用します。ウィンドウズ上であれば、新しいウィンドウにbashシェルまたはcygwinを実行させたいでしょう。

あなたが望むどのようなフォーマットでも好きなものを得るためにカールで遊ぶことができる何十ものトリックがあります。ここで

curl --head www.google.com 


HTTP/1.1 200 OK 
Date: Thu, 06 Apr 2017 02:07:00 GMT 
Expires: -1 
Cache-Control: private, max-age=0 
Content-Type: text/html; charset=ISO-8859-1 
P3P: CP="This is not a P3P policy! See https://www.google.com/support/accounts/answer/151657?hl=en for more info." 
Server: gws 
X-XSS-Protection: 1; mode=block 
X-Frame-Options: SAMEORIGIN 
Set-Cookie: NID=100=IoNzfnVsz_oaEwIQE182ysgVSHoZYRVKjTqSQ5GqKrz1ewxwav2ae5GPo_bx0apr39Pnn4yvM5RfsmQnJ_QFmllVwS34ts-bNrvkzDFIfaokkDTo1BXHDDI69duBn1f9kx4sXJ_rcCK28og6; expires=Fri, 06-Oct-2017 02:07:00 GMT; path=/; domain=.google.com; HttpOnly 
Transfer-Encoding: chunked 
Accept-Ranges: none 
Vary: Accept-Encoding 

curlを使用してレスポンスヘッダを取得する例を示します

curl -D - www.google.com 


HTTP/1.1 200 OK 
Date: Thu, 06 Apr 2017 02:11:26 GMT 
Expires: -1 
Cache-Control: private, max-age=0 
Content-Type: text/html; charset=ISO-8859-1 
P3P: CP="This is not a P3P policy! See https://www.google.com/support/accounts/answer/151657?hl=en for more info." 
Server: gws 
X-XSS-Protection: 1; mode=block 
X-Frame-Options: SAMEORIGIN 
Set-Cookie: NID=100=DrUalBDiHKiZkX0yETtowdWhEfjJy7ioPU0Fe7Wch9pbbYI8MeSbg8M42dHmwu-hKZmYUlnE7VIgLhJ_Zi6byG_PYpTu5s2KYUv9XjPeH-GfSOTSq22I2GnEqXZwhJv-Bdn0aYzCUugF9FHb3Q; expires=Fri, 06-Oct-2017 02:11:26 GMT; path=/; domain=.google.com; HttpOnly 
Accept-Ranges: none 
Vary: Accept-Encoding 
Transfer-Encoding: chunked 

<!doctype html><html itemscope="" itemtype="http://schema.org/WebPage" lang="en"><head><meta content="Search the world's information, including webpages, images, videos and more. Google has many special features to help you find exactly what you're looking for." name="description"><meta content="noodp" name="robots"><meta content="text/html; charset=UTF-8" http-equiv="Content-Type"><meta content="/images/branding/googleg/1x/googleg_standard_color_128dp.png" itemprop=<cut the rest of the HTTP request> 
+0

いいえ私はX-XSS-Protectionのようなものを検出できませんbashスクリプトを使用した要求から見つかったまたは見つからない –

+0

あなたが探しているものをもう少し詳しく説明できますか? –

関連する問題