[PHP] Re: using wget in shell for download(snort)

2011-07-10 Thread Jonesy
On Sun, 10 Jul 2011 17:57:26 +0300 (IDT), Geoff Shang wrote:
 On Sun, 10 Jul 2011, Tamara Temple wrote:

 On Jul 10, 2011, at 5:38 AM, Negin Nickparsa wrote:

 I want to make a batch file and then exec it in php
 I have a problem in batch file
 wget have been installed in Yast I want to download a RuleFile from
 snort.org
 
 I used this on shell:
 
 $ wget
 http://www.snort.org/reg-rules/snortrules-snapshot-2900.tar.gz/c0e9480af637e53c7aae823a40a131edc1343db5\-O
 snortrules-snapshot-2900.tar.gz
 
 that string is an oinkcode from the site
 
 this commandline has error and I don't know why

 What is the error?

 This: b5\-O at the end of URL looks suspicious.

 That's the problem.  The \ should be a space.

As a Good Practice, a 'raw' URL in a wget command should always be 
enclosed in 'single quotes'.  For URLs with internal, variable 
substitutions ... well ... you just have to roll up your sleeves a 
little further.

Jonesy
-- 
  Marvin L Jones| jonz  | W3DHJ  | linux
   38.24N  104.55W  |  @ config.com | Jonesy |  OS/2
* Killfiling google  banter.com: jonz.net/ng.htm


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: using wget in shell for download(snort)

2011-07-10 Thread Negin Nickparsa
I tried with single quotes,no need to qoutes cause when I enter it with
quotes it tells me:
command not found

BUT when I enter this one:

wget
http://www.snort.org/reg-rules/snortrules-snapshot-2900.tar.gz/c0e9480af637e53c7aae823a40a131edc1343db5\-O
snortrules-snapshot-2900.tar.gz

it tells me:


http://www.snort.org/reg-rules/snortrules-snapshot-2900.tar.gz/c0e9480af637e53c7aae823a40a131edc1343db5
   = `snortrules-snapshot-2900.tar.gz'
Resolving www.snort.org... 68.177.102.20
Connecting to www.snort.org|68.177.102.20|:80... connected.
HTTP request sent, awaiting response... 403 Forbidden
 ERROR 403: Forbidden.


Re: [PHP] Re: using wget in shell for download(snort)

2011-07-10 Thread Negin Nickparsa
I also tried Goeff's suggest:
wget
http://www.snort.org/reg-rules/snortrules-snapshot-2900.tar.gz/c0e9480af637e53c7aae823a40a131edc1343db5-Osnortrules-snapshot-2900.tar.gz

here is the output:

Resolving www.snort.org... 68.177.102.20
Connecting to www.snort.org|68.177.102.20|:80... connected.
HTTP request sent, awaiting response... 403 Forbidden
09:57:36 ERROR 403: Forbidden.

--09:57:36--  http://snortrules-snapshot-2900.tar.gz/
   = `index.html'
Resolving snortrules-snapshot-2900.tar.gz... failed: Name or service not
known.

FINISHED --09:57:36--
Downloaded: 0 bytes in 0 files

Why failed?