我需要从这个网址下载 suricata 的最新规则:
http://rules.emergingthreats.net/blockrules/
我正在尝试根据不同的新兴规则和 snort 规则编写自己的规则。尝试用alert
替换drop
。
我甚至无法下载所有规则,因为 apache 2.2.22 的rules.emergingthreats.net
配置以某种方式违反了wget
。
我的命令如下:
# wget -m --user-agent="Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.63 Safari/534.3" "https://rules.emergingthreats.net/"
我正在尝试镜像整个网站。
--2014-07-22 06:18:49-- https://rules.emergingthreats.net/
Resolving rules.emergingthreats.net (rules.emergingthreats.net)... 204.12.217.19, 96.43.137.99
Connecting to rules.emergingthreats.net (rules.emergingthreats.net)|204.12.217.19|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘rules.emergingthreats.net/index.html’
[ <=> ] 1,951 --.-K/s in 0s
Last-modified header missing -- time-stamps turned off.
2014-07-22 06:18:50 (23.3 MB/s) - ‘rules.emergingthreats.net/index.html’ saved [1951]
此后,所有内部目录都给我403 Forbidden
:
--2014-07-22 06:18:51-- https://rules.emergingthreats.net/blockrules/
Reusing existing connection to rules.emergingthreats.net:443.
HTTP request sent, awaiting response... 403 Forbidden
2014-07-22 06:18:51 ERROR 403: Forbidden.
我成功浏览了该网站(目录),我可以用我的浏览器 - Chromium(Ubuntu)下载任何文件。
为什么wget
获取数据失败?
答案1
尝试
wget -mk -w 20 --user-agent="Mozilla/4.5 (X11; U; Linux x86_64; en-US)" https://rules.emergingthreats.net
该网站可能不了解较新的浏览器规范,并且您将网站网址放在引号内