da667 / Autosnort

Repo for autosnort scripts.
MIT License
157 stars 89 forks source link

Autosnort Centos6 #28

Closed PingLord closed 10 years ago

PingLord commented 10 years ago

Hello,

After the epel packages installation it will throw an error of not contacting snort.org .

One of the issues is that now it uses https instead of http.

The other big issue is that the snort website has been completely changed so a curl follow redirect will not work.The location will be written in the response header like this :

[root@localhost ~]# curl -I https://www.snort.org/downloads/snort/snort-2.9.6.2.tar.gz HTTP/1.1 302 Found Server: Cowboy Connection: keep-alive Date: Tue, 05 Aug 2014 12:31:37 GMT Status: 302 Found Strict-Transport-Security: max-age=31536000 X-Frame-Options: SAMEORIGIN X-Xss-Protection: 1; mode=block X-Content-Type-Options: nosniff X-Ua-Compatible: chrome=1 Location: http://s3.amazonaws.com/snort-org-site/production/release_files/files/000/000/218/original/snort-2.9.6.2.tar.gz?AWSAccessKeyId=AKIAIXACIED2SPMSC7GA&Expires=1407245497&Signature=up%2BOPIiUnRRkRYSWzpH7jYH7gfE%3D Content-Type: text/html; charset=utf-8 Cache-Control: no-cache Set-Cookie: request_method=HEAD; path=/; secure Set-Cookie: _snort-org_session=NzFCTFlRblI0dUpIWFI0UHMvQlIxRUVhNTByNThVaGNJZkZtTTZ4M09NSlp1TjZ1ZFBacnNrckUvaDdIQ0oweEdjSEFiL01pWjdQcldPeG1qVW1XS01jSkZQWUtSUFM4QnE5VGRBbUhoTG5LbDh0VmFDaTl2Ui96V0wyTTRTY29SKzVzZlVHeHlGYStvbmtPSmdnV2txYm1GU3hIUS9TbU4xaE9paFV2ZW0zOEdBMWc3MHcwdGJ0eTBlM2hldTZGeCsxcWlPaDEvYVptUy9FVDJKN1dXTW1CaC9TSDdHczlNb3ZSMEJ1UW1uVFFBWjNSMUJ6TFRMbElRMjZUeUV6UkU3b1QxSnhGWUtWOU5OSEwzdzJpVDM1MkwzQUZTaXF1VVFvNE5kWVAvbm1qUi90Tzl0WEdrOFlTTDNnUmtHekRqUFBqM3JDNmgxa1FxZXNGTnVvVmcvMTlKOGk2em9Oalo3ZWFqZHNRbXR5TXFxVFBSNFdSQjFMUCtiNzMvTW5YQi9iYlJ6eHJwM2o0ejREbjVmOTMyNGh2NW5vb1VjdnhGWW5YS1p6RDF1QT0tLUpQdG9LUEkzTzBlcGdQWmlORU05Y0E9PQ%3D%3D--af4a2e9e5ec44966604548a7b6ab3a3c6be1b986; path=/; secure; HttpOnly X-Request-Id: beca004f-3f88-4d97-a3ca-172afda25b8c X-Runtime: 0.095467 Via: 1.1 vegur

As you see there is a location which servers the file. I tried to get the file using the following (had a cookie file ) :

curl -I https://www.snort.org/downloads/snort/snort-2.9.6.2.tar.gz | grep Location | cut -d ':' -f1 --complement -s > tst.txt && ur=$(cat tst.txt);wget --load-cookie=g2 $ga

Anyone has any solution other than this ?

PingLord commented 10 years ago

Im just an idiot.It seems wget does the redirect for itself.

Just change from http:// to https:// and for daq is downloads/snort/

Thank you