[25477] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 7722 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Feb 1 14:10:26 2005

Date: Tue, 1 Feb 2005 11:10:19 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Tue, 1 Feb 2005     Volume: 10 Number: 7722

Today's topics:
    Re: Obfuscating mod_perl code <Deke@nospam.com>
    Re: Obfuscating mod_perl code <toddrw69@excite.com>
    Re: Obfuscating mod_perl code <toreau@gmail.com>
    Re: Obfuscating mod_perl code xhoster@gmail.com
    Re: Obfuscating mod_perl code xhoster@gmail.com
    Re: Obfuscating mod_perl code <phaylon@dunkelheit.at>
    Re: perl and web development <jurgenex@hotmail.com>
    Re: perl and web development <flavell@ph.gla.ac.uk>
    Re: Perl Code which draws camel ioneabu@yahoo.com
        Problem serving a PDF <dummymb@hotmail.com>
    Re: Problem serving a PDF <mritty@gmail.com>
    Re: Problem serving a PDF <nobull@mail.com>
    Re: Problem serving a PDF <dummymb@hotmail.com>
    Re: Problem serving a PDF (Anno Siegel)
    Re: Problem serving a PDF <1usa@llenroc.ude.invalid>
        recursive module dependencies (hymie!)
    Re: recursive module dependencies (Anno Siegel)
    Re: saving file attachment from mbox ? <usenet_daughter@yahoo.com>
    Re: saving file attachment from mbox ? <jurgenex@hotmail.com>
    Re: saving file attachment from mbox ? <usenet_daughter@yahoo.com>
    Re: saving file attachment from mbox ? chris-usenet@roaima.co.uk
    Re: XML Datei auslesen, bearbeiten =?iso-8859-1?q?zur=F <phaylon@dunkelheit.at>
    Re: XML Datei auslesen, bearbeiten =?ISO-8859-1?Q?zur=F <webmaster@hatw.de>
        XML Datei auslesen, bearbeiten =?ISO-8859-1?Q?zur=FCck_ <webmaster@hatw.de>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Tue, 01 Feb 2005 11:28:32 -0500
From: Deke <Deke@nospam.com>
Subject: Re: Obfuscating mod_perl code
Message-Id: <10vvbhj3pa8j344@news.supernews.com>

Where does one store database access passwords for scripts? Almost every 
instance I have seen, they were stored in the script itself.

Tore Aursand wrote:
> Deke wrote:
> 
>> Ok stealing some code by the root user especially at a hosting site is 
>> definately there. But also I need to hide passwords and access info to 
>> databases as well as other things - so its not just code.
> 
> 
> 1. Don't top-post.
> 2. Don't store "valuable" information in Perl scripts/modules.
> 
> 


------------------------------

Date: Tue, 01 Feb 2005 16:47:46 GMT
From: "Todd W" <toddrw69@excite.com>
Subject: Re: Obfuscating mod_perl code
Message-Id: <SoOLd.17772$Vj3.1393@newssvr17.news.prodigy.com>

"Deke" <Deke@nospam.com> wrote in message
news:10vvbhj3pa8j344@news.supernews.com...
> Where does one store database access passwords for scripts? Almost every
> instance I have seen, they were stored in the script itself.

please dont ignore this bit of info:

> > 1. Don't top-post.
> > 2. Don't store "valuable" information in Perl scripts/modules.


I store config opts in an XML file and write a module that uses XML::XPath
to get the data:

use warnings;
use strict;

package NWS::DBI;
use base q|Class::DBI|;

our $driver   = myWeatherConfig->driver;
our $database = myWeatherConfig->source;

our $dsn = "DBI:$driver:$database";

our $user = myWeatherConfig->user;
our $pass = myWeatherConfig->pass;

__PACKAGE__->connection( $dsn, $user, $pass );

1;

Make the file readable only by you, and then only you and root can get in
the file. If you are scared root will steal the info, you need your own
machine where you are root. If you are scared someone will boot the machine
with a rescue disk and steal the data, you need to lock the machine in a
closet. If you are scared someone will break in the closet... ;0)

Todd W.

> Tore Aursand wrote:
> > Deke wrote:
> >
> >> Ok stealing some code by the root user especially at a hosting site is
> >> definately there. But also I need to hide passwords and access info to
> >> databases as well as other things - so its not just code.
> >
> >
> >
> >




------------------------------

Date: Tue, 01 Feb 2005 18:47:13 +0100
From: Tore Aursand <toreau@gmail.com>
Subject: Re: Obfuscating mod_perl code
Message-Id: <vgPLd.6956$IW4.149154@news2.e.nsc.no>

Deke wrote:
 >>> Ok stealing some code by the root user especially at a hosting site
 >>> is definately there. But also I need to hide passwords and access
 >>> info to databases as well as other things - so its not just code.

 >> 1. Don't top-post.
 >> 2. Don't store "valuable" information in Perl scripts/modules.

> Where does one store database access passwords for scripts?

Why do you continue top-posting when I tell you not to?

> Almost every instance I have seen, they were stored in the script itself.

Doesn't that sound weird? I mean - everyone with access to the script 
can read them, right? Does that sound safe? No, I didn't think so.

Store the passwords encrypted in the storage backend, ie. the database 
or something. That way it'll at least be _more_ secure. The rest of the 
security depends on a whole lot of other things, though.


-- 
Tore Aursand <tore@aursand.no>
"War is too serious a matter to entrust to military men." (Georges
  Clemenceau)


------------------------------

Date: 01 Feb 2005 18:34:56 GMT
From: xhoster@gmail.com
Subject: Re: Obfuscating mod_perl code
Message-Id: <20050201133456.485$By@newsreader.com>

Tore Aursand <toreau@gmail.com> wrote:
> Deke wrote:
>  >>> Ok stealing some code by the root user especially at a hosting site
>  >>> is definately there. But also I need to hide passwords and access
>  >>> info to databases as well as other things - so its not just code.
>
>  >> 1. Don't top-post.
>  >> 2. Don't store "valuable" information in Perl scripts/modules.
>
> > Where does one store database access passwords for scripts?
>
> Why do you continue top-posting when I tell you not to?
>
> > Almost every instance I have seen, they were stored in the script
> > itself.
>
> Doesn't that sound weird? I mean - everyone with access to the script
> can read them, right? Does that sound safe? No, I didn't think so.

Letting people you don't trust have access to the script doesn't sound
safe, either.  Passwords or no.

>
> Store the passwords encrypted in the storage backend, ie. the database
> or something. That way it'll at least be _more_ secure. The rest of the
> security depends on a whole lot of other things, though.


You recommend storing the passwords to the database within the database?
Why not just encase the computer in cement and drop into the Mariana's
trench.  Much more secure, and just as useful.

-- 
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service                        $9.95/Month 30GB


------------------------------

Date: 01 Feb 2005 18:37:54 GMT
From: xhoster@gmail.com
Subject: Re: Obfuscating mod_perl code
Message-Id: <20050201133754.426$15@newsreader.com>

Deke <Deke@nospam.com> wrote:
> Is there a way to obfuscate perl code that runs in apache and mod_perl
> and mason etc..?

Don't use strict or warnings, and don't declare variables in the smallest
possible scope.

Xho

-- 
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service                        $9.95/Month 30GB


------------------------------

Date: Tue, 01 Feb 2005 19:38:26 +0100
From: phaylon <phaylon@dunkelheit.at>
Subject: Re: Obfuscating mod_perl code
Message-Id: <pan.2005.02.01.18.38.26.505935@dunkelheit.at>

xhoster wrote:

> Much more secure, and just as useful.

You think? Who goes down for Backups?

scnr,
p

X'Post removed, f'up to clpm(isc).

-- 
http://www.dunkelheit.at/

Ordinary morality is only for ordinary people.
                       -- Aleister Crowley



------------------------------

Date: Tue, 01 Feb 2005 15:19:11 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: perl and web development
Message-Id: <P5NLd.4069$0O4.837@trnddc03>

Deke wrote:
> Any help on the following subjects will be much appreciated:
>
> 1. Is perl a better option than PHP for web development. Why?

Is a screw driver or a hammer a better tool for home improvement? Why?

> 3. Is perl faster than PHP in most instances?

Is a screw driver or a hammer faster in most instances?

jue 




------------------------------

Date: Tue, 1 Feb 2005 15:41:34 +0000
From: "Alan J. Flavell" <flavell@ph.gla.ac.uk>
Subject: Re: perl and web development
Message-Id: <Pine.LNX.4.61.0502011540220.4966@ppepc56.ph.gla.ac.uk>

On Tue, 1 Feb 2005, Jürgen Exner wrote:

> Is a screw driver or a hammer faster in most instances?

Prompts the question which one stands for Perl, and which for PHP

SCNR


------------------------------

Date: 1 Feb 2005 08:19:47 -0800
From: ioneabu@yahoo.com
Subject: Re: Perl Code which draws camel
Message-Id: <1107274787.596244.73020@z14g2000cwz.googlegroups.com>


Bernhard Walle wrote:
> Hello,
>
> somewhere I've seen Perl code which is very small (i. e. can be put
in a
> signature of a mail) which draws a camel on the screen. Does anybody
> have the source?
>
> Thanks!
> 
> 
> Regards,
> Bernhard

It's on the back of my shirt :-)

wana



------------------------------

Date: 1 Feb 2005 07:43:42 -0800
From: "DMB" <dummymb@hotmail.com>
Subject: Problem serving a PDF
Message-Id: <1107272622.545671.227400@z14g2000cwz.googlegroups.com>

I have a Perl script that serves a PDF on a Unix server and it works
perfectly.  The same script on Windows is not working.  Can someone
tell me what obvious mistake I'm overlooking?

#!c:/Perl/bin/Perl.exe

print "Cache-control: no-cache\n";
print "Content-type: application/pdf\n\n";
open (CODE, "C:/Program Files/Apache
Group/Apache2/htdocs/mp/corr/notfound.pdf") || die;
binmode STDOUT;
binmode CODE;
print <CODE>;
close (CODE);
exit;



------------------------------

Date: Tue, 01 Feb 2005 16:35:55 GMT
From: "Paul Lalli" <mritty@gmail.com>
Subject: Re: Problem serving a PDF
Message-Id: <LdOLd.1695$g16.1410@trndny08>

"DMB" <dummymb@hotmail.com> wrote in message
news:1107272622.545671.227400@z14g2000cwz.googlegroups.com...
> I have a Perl script that serves a PDF on a Unix server and it works
> perfectly.  The same script on Windows is not working.  Can someone
> tell me what obvious mistake I'm overlooking?

The lack of strictures.
The lack of warnings.
The lack of providing the system error message in the "open || die"
construct.
The lack of a valid description of "not working"

Paul Lalli

<Code below for reference>


> #!c:/Perl/bin/Perl.exe
>
> print "Cache-control: no-cache\n";
> print "Content-type: application/pdf\n\n";
> open (CODE, "C:/Program Files/Apache
> Group/Apache2/htdocs/mp/corr/notfound.pdf") || die;
> binmode STDOUT;
> binmode CODE;
> print <CODE>;
> close (CODE);
> exit;
>



------------------------------

Date: Tue, 01 Feb 2005 17:39:37 +0000
From: Brian McCauley <nobull@mail.com>
Subject: Re: Problem serving a PDF
Message-Id: <ctoeim$q05$1@sun3.bham.ac.uk>



DMB wrote:

> I have a Perl script that serves a PDF on a Unix server and it works
> perfectly.  The same script on Windows is not working.  Can someone
> tell me what obvious mistake I'm overlooking?

Yes, you are posting to comp.lang.perl.misc and the total sum of the 
description you give of the undesired behaviour you are observing is 
"not working".

Obvious mistakes like this can be avoided by consulting the posting 
guidelines for this group.




------------------------------

Date: 1 Feb 2005 10:14:18 -0800
From: "DMB" <dummymb@hotmail.com>
Subject: Re: Problem serving a PDF
Message-Id: <1107281658.322045.280830@z14g2000cwz.googlegroups.com>

I guess that means, in short, that you don't see anything wrong with
the code.

Thanks, I didn't think it was wrong either.



------------------------------

Date: 1 Feb 2005 18:30:50 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Problem serving a PDF
Message-Id: <ctohsq$q4i$2@mamenchi.zrz.TU-Berlin.DE>

DMB <dummymb@hotmail.com> wrote in comp.lang.perl.misc:

Please give an attribution and quote some context.

> I guess that means, in short, that you don't see anything wrong with
> the code.

No, it means Brian didn't bother to criticize code so ineptly presented.
There's plenty wrong with it.

> Thanks, I didn't think it was wrong either.

In German, we have an expression for what you're doing: "Du lügst dir in
die eigene Tasche".

Anno


------------------------------

Date: Tue, 01 Feb 2005 18:40:35 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Problem serving a PDF
Message-Id: <Xns95F08B2A4E50Aasu1cornelledu@127.0.0.1>

[ Please provide some context when you post. 
  The time for reading the posting guidelines was yesterday.
]

"Paul Lalli" <mritty@gmail.com> wrote in news:LdOLd.1695$g16.1410
@trndny08:

> "DMB" <dummymb@hotmail.com> wrote in message
> news:1107272622.545671.227400@z14g2000cwz.googlegroups.com...
>> I have a Perl script that serves a PDF on a Unix server and it works
>> perfectly.  The same script on Windows is not working.  Can someone
>> tell me what obvious mistake I'm overlooking?
> 
> The lack of strictures.
> The lack of warnings.
> The lack of providing the system error message in the "open || die"
> construct.
> The lack of a valid description of "not working"

"DMB" <dummymb@hotmail.com> wrote in news:1107281658.322045.280830
@z14g2000cwz.googlegroups.com:

> I guess that means, in short, that you don't see anything wrong with
> the code.
> 
> Thanks, I didn't think it was wrong either.

That attitude will not get you anywhere. Here is your original post:

"DMB" <dummymb@hotmail.com> wrote in news:1107272622.545671.227400
@z14g2000cwz.googlegroups.com:

> I have a Perl script that serves a PDF on a Unix server and it works
> perfectly.  The same script on Windows is not working.  Can someone
> tell me what obvious mistake I'm overlooking?

Here are the obvious mistakes you are overlooking:

1. You either did not look in the server log or did not provide the 
information. Lacking ESP capabilities, we cannot help you. Don't post if 
you don't want help.

> #!c:/Perl/bin/Perl.exe
> 
> print "Cache-control: no-cache\n";
> print "Content-type: application/pdf\n\n";
> open (CODE, "C:/Program Files/Apache
> Group/Apache2/htdocs/mp/corr/notfound.pdf") || die;

2. You call die with no arguments.

use File::Spec::Functions 'catfile';
my $fn = catfile $ENV{DOCUMENT_ROOT}, 'mp', 'corr', 'notfound.pdf';
open my $pdf, '<', $fn or die "Cannot open $fn: $!";

> binmode STDOUT;
> binmode CODE;
> print <CODE>;
> close (CODE);
> exit;

3. There is no point to this exit call.

4. We don't know if you script is even called by Apache. You have 
provided no information on the HTTP status code.

5. "Does not work" does not work.

Sinan.


------------------------------

Date: Tue, 01 Feb 2005 15:18:19 -0000
From: hymie@lactose.smart.net (hymie!)
Subject: recursive module dependencies
Message-Id: <10vv7drjthp5la8@corp.supernews.com>

Greetings.

I'm installing a module (updated CPAN), and in the course of which, it
complains that it needs Cwd.  Cwd is part of PathTools .  So I download
and try to install PathTools.  PathTools won't install because I'm
missing Cwd.

How do I install Cwd when it requires Cwd to have been installed?

hymie!          http://www.smart.net/~hymowitz          hymie@lactose.smart.net
===============================================================================


------------------------------

Date: 1 Feb 2005 16:53:00 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: recursive module dependencies
Message-Id: <ctoc5c$m6o$1@mamenchi.zrz.TU-Berlin.DE>

hymie! <hymie@lactose.smart.net> wrote in comp.lang.perl.misc:
> Greetings.
> 
> I'm installing a module (updated CPAN), and in the course of which, it
> complains that it needs Cwd.  Cwd is part of PathTools .  So I download
> and try to install PathTools.  PathTools won't install because I'm
> missing Cwd.
> 
> How do I install Cwd when it requires Cwd to have been installed?

Cwd is a standard module, you shouldn't have to install it.  If you have
lost it somehow, consider re-installing perl.

Anno


------------------------------

Date: 1 Feb 2005 06:55:21 -0800
From: "Mad Scientist Jr" <usenet_daughter@yahoo.com>
Subject: Re: saving file attachment from mbox ?
Message-Id: <1107269720.982415.69980@f14g2000cwb.googlegroups.com>

>Who are you talking to? Please provide some context.

The only person who replied to the post? This is a thread, are you not
looking at the original post and the one reply thereafter?



------------------------------

Date: Tue, 01 Feb 2005 15:28:21 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: saving file attachment from mbox ?
Message-Id: <peNLd.4072$0O4.670@trnddc03>

Mad Scientist Jr wrote:

Dear Mad

>> Who are you talking to? Please provide some context.
>
> The only person who replied to the post? This is a thread, are you not
> looking at the original post and the one reply thereafter?

No, typically newsreaders will not display already read postings again. A 
rather smart option in particular for busy NGs like clpm because otherwise 
you would have to dig through over 13000 postings, searching for new ones.

Besides there are many, many reasons why previous postings may not be 
available to the reader:
- due to the way Usenet works the previous postings may not have arrived on 
his particular server yet
- it may never arrive on the server
- it has been filtered by the server
- it has been filtered by the user
- ...

And posting without context is also inconsiderate of people using DejaNews 
(aka Google) because what if the posting replied to had X-NoArchive set? 
Then there is no way to find out what the heck you were talking about.

jue 




------------------------------

Date: 1 Feb 2005 08:36:29 -0800
From: "Mad Scientist Jr" <usenet_daughter@yahoo.com>
Subject: Re: saving file attachment from mbox ?
Message-Id: <1107275789.397575.174280@f14g2000cwb.googlegroups.com>

evidently you perl guys aren't using the same kind of newsreader.
i was not aware of that issue, as i use google,
which displays the whole thread
http://www.google.com/advanced_group_search?hl=en



------------------------------

Date: Tue, 1 Feb 2005 17:19:34 +0000
From: chris-usenet@roaima.co.uk
Subject: Re: saving file attachment from mbox ?
Message-Id: <6aq4d2-vvg.ln1@moldev.cmagroup.co.uk>

Mad Scientist Jr <usenet_daughter@yahoo.com> wrote:
> evidently you perl guys aren't using the same kind of newsreader.
> i was not aware of that issue, as i use google,

Chris


------------------------------

Date: Tue, 01 Feb 2005 19:52:53 +0100
From: phaylon <phaylon@dunkelheit.at>
Subject: Re: XML Datei auslesen, bearbeiten =?iso-8859-1?q?zur=FCck?= speiche rn
Message-Id: <pan.2005.02.01.18.52.53.961473@dunkelheit.at>

Christian Schmidt wrote:

> es handelt sich hier schon um die Perl NewsGroup, oder?

The english one. Your probably searching for "de.comp.lang.perl.misc"

hth,
p

-- 
http://www.dunkelheit.at/
That is not dead, which can eternal lie,
and with strange aeons even death may die.
		-- H.P. Lovecraft



------------------------------

Date: Tue, 01 Feb 2005 19:56:30 +0100
From: Christian Schmidt <webmaster@hatw.de>
Subject: Re: XML Datei auslesen, bearbeiten =?ISO-8859-1?Q?zur=FCck_spe?= =?ISO-8859-1?Q?iche_rn?=
Message-Id: <41ffd067_1@news.arcor-ip.de>

Hi,

es handelt sich hier schon um die Perl NewsGroup, oder?


------------------------------

Date: Tue, 01 Feb 2005 18:24:13 +0100
From: Christian Schmidt <webmaster@hatw.de>
Subject: XML Datei auslesen, bearbeiten =?ISO-8859-1?Q?zur=FCck_speiche?= =?ISO-8859-1?Q?rn?=
Message-Id: <41ffbac6_1@news.arcor-ip.de>

Hallo liebe NG,

Ich habe mit SIMPLE::XML versucht eine XML Datei (3KB) zu lesen (mit 
(XMLIn) und in eine Perl Struktur umzuwandeln. So weit so gut. 
Desweiteren hab ich in der Struktur nun einige Änderungen gemacht (3 
Werte verändert).

Nun wollte ich mit XMLOut die ganze Geschichte wieder zurück speichern, 
doch kommt als Ergebnis etwas völlig anderes als der Input.

Auch wenn ich keine Veränderungen vornehme ist das Ergebnis von XMLOut 
ungleich dem, was in der Ursprungsdatei steht.

Habt ihr da eine Idee woran das liegen kann?

Mfg Christian Schmidt


------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc.  For subscription or unsubscription requests, send
#the single line:
#
#	subscribe perl-users
#or:
#	unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V10 Issue 7722
***************************************


home help back first fref pref prev next nref lref last post