Re: [PHP] Linking A C Program Example to PHP

2011-07-11 Thread Kranthi Krishna
>>  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

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



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

2011-07-11 Thread Negin Nickparsa
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


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

2011-07-11 Thread Stuart Dallas
On Mon, Jul 11, 2011 at 8:57 AM, Negin Nickparsa 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,85819.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/


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

2011-07-11 Thread Negin Nickparsa
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


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

2011-07-11 Thread Stuart Dallas
On Mon, Jul 11, 2011 at 9:10 AM, Negin Nickparsa 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,
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 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/


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

2011-07-11 Thread Stuart Dallas
On Mon, Jul 11, 2011 at 8:31 AM, Negin Nickparsa 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/


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

2011-07-11 Thread Negin Nickparsa
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,85819.99K/s

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


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

2011-07-11 Thread Negin Nickparsa
I mean it was my own oinkcode I was a registered user


Re: [PHP] vend-bot?

2011-07-11 Thread Stuart Dallas
Why do you insist on not including the list when replying to me??

On Sun, Jul 10, 2011 at 6:12 PM, Kirk Bailey 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 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 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 
>>> 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
>
>


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

2011-07-11 Thread Negin Nickparsa
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


Re: [PHP] Linking A C Program Example to PHP

2011-07-11 Thread Chris Stinemetz
On Sun, Jul 10, 2011 at 4:56 PM, Thomas Dineen  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?

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