[9414] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3011 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jun 30 13:57:26 1998

Date: Tue, 30 Jun 98 10:44:09 -0700
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, 30 Jun 1998     Volume: 8 Number: 3011

Today's topics:
    Re: Have we got a good free Perl manual? (Tim Smith)
    Re: Have we got a good free Perl manual? Klaus.Schilling@home.ivm.de
    Re: Have we got a good free Perl manual? (Tim Smith)
        Help! Need Mult. Recipients <james_mccomb@intuit.com>
    Re: Help! Need Mult. Recipients <rootbeer@teleport.com>
    Re: Help! Need Mult. Recipients <quednauf@nortel.co.uk>
    Re: Help! Need Mult. Recipients <quednauf@nortel.co.uk>
    Re: Help! Need Mult. Recipients <maierc@chesco.com>
    Re: Hiding the Perl source (Billy Chambless)
    Re: Hiding the Perl source (Thomas Munn)
    Re: Hiding the Perl source <banjo@actrix.gen.nz>
    Re: Hiding the Perl source (Charlie Stross)
        How to check existence of password protected webpage? <chris.wareham@blackwell.co.uk>
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: 27 Jun 1998 21:44:37 -0700
From: tzs@halcyon.com (Tim Smith)
Subject: Re: Have we got a good free Perl manual?
Message-Id: <6n4hnl$su3$1@halcyon.com>

Tom Christiansen  <tchrist@mox.perl.com> wrote:
> [courtesy cc of this posting sent to cited author via email]
>In comp.lang.perl.misc, 
>    "Matthew O. Persico" <mpersico@erols.com> writes:
>:Then what is the solution? Don't use Perl? No. Write a good free manual?
>:Yes. 
>
>No.  We already have one, thank you very much.

I recently needed an interpreted language to embed in a project.
Perl and most other languages were overkill for what I wanted, so I
briefly considered taking some free language like Perl, and producing a
subset for my project.  To that subset, I would have then added
extensions specific for the environment I was developing for.
Ultimately, I didn't use Perl, because I decided I could write my own
Forth-like language faster than I could understand enough of Perl's
internals to radically hack it like I would have had to.  But suppose I
had used Perl as the basis for my language.

I would have needed documentation.  Could I have taken your
documentation, hacked out the parts I didn't need, and rewrote the parts
I kept to conform to my hacked up Perl-like language, and included this
new variant of your documentation with my product, all without having to
get special permission from you?  If the answer is "no", then your
documentation does not meet FSF's ideals for documentation.  Why do you
have a problem with this?  This doesn't mean your documentation is bad,
or non-free in many senses of the word free.  It just means it is not
suitable for what they want.

--Tim Smith


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

Date: 28 Jun 98 08:46:12 GMT
From: Klaus.Schilling@home.ivm.de
Subject: Re: Have we got a good free Perl manual?
Message-Id: <359602d4.0@news.ivm.net>

>
>                   Re: Have we got a good free Perl manual?
>                                       
>   References:
>          <sd7k975zvek.fsf@mescaline.gnu.org> 
>          <m2n2b8tvzb.fsf@mailhost.neuroinformatik.ruhr-uni-bochum.de> 
>          <359066E6.9E586589@erols.com> 
>          <6mpp12$jpp$1@csnews.cs.colorado.edu>
>
>I recently needed an interpreted language to embed in a project.
>Perl and most other languages were overkill for what I wanted, so I
>briefly considered taking some free language like Perl, and producing a
>subset for my project.  To that subset, I would have then added
>extensions specific for the environment I was developing for.
>Ultimately, I didn't use Perl, because I decided I could write my own
>Forth-like language faster than I could understand enough of Perl's
>internals to radically hack it like I would have had to.  But suppose I
>had used Perl as the basis for my language.

What is the advantage of forth over perl, lisp, tcl, python, ...? I've seen a 
GNU forth compiler (or interpreter???),
but not yet much forth documentation, be it free or not, that would enable
to get started with GNU forth and try to figure how good it is. The ansi forth
standard seems to be written without taking implementation problems into
account.

   Klaus Schilling













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

Date: 28 Jun 1998 07:24:05 -0700
From: tzs@halcyon.com (Tim Smith)
Subject: Re: Have we got a good free Perl manual?
Message-Id: <6n5jm5$4sg$1@halcyon.com>

In article <359602d4.0@news.ivm.net>,  <Klaus.Schilling@home.ivm.de> wrote:
>>Ultimately, I didn't use Perl, because I decided I could write my own
>>Forth-like language faster than I could understand enough of Perl's
>>internals to radically hack it like I would have had to.  But suppose I
 ...
>What is the advantage of forth over perl, lisp, tcl, python, ...? I've seen a 
>GNU forth compiler (or interpreter???),

Forth-like interpreters are extremely easy to write, even if one has not
used a forth-like language in several years.  If you do not need high
speed out of an implementation, one can design the language and code the
interpreter in a couple of hours.  Lisp may be similarly easy to
implement, but I don't know lisp.

With a forth-like language, parsing and lexical analysis basically
consists of deciding if something is a number or not.  No need to dust
off the lex and yacc book for that. :-)

--Tim Smith


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

Date: Mon, 29 Jun 1998 15:05:25 -0700
From: James McComb <james_mccomb@intuit.com>
Subject: Help! Need Mult. Recipients
Message-Id: <35980FA5.69D9FED8@intuit.com>

Using a basic form.cgi (utilizing cgi-lib.pl), I need to make it so the
submitted information goes to multiple recipients.

The cgi currently reads:
$recipient =  "address\@domain.com";

I need to be able to specify more than one email address, and, if
possible, for it to strip out an email address posted as a bcc for a
third email.

The part that strips out the email for the reply to address reads as:
print MAIL "Reply-to: $in{'email'}\n";

Any help would be greatly appreciated.
Thanks,
James McComb
james_mccomb@intuit.com



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

Date: Tue, 30 Jun 1998 03:17:59 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Help! Need Mult. Recipients
Message-Id: <Pine.GSO.3.96.980629201620.17225B-100000@user2.teleport.com>

On Mon, 29 Jun 1998, James McComb wrote:

> Using a basic form.cgi (utilizing cgi-lib.pl), I need to make it so the
> submitted information goes to multiple recipients.

You're sending email, right? The documentation for the module or program
you're using to send the mail should tell you how to specify the
recipients. If you're still stuck after reading the docs, try the author
of the module or a newsgroup about the program or protocol you're using.
Good luck! 

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Tue, 30 Jun 1998 10:06:21 +0100
From: "F.Quednau" <quednauf@nortel.co.uk>
Subject: Re: Help! Need Mult. Recipients
Message-Id: <3598AA8D.4CC1066F@nortel.co.uk>

James McComb wrote:
> 
> Using a basic form.cgi (utilizing cgi-lib.pl), I need to make it so the
> submitted information goes to multiple recipients.

Don't know if I quite understood you. But if you have something like 

$rec = 'joe@bloggs.com';
&send_mail($rec);

Then to do the same on multiple recipients, you'd have to do something like

forach $rec(@recipients) {
  &send_mail($rec);
}

where @recipients holds the names you want to send to.

HTH

-- 
____________________________________________________________
Frank Quednau               
http://www.surrey.ac.uk/~me51fq
________________________________________________


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

Date: Tue, 30 Jun 1998 10:22:50 +0100
From: "F.Quednau" <quednauf@nortel.co.uk>
Subject: Re: Help! Need Mult. Recipients
Message-Id: <3598AE6A.AA7CF003@nortel.co.uk>

F.Quednau wrote:

> forach $rec(@recipients) {
>   &send_mail($rec);
> }
> 
foreach that is, foreach...*sigh*


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

Date: Tue, 30 Jun 1998 13:05:21 GMT
From: Charles Maier <maierc@chesco.com>
Subject: Re: Help! Need Mult. Recipients
Message-Id: <35971B68.4F76@chesco.com>

James McComb wrote:
> 
> Using a basic form.cgi (utilizing cgi-lib.pl), I need to make it so the
> submitted information goes to multiple recipients.
> 
> The cgi currently reads:
> $recipient =  "address\@domain.com";
> 
> I need to be able to specify more than one email address, and, if
> possible, for it to strip out an email address posted as a bcc for a
> third email.
> 
> The part that strips out the email for the reply to address reads as:
> print MAIL "Reply-to: $in{'email'}\n";
> 
> Any help would be greatly appreciated.
> Thanks,
> James McComb
> james_mccomb@intuit.com

Multiple recipients can be designated on the TO: line by separating them
with COMMAS..

thisguy@thiserver.com, thatguy@thatserver.com .... etc

-- 
Chuck Maier
CDM Consulting Services
http://www.cdmcon.com
(610) 943-2726


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

Date: 28 Jun 1998 15:00:44 GMT
From: billy@cast.msstate.edu (Billy Chambless)
Subject: Re: Hiding the Perl source
Message-Id: <6n5lqs$56j$2@nntp.msstate.edu>

In article <6n1h3p$ji4$1@news.NERO.NET>, stanley@skyking.OCE.ORST.EDU (John Stanley) writes:
|> In article <eli$9806261259@qz.little-neck.ny.us>,
|> Eli the Bearded  <*@qz.to> wrote:
|> >Tough. If a program reads a file, I can find out about it without looking
|> >at the code. There is nothing you can do about it.
 
|> Security is not a yes/no, 1/0, black/white issue. "Security" is a real
|> number.  The amount of security necessary depends on how much you need
|> to protect something, or how much you want to protect it.  "Security
|> through obscurity is a horrible lie", or words to that effect, show up
|> every so often. Security through obscurity might very well be sufficient
|> for the purpose, however.


That's true.

The argument AGAINST SbO is that the truly determined and wise hacker[1]
can always figure out what you've done and defeat it, so SbO only
controls the (relatively) clueless.

This is also true.

BUT: since the ratio of truly determined and wise hackers to the
relatively clueless is about 1 / 567,564,234,978, it's no big deal.

I wouldn't use SbO to protect nuclear secrets, but it might stop
the local PHB or PFY from trying to "enhance" the program you've given
them.

[1] "Hackers" is used here in the canonical sense, not the media
misuse.


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

Date: Mon, 29 Jun 1998 00:18:19 GMT
From: munn@bigfoot.com (Thomas Munn)
Subject: Re: Hiding the Perl source
Message-Id: <6n6mo8$tbl$1@News.Alliance.Net>

Well, if you are worried about people "perusing" your source on the web, just 
do ssi perl (with iis).  The perl is embedded in the HTML and works great, and 
the user doesn't see the code.  To mention it, I think that apache does 
something similar.  Also if you are doing CGI, the code won't show up (unless 
you want to distribute your code). 

There also is a "perl exe" generator if you are wanting to distribute your 
code in windows format.  This embeds a native perl intrepreter and hides the 
code like you are hoping for.

Thomas


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

Date: Mon, 29 Jun 1998 00:38:05 +0000
From: banjo <banjo@actrix.gen.nz>
Subject: Re: Hiding the Perl source
Message-Id: <3596E1ED.1071@actrix.gen.nz>

Tom Christiansen wrote:
> In comp.lang.perl.misc,
>     killord@my-dejanews.com writes:
> :You want to access yr database- You want
> :to set the database user to a certain person and password combo- but without
> :anyone seeing it in the script, or where the file is kept. So there is a
> :*perfectly* *valid* reason that he may want to hide his script from the
> :public- (not to say that there isn't a better method for doing what I
> :described, and not to say that Pham was necessarily thinking of this
> :however)-
> 
> Putting passwords in cleartext is highly bad.  In fact, it's
> somewhere in the supernutty range.  Compiling doesn't
> help this.  Sheesh.  I thought we all knew this?
> 
> --tom

  Ive got a similar problem with DBI usernames and passwords on a fairly
open
  sun box.  We have a CGI scipt that lets users check personal details,
on a 
  mySQL database.  How do i keep the password hidden?
 
-banjo
A journey of a thousand miles begins with a blister.




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

Date: Tue, 30 Jun 1998 13:05:04 GMT
From: charlie@antipope.org (Charlie Stross)
Subject: Re: Hiding the Perl source
Message-Id: <slrn6phokm.23c.charlie@cs.ed.datacash.com>

In the name of Kibo the Compassionate, the Merciful,
on Mon, 29 Jun 1998 00:38:05 +0000,banjo
the supplicant <banjo@actrix.gen.nz> implored:

>  Ive got a similar problem with DBI usernames and passwords on a fairly
>open
>  sun box.  We have a CGI scipt that lets users check personal details,
>on a 
>  mySQL database.  How do i keep the password hidden?

crypt() is your friend.

Clue 1: there is no decrypt(). What you do is encrypt the user's password,
then when they want to check their details, get them to enter a password;
encrypt it, and compare to the stored encrypted password. 

Clue 2: read up on how crypt() works, don't just throw it in at random. Did 
you remember to add (and store) some salt?

Clue 3: obtain and read "Applied Cryptography" by Bruce Schneier (2nd 
edition). 


-- Charlie


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

Date: Mon, 29 Jun 1998 16:19:08 GMT
From: Chris Wareham <chris.wareham@blackwell.co.uk>
Subject: How to check existence of password protected webpage?
Message-Id: <3597BF09.C0A315F8@blackwell.co.uk>

I'm trying to use the LWP module to check that various webpages are
accessible. Some of these are password protected, and some aren't. I've
read ``Web Client Programming with Perl'', but can't get it right. My
attempt thus far is:

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

#!/usr/bin/perl -w

use strict;
use LWP::UserAgent;

my $url   = 'www.blackwell.co.uk/index.html';
my $realm = '';
my $uname = '';
my $pass  = '';

my $ua = new LWP::UserAgent;

my $response = $ua->credentials($url, $realm, $uname, $pass);
if($response != 200) {
	print "Failure\nResponse : $response\n";
} else {
	print "Success\n";
}

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

This fails with the reponse code `2', which isn't a valid HTTP response
code. Help!!!

Chris
-- 
chris.wareham@blackwell.co.uk
+44 (0)1865 792792 ext. 3381


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

Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 8 Mar 97)
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.  

To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.

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.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

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 V8 Issue 3011
**************************************

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