php-general Digest 12 Jul 2011 15:48:12 -0000 Issue 7398

Topics (messages 314005 through 314019):

Re: using wget in shell for download(snort)
        314005 by: Negin Nickparsa
        314006 by: Negin Nickparsa
        314007 by: Richard Quadling
        314009 by: Negin Nickparsa
        314010 by: Stuart Dallas
        314011 by: Negin Nickparsa
        314012 by: Stuart Dallas
        314013 by: Stuart Dallas
        314014 by: Negin Nickparsa
        314015 by: Negin Nickparsa
        314017 by: Negin Nickparsa

Re: Linking A C Program Example to PHP
        314008 by: Kranthi Krishna
        314018 by: Chris Stinemetz

Re: vend-bot?
        314016 by: Stuart Dallas
        314019 by: Stuart Dallas

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-gene...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
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.

--- End Message ---
--- Begin Message ---
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?

--- End Message ---
--- Begin Message ---
On 10 July 2011 11:38, Negin Nickparsa <nickpa...@gmail.com> wrote:
> I want to make a batch file and then exec it in php

You say "Batch"  file.

Are you using Windows?

If so, try "double quotes". That is the norm for windows.

And you can either use a space or change it to %20 in the URL.

Make sure the URL is correct by using it in a browser.

I tried 
http://www.snort.org/reg-rules/snortrules-snapshot-2900.tar.gz/c0e9480af637e53c7aae823a40a131edc1343db5%20-Osnortrules-snapshot-2900.tar.gz
and it failed.



-- 
Richard Quadling
Twitter : EE : Zend : PHPDoc
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea

--- End Message ---
--- Begin Message ---
I'm in opensuse I tried wget url for another site it is working
there(without -O)

for example I can have this:

wget http://library.linode.com/assets/695-wget-example.txt

and it is working it will be downloaded on /root

but I'm so confused about snort rules that why I can't download them
I also tried this without -o:



wget 
http://www.snort.org/reg-rules/snortrules-snapshot-2900.tar./c0e9480af637e53c7aae823a40a131edc1343db5
--11:32:01--  
http://www.snort.org/reg-rules/snortrules-snapshot-2900.tar.gz/c9480af637e53c7aae823a40a131edc1343db5
           => `c0e9480af637e53c7aae823a40a131edc1343db5'
Resolving www.snort.org... 68.177.102.20
Connecting to www.snort.org|68.177.102.20|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: 
http://s3.amazonaws.com/snort-org/www/rules/20110208/snortrules-snapot-2900.tar.gz?AWSAccessKeyId=AKIAJJSHU7YNPLE5MKOQ&Expires=1310368612&Signatur4%2FmK3rg3f%2FXFi5VhOm%2FjCW%2BcBSM%3D
[following]
--11:32:04--  
http://s3.amazonaws.com/snort-org/www/rules/20110208/snortrules-apshot-2900.tar.gz?AWSAccessKeyId=AKIAJJSHU7YNPLE5MKOQ&Expires=1310368612&Signure=4%2FmK3rg3f%2FXFi5VhOm%2FjCW%2BcBSM%3D
           => 
`snortrules-snapshot-2900.tar.gz?AWSAccessKeyId=AKIAJJSHU7YNPLE5OQ&Expires=1310368612&Signature=4%2FmK3rg3f%2FXFi5VhOm%2FjCW+cBSM='
Resolving s3.amazonaws.com... 72.21.214.143
Connecting to s3.amazonaws.com|72.21.214.143|:80... connected.
HTTP request sent, awaiting response... 403 Forbidden
11:32:10 ERROR 403: Forbidden.

again error the file is empty

--- End Message ---
--- Begin Message ---
On Mon, Jul 11, 2011 at 8:57 AM, Negin Nickparsa <nickpa...@gmail.com>wrote:

> I logined in there and I used my oinkcode I tried to download just one rule
> I mean *.rules
> It worked I can download one by one but not the group of them
>
> maybe their files are corrupted
>
> see here that I downloaded:
>
>  wget http://cvs.snort.org/viewcvs.cgi/snort/rules/dos.rules
> --12:09:32--  http://cvs.snort.org/viewcvs.cgi/snort/rules/dos.rules
>            => `dos.rules'
> Resolving cvs.snort.org... 64.214.53.20
> Connecting to cvs.snort.org|64.214.53.20|:80... connected.
> HTTP request sent, awaiting response... 200 OK
> Length: unspecified [text/html]
>
>     [        <=>                          ] 88,858        19.99K/s
>
> 12:09:40 (19.98 KB/s) - `dos.rules' saved [88858]
>

The URL you are requesting there gives you the changelog for the file. Did
you even look at the contents of the file you downloaded? If you want to
download the actual file, try
http://cvs.snort.org/viewcvs.cgi/*checkout*/snort/rules/dos.rules?rev=HEAD&content-type=text/plain-
this will give you the latest version in CVS which may or may not be
what
you want.

This has nothing to do with PHP (did it ever?), so I suggest you find a
snort mailing list and ask there.

-Stuart

-- 
Stuart Dallas
3ft9 Ltd
http://3ft9.com/

--- End Message ---
--- Begin Message ---
Sorry that I disssturbed you
I appologize you,ok I will solve my problem in another mailing list


my application is in php
I simplified using snort by writing an application
but in the updating part of files I wanted to automatically download the
files
which user will have nothing to do in shell just clicking on the sub button
my task:by executing in PHP (doing updates)
they have their downloaded files more easily

--- End Message ---
--- Begin Message ---
On Mon, Jul 11, 2011 at 9:10 AM, Negin Nickparsa <nickpa...@gmail.com>wrote:

> Sorry that I disssturbed you
> I appologize you,ok I will solve my problem in another mailing list
>

I'm not disturbed (well, maybe a little :D), just pointing out that since
your issue is to do with Snort and not PHP you might get a better response
from a more relevant mailing list.

my application is in php
> I simplified using snort by writing an application
> but in the updating part of files I wanted to automatically download the
> files
> which user will have nothing to do in shell just clicking on the sub button
> my task:by executing in PHP (doing updates)
> they have their downloaded files more easily
>

I just perused the Snort site and saw this...

"Users may opt to manually download and updates rules files, however most
Snort users automate the process using
PulledPork<http://code.google.com/p/pulledpork/>,
an open source perl script. If you plan on using PulledPork to manage VRT
Rules updates you'll need to login to snort.org and generate an
Oinkcode<http://www.snort.org/account/oinkcode> to
properly configure Oinkmaster."

Why don't you use PulledPork to update the rules since it seems to be the
officially supported method? PHP can shell out to a Perl script in exactly
the same way it can shell out to wget.

-Stuart

-- 
Stuart Dallas
3ft9 Ltd
http://3ft9.com/

--- End Message ---
--- Begin Message ---
On Mon, Jul 11, 2011 at 8:31 AM, Negin Nickparsa <nickpa...@gmail.com>wrote:

> I'm in opensuse I tried wget url for another site it is working
> there(without -O)
>
> for example I can have this:
>
> wget http://library.linode.com/assets/695-wget-example.txt
>
> and it is working it will be downloaded on /root
>
> but I'm so confused about snort rules that why I can't download them
> I also tried this without -o:
>
>
>
> wget
> http://www.snort.org/reg-rules/snortrules-snapshot-2900.tar./c0e9480af637e53c7aae823a40a131edc1343db5
> --11:32:01--
> http://www.snort.org/reg-rules/snortrules-snapshot-2900.tar.gz/c9480af637e53c7aae823a40a131edc1343db5
>           => `c0e9480af637e53c7aae823a40a131edc1343db5'
> Resolving www.snort.org... 68.177.102.20
> Connecting to www.snort.org|68.177.102.20|:80... connected.
> HTTP request sent, awaiting response... 302 Found
> Location:
> http://s3.amazonaws.com/snort-org/www/rules/20110208/snortrules-snapot-2900.tar.gz?AWSAccessKeyId=AKIAJJSHU7YNPLE5MKOQ&Expires=1310368612&Signatur4%2FmK3rg3f%2FXFi5VhOm%2FjCW%2BcBSM%3D
> [following]
> --11:32:04--
> http://s3.amazonaws.com/snort-org/www/rules/20110208/snortrules-apshot-2900.tar.gz?AWSAccessKeyId=AKIAJJSHU7YNPLE5MKOQ&Expires=1310368612&Signure=4%2FmK3rg3f%2FXFi5VhOm%2FjCW%2BcBSM%3D
>           =>
> `snortrules-snapshot-2900.tar.gz?AWSAccessKeyId=AKIAJJSHU7YNPLE5OQ&Expires=1310368612&Signature=4%2FmK3rg3f%2FXFi5VhOm%2FjCW+cBSM='
> Resolving s3.amazonaws.com... 72.21.214.143
> Connecting to s3.amazonaws.com|72.21.214.143|:80... connected.
> HTTP request sent, awaiting response... 403 Forbidden
> 11:32:10 ERROR 403: Forbidden.
>
> again error the file is empty
>

It says it right there... ERROR 403: Forbidden.

According to http://www.snort.org/snort-rules you need to be a subscriber or
registered user to download the rules, so there is some form of validation
on the download URL. In the example you give I'm guessing it's
the c0e9480af637e53c7aae823a40a131edc1343db5. That means you can't simply
download from that URL, you'll need to programatically log into the website,
find the link and then do the download.

-Stuart

-- 
Stuart Dallas
3ft9 Ltd
http://3ft9.com/

--- End Message ---
--- Begin Message ---
I logined in there and I used my oinkcode I tried to download just one rule
I mean *.rules
It worked I can download one by one but not the group of them

maybe their files are corrupted

see here that I downloaded:

 wget http://cvs.snort.org/viewcvs.cgi/snort/rules/dos.rules
--12:09:32--  http://cvs.snort.org/viewcvs.cgi/snort/rules/dos.rules
           => `dos.rules'
Resolving cvs.snort.org... 64.214.53.20
Connecting to cvs.snort.org|64.214.53.20|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]

    [        <=>                          ] 88,858        19.99K/s

12:09:40 (19.98 KB/s) - `dos.rules' saved [88858]

--- End Message ---
--- Begin Message ---
I mean it was my own oinkcode I was a registered user

--- End Message ---
--- Begin Message ---
I appreciate your attention,thank you very much

I have some problems like interdict in my country access that I can't access
the whole sites like this one
I have VPN that I use in my home but not in another locations like here.

I'll try it in another situation

BTW thank you very much Stuart

--- End Message ---
--- Begin Message ---
>>  But the example will NOT work via the web browser on my Apache 2
>> (2.2.17) / PHP (5.3.5) Web Server!
May be a problem with the permissions ?

Kranthi.
http://goo.gl/e6t3

--- End Message ---
--- Begin Message ---
On Sun, Jul 10, 2011 at 4:56 PM, Thomas Dineen <tdin...@ix.netcom.com> wrote:
> Gentle People:
>
>
>   Please Help!
>
>   I am attempting to link a C Program example to PHP using the
> tutorial shown at the link below:
> http://voloreport.com/making-a-c-extension-for-php-in-11-easy-steps
>
>   Everything worked fine up through step 9 in the tutorial:
>
>   Now the problem:
>
>   The example works fine from the command line with either of the
> commands shown below:
>
> php test.php
> php -c /etc/apache2/php.ini test.php
>
>   But the example will NOT work via the web browser on my Apache 2
> (2.2.17) / PHP (5.3.5) Web Server!
>

Have you looked into apache error log?

--- End Message ---
--- Begin Message ---
Why do you insist on not including the list when replying to me??

On Sun, Jul 10, 2011 at 6:12 PM, Kirk Bailey <kbai...@howlermonkey.net>wrote:

> **
> You win nothing. you failed.
>
> the goal is to find a method that will comply with law, and compell even
> the most amoral thief to refrain from stealing copyrighted material.
> Watermarking would have done it, but you have wisely pointed out that the
> law prohibits it. Therefore, we cannot do the one thing that would motivate
> a parasite to not steal.
>

I think you've got our roles reversed. You said you had a way to prevent
people from copying a digital asset, and I said no such thing exists. You
offered the solution of watermarking with the buyer's credit card details,
and I pointed out the legal issues with that, but also reaffirmed that it's
still bits and bytes so it wouldn't be impossible to remove said watermark.

The legal issues aren't the main point. It doesn't matter what you watermark
it with, the watermark can be removed!

-Stuart

-- 
Stuart Dallas
3ft9 Ltd
http://3ft9.com/


On 7/7/2011 10:07 AM, Stuart Dallas wrote:
>
> PLEASE INCLUDE THE LIST WHEN REPLYING!
>
> On Thu, Jul 7, 2011 at 2:58 PM, Kirk Bailey <kbai...@howlermonkey.net>wrote:
>
>>  Oh, it's simple. Watermark the work. Water mark it with something that
>> no sane person would care to have anyone else know.
>>
>> Their credit card information used to make the purchase.
>>
>
>  Ignoring how freakin' irresponsible that is, it's also almost certainly a
> breach of the credit card companies terms and conditions. There are strict
> rules about how credit card details are stored, and distributing them in
> full, without encryption of any kind, even back to the card holder, is
> prohibited.
>
>  Legal issues aside, it's still just bits and bytes. Watermarks can be
> removed.
>
>  Now, what do I win?
>
>
>  -Stuart
>
> --
> Stuart Dallas
> 3ft9 Ltd
> http://3ft9.com/
>
>
>    On 7/6/2011 8:28 PM, Stuart Dallas wrote:
>>
>>  Again, please include the list when replying.
>>
>>  On Thu, Jul 7, 2011 at 1:06 AM, Kirk Bailey <kbai...@howlermonkey.net>wrote:
>>
>>>
>>>
>>> On 7/6/2011 6:08 PM, Stuart Dallas wrote:
>>>
>>> Please include the list when replying.
>>>
>>> On Wed, Jul 6, 2011 at 10:20 PM, Kirk Bailey 
>>> <kbai...@howlermonkey.net>wrote:
>>>
>>>> Um, assuming dishonest intent on the customers part, why would the token
>>>> NOT be shared?
>>>>
>>>
>>>  I meant shared within your system between customers. Whether you lock
>>> the URL or not, if customers want to share the asset(s) they're downloading,
>>> they will. Nothing you can really do about that.
>>>
>>>  Wanna bet? I know how to make even the most selfish amoral theif NOT
>>> share copyrighted material.
>>> [snip fascinating technical detail bits]
>>>
>>
>>  Yeah, I'll take that bet. That's quite a claim, and one the MPAA, RIAA
>> and many other similar organisations around the world would be tripping over
>> themselves to throw money at you if it were true.
>>
>>  It's bits and bytes. Anything you can come up with can be broken. It is
>> categorically not possible to prevent the duplication of digital
>> information, copyrighted or not. It is possible to make it pretty difficult,
>> but not impossible.
>>
>>  The way you phrased that is interesting... "I know how to make [people]
>> NOT share copyrighted material" - you didn't say prevent them from doing it,
>> which might suggest your method has a social engineering aspect.
>> Alternatively I could be reading too much into the language you used - I do
>> that sometimes.
>>
>>  Come to think of it, I can make them not share copyrighted material too
>> - make the copyrighted material something that nobody would ever want.
>> What's the number for the RIAA? Oh, hang on, the record companies have tried
>> that several times - they realised the business model is not sustainable!
>>
>>  Oh, and I think you'll find most of the people who circumvent copy
>> protection mechanisms are not selfish or amoral, they're just curious,
>> intelligent people looking for a challenge.
>>
>> -Stuart
>>
>> --
>> Stuart Dallas
>> 3ft9 Ltd
>> http://3ft9.com/
>>
>>
>>   --
>> end
>>
>> Very Truly yours,
>>                  - Kirk Bailey,
>>                    Largo Florida
>>
>>                        kniht
>>                       +-----+
>>                       | BOX |
>>                       +-----+
>>                        think
>>
>>
>
> --
> end
>
> Very Truly yours,
>                  - Kirk Bailey,
>                    Largo Florida
>
>                        kniht
>                       +-----+
>                       | BOX |
>                       +-----+
>                        think
>
>

--- End Message ---
--- Begin Message ---
On Tue, Jul 12, 2011 at 2:40 PM, Kirk Bailey <kbai...@howlermonkey.net>wrote:

>
>
> On 7/11/2011 4:00 AM, Stuart Dallas wrote:
>
>> Why do you insist on not including the list when replying to me??
>>
> I was attempting to be polite. Recall that I was criticizing your response,
> and I thought it was simply more considerate to do it off list.


If you're not willing to disagree with me in public, don't expect your
argument to carry much weight.

-Stuart

-- 
Stuart Dallas
3ft9 Ltd
http://3ft9.com/

--- End Message ---

Reply via email to