I'am开发bash脚本可以从头标记检测Web应用程序防火墙,但是我可以找到像我的想法那样的示例?如何从HTTP响应中检测出某些东西
-4
A
回答
1
要从bash中找到请求标题,你可以简单地使用curl
。如果你在windows上,你会希望新的windows bash shell或者cygwin来运行它。
还有几十个技巧,你可以用任何你想要的格式来获得任何想要的东西,大量的SO问题来回答你提出的任何问题。
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
你能稍微详细解释一下你正在寻找什么,目前尚不清楚。 –
相关问题
- 1. 如何从rspec控制器测试中省略某些东西?
- 2. 如何检测VBA excel是否发现了某些东西?
- 3. 如何检测到某些东西将被删除
- 4. 从列表中删除某些东西
- 5. 变量检查,某些东西不对
- 6. 如何确保某些http标题出现在响应中
- 7. 从棱镜中的演示中如何改变某些东西?
- 8. 如何从mongo中的数组中找到某些东西
- 9. Xcode - 某些东西可能不会响应
- 10. [Android] min3d -collision检测和一些东西
- 11. 如何从文件中删除某些东西?
- 12. 如何测试某些东西是不是整数?
- 13. c#http在web响应中没有得到任何东西
- 14. React Native:如何从屏幕上弹出某些东西并弹跳?
- 15. 如何在Rails中移动某些东西?
- 16. 如何在Emacs中对某些东西着色?
- 17. 如何赋值给二维数组中的某些东西?
- 18. 如何在onCreate中打印某些东西
- 19. 如何在Java中编译时断言某些东西?
- 20. 如何在STA线程中运行某些东西?
- 21. 如何在数据库中插入某些东西?
- 22. 如何在绘制函数中循环某些东西?
- 23. 你如何在Python中调用某些东西?
- 24. 我如何找到R中的某些东西的百分比?
- 25. 在CUP中:如何使某些东西可选来解析?
- 26. 如何在Java脚本中“呼叫”某些东西
- 27. 某些东西击落了java脚本
- 28. debian cron bug或缺少某些东西?
- 29. PHP包含,但只有某些东西
- 30. Android在应用程序上下文中存储某些东西
那么你的脚本至今呢? – odradek