[9948] in Perl-Users-Digest
Perl-Users Digest, Issue: 3541 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Aug 25 19:02:12 1998
Date: Tue, 25 Aug 98 16:00:23 -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, 25 Aug 1998 Volume: 8 Number: 3541
Today's topics:
Re: "protocol not supported" with socket() (Jonathan Stowe)
DBI on HPUX 9.05 (Anthony Reeves)
Re: Decoding URL's (I R A Aggie)
Re: Decoding URL's (Honza Pazdziora)
did not produce a valid header trex16@my-dejanews.com
Re: did not produce a valid header (I R A Aggie)
Re: Exporting Methods (Mark-Jason Dominus)
Re: Getting the 500 series error in IIS 4.0 (Jonathan Stowe)
Re: Hacking Schools Network (Adam Spragg)
Re: In which directory 'CGI.pm' file should be copied? (Jonathan Stowe)
invalid header trex16@my-dejanews.com
more info on broken require/use statement <erik@zeno.com>
Re: NT Perl 5.0 and IIS 4.0 Logon Permissions cbinder@my-dejanews.com
Re: NT Perl 5.0 and IIS 4.0 Logon Permissions cbinder@lexmark.com
Re: Outputting to MS Excel file format (Jonathan Stowe)
Re: Pattern match for filename extensions (Larry Rosler)
Re: Perl compiler <sneaker@sneex.fccj.org>
Re: Perl compiler (Craig Berry)
Re: Perl compiler <sneaker@sneex.fccj.org>
Re: Perl compiler (Andrew M. Langmead)
Re: Perl compiler (Honza Pazdziora)
Re: Perl compiler (Honza Pazdziora)
Re: Perl compiler (Honza Pazdziora)
Re: Perl compiler (Honza Pazdziora)
Re: Perl compiler (Jim Michael)
Re: Perl compiler (Jonathan Stowe)
Re: Perl FAR version 1.1.1 MAKE SURE YOU READ THIS BEFO (I R A Aggie)
Perl Indenter or Beautifier - Does NOT exist? <kin@verio.com>
Re: Perlscript: where is documentation (Jonathan Stowe)
rand function max is 2^16? <warren@nospam.amis.com>
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 25 Aug 1998 21:16:49 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: "protocol not supported" with socket()
Message-Id: <35e32452.12110907@news.btinternet.com>
On Mon, 24 Aug 1998 13:02:06 -0700, Gregor Mosheh wrote :
>I've freshly installed PERL on our new system. When I try to use the
>socket() function, I get a "Protocol not supported" error at runtime.
>
>I've tried compiling with loadable modules disabled, specifying that
>Socket be statically compiled in - doesn't help. "make test" reports all
>tests OK.
>
There is a section in perlfaq8 on this entitled :
Why doesn't my sockets program work under System V (Solaris)? What
does the eror message "Protocol not supported" mean?
This might be revealing.
--
/J\
Jonathan Stowe
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
------------------------------
Date: Tue, 25 Aug 1998 21:44:06 GMT
From: areeves1@csc.com (Anthony Reeves)
Subject: DBI on HPUX 9.05
Message-Id: <35e3301a.509119@news.es.hac.com>
Has anyone complied DBI on a HPUX 9.05 system?
I keep getting the following errors:
Bus Error
Error Code 138
and I cannot get it to work..
this is the make test after the make..
any ideas?
please email if you can to:
areeves1@csc.com
------------------------------
Date: Tue, 25 Aug 1998 17:42:57 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Decoding URL's
Message-Id: <fl_aggie-2508981742570001@aggie.coaps.fsu.edu>
In article <35E319F2.5728FAE1@wwwebcat.com>, Eric Shipek
<erics@wwwebcat.com> wrote:
+ submitted. I've read about how to do it, but for some reason it just
+ doesn't click with me. I have the mouse book by the way.
'perldoc CGI' or
<url:http://www.genome.wi.mit.edu/ftp/pub/software/WWW/cgi_docs.html>
James
------------------------------
Date: Tue, 25 Aug 1998 22:03:16 GMT
From: adelton@fi.muni.cz (Honza Pazdziora)
Subject: Re: Decoding URL's
Message-Id: <slrn6u6d54.86t.adelton@aisa.fi.muni.cz>
On Tue, 25 Aug 1998 14:09:22 -0600, Eric Shipek <erics@wwwebcat.com> wrote:
> I was wondering if there is a similar loop that I could use to go
> through form data to access the variables variables and value pairs
> submitted. I've read about how to do it, but for some reason it just
> doesn't click with me. I have the mouse book by the way.
>
> I appreciate your help as this is my first introduction to the PERL
> language and I thank you in advance for your help and advice.
You probably want
use CGI;
my $query = new CGI;
for my $name ($query->param)
{
my @values = $query->param($name);
### some processing of the values
}
You probably want to check man CGI(3) and perl* man pages or Camel
book, if you are new to Perl.
Hope this helps,
--
------------------------------------------------------------------------
Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
I can take or leave it if I please
------------------------------------------------------------------------
------------------------------
Date: Tue, 25 Aug 1998 21:03:43 GMT
From: trex16@my-dejanews.com
Subject: did not produce a valid header
Message-Id: <6rv8rf$2or$1@nnrp1.dejanews.com>
Anyone... I am trying to get a perl program to take input from a form and
simply print these variables onto the browser. However, I keep getting an
error that reads an invalid header. right now, the header that I am
producing is: Content-type: text/html
Anyone know what is wrong here?
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Tue, 25 Aug 1998 17:40:16 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: did not produce a valid header
Message-Id: <fl_aggie-2508981740160001@aggie.coaps.fsu.edu>
In article <6rv8rf$2or$1@nnrp1.dejanews.com>, trex16@my-dejanews.com wrote:
+ Anyone... I am trying to get a perl program to take input from a form and
+ simply print these variables onto the browser. However, I keep getting an
+ error that reads an invalid header. right now, the header that I am
+ producing is: Content-type: text/html
+
+ Anyone know what is wrong here?
Yes, you haven't consulted your server's error log. Find out where it's
at, and see what it says is the problem.
Probably a syntax error. Have you done a 'perl -c <script>'?
James
------------------------------
Date: 25 Aug 1998 17:04:32 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: Exporting Methods
Message-Id: <6rv8t0$i2r$1@monet.op.net>
In article <35E37B0C.659A@comenius.ms.mff.cuni.cz>,
Jan Krynicky <JKRY3025@comenius.ms.mff.cuni.cz> wrote:
>Exporter is a nice tool for most cases, but sometimes you'll find out
>that you have to do it "by hand".
Sometimes it's nice to do it by hand even if you don't have to.
I talked about this at TPC, and the notes from the talk are on-line at
http://www.plover.com/~mjd/perl/TPC/Hardware.html
The Exporter section in particular is at
http://www.plover.com/~mjd/perl/TPC/Hardware-notes.html#Manual_Exporting
It includes The Very Very Short Guide to Exporting Without the Exporter.
Here's the Big Secret about the Exporter that everyone whould know:
You can do exactly what the Exoprter does in *one* line of code.
------------------------------
Date: Tue, 25 Aug 1998 21:16:39 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: Getting the 500 series error in IIS 4.0
Message-Id: <35e2fa94.2018603@news.btinternet.com>
On Mon, 24 Aug 1998 16:57:11 GMT, charettec@my-dejanews.com wrote :
>Hello Ken,
>
>- I am using GNU Perl 5 for Win32. I had downloaded the cgi.pm (and
>subsequently renamed it cgi.cgi) module separately and have it placed in the
>same directory as perl.exe and my script.
>
Oh my word: I would seriously check out
<URL:http://w4.lns.cornell.edu/~pvhp/perl/ntperl.html> before you
connect your server to a network and pay attention to what you are
being told there. You should leave your Perl installation just as it
was and set up your server correctly.
>- I used Windows NT Explorer | View | Options to change the file association.
>I don't know where to make the changes in the Registry.
>
I dont know about IIS4 but this is relatively well documented for IIS3
(in the online documentation) - the key words you are looking for are
"Script Map". If you have any further questions about that then you
might be better served to go to
comp.infosystems.www.servers.ms-windows or even better its FAQ.
--
/J\
Jonathan Stowe
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
------------------------------
Date: 25 Aug 98 22:24:50 GMT
From: spragg@table.jps.net (Adam Spragg)
Subject: Re: Hacking Schools Network
Message-Id: <35e339b2.0@blushng.jps.net>
Dave Stephens (stepherd@gusun.georgetown.edu) wrote:
: Just look for the password on the pull-out table near the principle's
: office. What,
: haven't you seen WarGames?
What's even scarier is that I remember the password (I think)...
Is it..... (down there)
pencil?
Adam
------------------------------
Date: Tue, 25 Aug 1998 21:16:43 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: In which directory 'CGI.pm' file should be copied?
Message-Id: <35e30062.3504654@news.btinternet.com>
On Fri, 21 Aug 1998 18:07:35 -0700, Sucheta Khot wrote :
>Hi,
>
>First of all, I am thankful who responded to all of my questions posted
>on this newsgroup. That has helped me a lot for my perl scripting.
>
>My question is, in which directory CGI.pm file should be copied? I have
>Perl 5.005 version. So there are 'lib' & 'bin' directories under
>C:\Perl\5.005 directory.
>
Shouldnt you already have CGI.pm in your lib directory anyway ? Unless
you really cant avoid I would not suggesting just copying the file
anywhere - get yourself a copy of dmake.exe and follow the
instructions in the README file that came with the distribution
(substituting dmake for make where appropriate of course)
/J\
Jonathan Stowe
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
------------------------------
Date: Tue, 25 Aug 1998 21:07:27 GMT
From: trex16@my-dejanews.com
Subject: invalid header
Message-Id: <6rv92f$36h$1@nnrp1.dejanews.com>
I am trying to display results of form inputs to the screen and keep getting
this error message. Currently I am using "Content-type: text/html" as my
header and then printing html tags and text to the screen but it doesn't seem
to be working. Does anyone know what could be wrong?
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Tue, 25 Aug 1998 21:59:17 GMT
From: "Erik Knepfler" <erik@zeno.com>
Subject: more info on broken require/use statement
Message-Id: <VsGE1.393$J3.9272081@nnrp2.ni.net>
Interestingly, I view the output on the following command:
print `dir`;
This is in a script that I'm accessing through IIS4 from a remote IE client.
On Perl build 5.001 (which I have on another computer), it reports the
contents of the directory it's in. For example, if the script is in
http://myserver/myscripts/printdir.pl, it shows the contents of
c:\inetpub\wwwroot\myscripts.
HOWEVER, in this ActivePerl build v5.005_02, it ALWAYS shows the contents of
my c:\inetpub\wwwroot directory, regardless of what directory the script is
in! I'm very sure this is what's causing all of my require and use
statements to break when trying to require a file in the current (same)
directory.
How can I fix this?
Erik
------------------------------
Date: Tue, 25 Aug 1998 22:23:43 GMT
From: cbinder@my-dejanews.com
Subject: Re: NT Perl 5.0 and IIS 4.0 Logon Permissions
Message-Id: <6rvdhe$9bq$1@nnrp1.dejanews.com>
In article <35C7B6C7.AD2EA9F4@releasesoft.com>,
jeremyo@releasesoft.com wrote:
> Hello all,
>
> I am trying to create a perl script that is spawned from a post form web
> page. All the script has to do is connect to one file server and copy
> files to another file server. However when I run the script I get
> permission denied errors constantly. The error is "Logon failure:
> unknown user name or bad password."
> Here is the perl routine that does the logon:
> "
> sub sds_apps_move {
>
> $srcpath = "\\\\gilbert\\sds\\sdstestapps\\beckmann\\";
> $destpath = "\\\\beckmann\\srapps2\\";
> @ls = `dir /B $srcpath`;
> foreach $i (@ls) {
> print "i'm moving $i now.\n";
> #`move $srcpath$i $destpath`;
> print "i just moved <B>$srcpath$i</B> to <B>$destpath</B><BR>\n";
> }
> }
>
> It dies when trying to dir /B the $srcpath.
> I have setup the script to have every permission available even
> administrator in my domain. Nothing works. I have run the perl script
> from the command line on the web server and it works great!
>
> I read something that IIS cannot always access files on remote machines,
> is this the case here.
>
> I need help. Either it's an IIS thing or a perl thing, a work around in
> either program would be greatly appreciated.
>
> Jeremy Orr
>
>
I'm trying to use opendir(DIR) (where DIR is some on other machine) and get
the same results. The same script works perfectly when run from a Windows 95
machine. Like you said, it also works on the NT machine from a command
prompt. It only fails from a browser.
I'm 99% sure it's an IIS problem, and I think it has something to do with
impersonation. IIS launches a perl process to run a script. When this
process is launched from a browser, it is in the context of an impersonated
user (as opposed to whatever account is currently logged on). I believe this
user account is IUSR_MACHINENAME. I've tried all kinds of permissions for
this account with no success.
The question is what are the rights of this impersonated user, and how does
one configure those rights?
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Tue, 25 Aug 1998 22:28:37 GMT
From: cbinder@lexmark.com
Subject: Re: NT Perl 5.0 and IIS 4.0 Logon Permissions
Message-Id: <6rvdqk$9k5$1@nnrp1.dejanews.com>
I'm trying to use opendir(DIR) (where DIR is some on other machine) and get
the same results. The same script works perfectly when run from a Windows 95
machine. Like you said, it also works on the NT machine from a command
prompt. It only fails from a browser.
I'm 99% sure it's an IIS problem, and I think it has something to do with
impersonation. IIS launches a perl process to run a script. When this
process is launched from a browser, it is in the context of an impersonated
user (as opposed to whatever account is currently logged on). I believe this
user account is IUSR_MACHINENAME. I've tried all kinds of permissions for
this account with no success.
The question is what are the rights of this impersonated user, and how does
one configure those rights?
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Tue, 25 Aug 1998 21:16:46 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: Outputting to MS Excel file format
Message-Id: <35e3126c.8122858@news.btinternet.com>
On Mon, 24 Aug 1998 06:29:16 -0400, jonathan white wrote :
>David Amann wrote:
>
>>
>> What I usually do is send a 'Content-type:application/excel\n\n' line and
>> then send a bunch of tab separated text.
>
>
>David,
>
>Thanx for your reply. There are two problems with using a tab, comma, or
>any kind of delimited file. One is that there is no formating. Second
>and more importatnt is sending numerics as text strings. If I create
>output to a file, newclients.csv
>
>"New Clients Report - 24 Aug 1998"
>"Name","Account #"
>"Bill Smith", "083"
>"Jill Jones","112"
>
>When Excel reads it in it turns the character strings "083" and "112"
>into numeric data types and in the case of "083" drops the leading zero.
>
>
A further option would be to write out an HTML file with a table and
the relevant formatting - I am fairly certain that Excel 97 will read
this and "do the right thing" (not so sure about the numbers though).
If you were using perl on Win32 you could also use Win32::OLE to write
directly into an Excel worksheet.
--
/J\
Jonathan Stowe
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
------------------------------
Date: Tue, 25 Aug 1998 14:02:05 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Pattern match for filename extensions
Message-Id: <MPG.104cc62a3526df09989770@nntp.hpl.hp.com>
[Posted to comp.lang.perl.misc and a copy mailed.]
In article <vp4vr6.g0k.ln@metronet.com> on Tue, 25 Aug 1998 14:54:39 -
0500, Tad McClellan <tadmc@metronet.com> says...
> Tad McClellan (tadmc@metronet.com) wrote:
>
> : $extensions = join '|', reverse @ftypes;
>
> Uhhh. Make that simply:
>
> $extensions = join '|', @ftypes;
Actually, because of the sequential nature of the pattern match, the
order affects the performance. You want the bigger (more frequent)
apples at the top of the barrel (left in this case).
Also, you left the 'o' modifier off the regex, and the 'i' also (if this
program is to run in a case-insensitive file system).
Here is a benchmark I cooked up to investigate the tradeoff between regex
and hash in this problem. Results not shown. Try to intuit them first.
YMMV.
#!/usr/local/bin/perl -w
use Benchmark;
@exts = qw( gif htm html jpg jpeg tif tiff txt );
@ext{ @exts } = (1) x @exts;
$pattern = '\.(?:' . join('|' => @exts) . ')$';
timethese (1 << (shift || 0), {
Hash1 => sub { # Constant time, with regex.
$_ = 'giffile.gif';
/\.([^.]+)$/;
my $x = $ext{lc $1};
},
Hash2 => sub { # Constant time, with substr.
$_ = 'giffile.gif';
my $x = $ext{lc substr $_, 1 + rindex $_, '.'};
},
Regex1 => sub { # Early match (case-dependent).
$_ = 'giffile.gif';
my $x = /$pattern/o;
},
Regex2 => sub { # Early match (case-independent).
$_ = 'GIFFILE.GIF';
my $x = /$pattern/io;
},
Regex3 => sub { # Mismatch (case-dependent).
$_ = 'GIFFILE.GIF';
my $x = /$pattern/o;
},
Regex4 => sub { # Mismatch (case-independent).
$_ = 'giffile.xxx';
my $x = /$pattern/io;
},
};
__END__
--
(Yet Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Tue, 25 Aug 1998 17:03:19 -0400
From: Bill 'Sneex' Jones <sneaker@sneex.fccj.org>
Subject: Re: Perl compiler
Message-Id: <35E32697.DBA5F3A@sneex.fccj.org>
Lily Y. Fu wrote:
>
> Your accuse was completely wrong and groudless.
> I didn't want them to read the text, simply
> because I have password embedded in the program
> in clear text.
>
> Lily
>
If you've embedded a clear text passwd in a script, your
design of the solution is wrong and should be thought
about a little longer. I am sure you can come up with
a solution that doesn't require giving away passwds.
HTH,
-Sneex-
__________________________________________________________________
Bill Jones | FCCJ Webmaster | Murphy's Law of Research:
Enough research will tend to support your theory.
------------------------------
Date: 25 Aug 1998 20:58:12 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Perl compiler
Message-Id: <6rv8h4$bdj$6@marina.cinenet.net>
Tom Christiansen (tchrist@mox.perl.com) wrote:
: In comp.lang.perl.misc, cberry@cinenet.net (Craig Berry) writes:
: :No, not even as strong as hypocrisy. Rather, inconsistency. I'm betting
: :that Tom C hasn't thought through the full implications of his position,
: :and that perhaps he will wish to reevaluate it. Or not. I'm eagerly
: :awaiting his commentary.
:
: I absolutely never require that those I've taught restrict themselves
: from then teaching others based on the knowledge they've gleaned from me.
[snip of related ethical standards]
: And yes, I have on occasion turned down jobs for moral
: reasons associated with these positions.
All quite admirable, and appreciated. Nonetheless, you do make money
teaching and consulting, right? You've achieved the happy condition in
which physical and ethical needs are simultaneously met, which is a Good
Thing. That much I've never argued with.
What I *have* objected to is your assertion that those who do not practice
the Gnu-ish free software model are de facto immoral. Is that in fact
your position, or have I misunderstood you in some way?
: And for the record, I resent the way you have represented me.
Which particular elements of my representation of you do you resent? Such
was never my intent, I assure you. Perhaps I've been misunderstood.
---------------------------------------------------------------------
| Craig Berry - cberry@cinenet.net
--*-- Home Page: http://www.cinenet.net/users/cberry/home.html
| "Ripple in still water, when there is no pebble tossed,
nor wind to blow..."
------------------------------
Date: Tue, 25 Aug 1998 17:14:26 -0400
From: Bill 'Sneex' Jones <sneaker@sneex.fccj.org>
Subject: Re: Perl compiler
Message-Id: <35E32932.D76BAFFE@sneex.fccj.org>
Lily Y. Fu wrote:
>
<Snip - improper use of firewall deleted.>
Look at it from this prospective:
| Host Inside Firewall
_______| Port 21
Internet/_______| Port 23
\_______| Port 80
|
(Firewall.......^)
Firewall properly configured so Bill (aka Sneex) doesn't gain
access to some host which was placed outside of firewall.
Port 21 and 23 (FTP and Telnet) are configured so that
normal end-user access is granted via their proper
userid and password, thus not requiring a special
solution.
Port 21 and 23, etc, disallow access from outside of
firewall (from the Internet) so that authorized end-users
must publish from inside, where it's safer. (Notice
how I didn't say 'safe', nothing is really safe anymore.)
Only port 80, WWW services, is available for Internet
'clients'.
A safer (notice how I didn't say better) slution than
the one you proposed.
HTH,
-Sneex-
__________________________________________________________________
Bill Jones | FCCJ Webmaster | Murphy's Law of Research:
Enough research will tend to support your theory.
------------------------------
Date: Tue, 25 Aug 1998 21:40:13 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: Perl compiler
Message-Id: <Ey9LJ1.AH2@world.std.com>
wdr1@pobox.com (William D. Reardon) writes:
> Just an innocent question, but assuming she's on unix, wouldn't
>compiling help in that she could then set it to be executable, but
>unreadable?
Unfortunately, no. On Unix, scripts must be readable by the UID of the
process executing them. How could they be run by the interpreter if
they can't be read?
--
Andrew Langmead
------------------------------
Date: Tue, 25 Aug 1998 21:42:22 GMT
From: adelton@fi.muni.cz (Honza Pazdziora)
Subject: Re: Perl compiler
Message-Id: <slrn6u6btu.86t.adelton@aisa.fi.muni.cz>
On Tue, 25 Aug 1998 15:51:15 GMT, Scratchie <upsetter@ziplink.net> wrote:
> What might have been reasonable would have been to point her in the
> direction of some resources regarding ways to safely accomplish her
> objective ("perldoc perlsec | grep password" yields nothing). Someone who
The problem is that we never got to know the objective, because the
first request did not come for password, but compiler. We can only
guess for what purpose it the password needed.
> truly wished to help might have helped her to understand whether the
> security she seeks is even possible, and what the different possibilities
> are. On the other hand, someone who just gets off by parading his
> intellectual superiority would simply insult her for being ignorant
> (there's no evidence she's stupid or lazy -- just new at this).
I never said she was (ignorant, stupid or lazy), and never did Tom.
I tried to point out that she was probably new. And before we get
into yet another advanced topic concerning cryptography, I think it
was good to have a consensus with her that compiler is not what is
needed.
And: by claiming some topic as advanced, I by no means say that I know
the correct answer or show my intelect. I only point out that the
goal is far from simple solution "let the compiler do the work".
Yours,
--
------------------------------------------------------------------------
Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
I can take or leave it if I please
------------------------------------------------------------------------
------------------------------
Date: Tue, 25 Aug 1998 21:57:09 GMT
From: adelton@fi.muni.cz (Honza Pazdziora)
Subject: Re: Perl compiler
Message-Id: <slrn6u6cpl.86t.adelton@aisa.fi.muni.cz>
On Tue, 25 Aug 1998 18:59:46 GMT, William D. Reardon <wdr1@pobox.com> wrote:
> Just an innocent question, but assuming she's on unix, wouldn't
> compiling help in that she could then set it to be executable, but
> unreadable?
I'd say you are right, but if we come to this point, isn't it better
to just compile the C wrapper once (just change id and run perl
script) and have the freedom of changing the Perl script whenever
you like, without additional recompilation?
--
------------------------------------------------------------------------
Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
I can take or leave it if I please
------------------------------------------------------------------------
------------------------------
Date: Tue, 25 Aug 1998 21:52:26 GMT
From: adelton@fi.muni.cz (Honza Pazdziora)
Subject: Re: Perl compiler
Message-Id: <slrn6u6cgp.86t.adelton@aisa.fi.muni.cz>
On 25 Aug 1998 20:38:20 GMT, John Stanley <stanley@skyking.OCE.ORST.EDU> wrote:
> All security is via obscurity, as I have been told by someone who claims
True. But most of widely used security systems are based on obscurity
produced by NP-complete problems, not by sticking plain passwords into
binary.
--
------------------------------------------------------------------------
Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
I can take or leave it if I please
------------------------------------------------------------------------
------------------------------
Date: Tue, 25 Aug 1998 21:50:24 GMT
From: adelton@fi.muni.cz (Honza Pazdziora)
Subject: Re: Perl compiler
Message-Id: <slrn6u6cd0.86t.adelton@aisa.fi.muni.cz>
On Tue, 25 Aug 1998 11:28:31 -0400, Lily Y. Fu <lily@tigr.org> wrote:
> Some people suggested to use a wrapper with 755 permission
Plus setuid to root,
> calling the program with password set 700 permission,
> but I got permission denied (the 700 doesn't give read
> permission)
which will overwrite that 700.
This looks like one of few reasonable solutions, if you cannot send
ssh through the firewall.
Hope this helps,
--
------------------------------------------------------------------------
Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
I can take or leave it if I please
------------------------------------------------------------------------
------------------------------
Date: Tue, 25 Aug 1998 22:32:01 GMT
From: genepool@netcom.com (Jim Michael)
Subject: Re: Perl compiler
Message-Id: <genepoolEy9nxD.Hu2@netcom.com>
Lily Y. Fu (lily@tigr.org) wrote:
: We want to give all staff A, B, C a homepage
: on the host outside the firewall,
: and those webfiles are kept at OUT:/some/dir/users/A, B, C
: but there is no account for each individual users,
: only a genetic user account, say "webuser", on the OUT host.
: I wrote a program pushweb, which will upload the homepages
: for a user from host IN to host OUT using NET::FTP module
: (and NET::Telnet module)
Would it be possible to use a server inside the firewall to handle the
pushweb requests on behalf of the clients? Users could fill out a form
from their browser (from location, to location) and submit the request to
the internal server which would then handle the actual ftp of the files
outside the firewall using the one login.
Cheers,
Jim
------------------------------
Date: Tue, 25 Aug 1998 22:59:42 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: Perl compiler
Message-Id: <35e3364d.50036@news.btinternet.com>
On Tue, 25 Aug 1998 18:59:46 GMT, William D. Reardon wrote :
>In article <35E2C8C5.6E49C1C4@dial.pipex.com>,
>Dean Darlison <dean_darlison@dial.pipex.com> wrote:
>>compiling the perl script would be no help as the password would still be
>>readable
>>using strings for instance !
>
> Just an innocent question, but assuming she's on unix, wouldn't
>compiling help in that she could then set it to be executable, but
>unreadable?
>
Havent we been her before recently e.g.:
Script started on Tue Aug 25 23:06:41 1998
# ls -l
total 192
drwx------ 2 root root 32768 Aug 1 10:33 Mail
---x--x--x 1 root root 42 Aug 25 23:05 test.pl
-rw-r--r-- 1 root root 86 Aug 25 23:05 typescript
# ./test.pl
Hello, World
# su - jns
No mail.
jns@localhost:~ $ pwd
/home/jns
jns@localhost:~ $ cd ~root
jns@localhost:/root $ vi test.pl
Error: test.pl: Permission denied.
jns@localhost:/root $ ./test.pl
Can't open perl script "./test.pl": Permission denied
jns@localhost:/root $ logout
# exit
Script done on Tue Aug 25 23:08:27 1998
So i think we see here that unless you are root then that just aint
gonna work (shame really but there you are)
--
/J\
Jonathan Stowe
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
------------------------------
Date: Tue, 25 Aug 1998 18:03:41 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Perl FAR version 1.1.1 MAKE SURE YOU READ THIS BEFORE POSTING
Message-Id: <fl_aggie-2508981803420001@aggie.coaps.fsu.edu>
In article <No.unsoiliciteds-2608980502010001@cs11i11.ppp.infoweb.or.jp>,
No.unsoiliciteds@dead.end (Norman UNsoliciteds) wrote:
+ In article <fl_aggie-2508981047060001@aggie.coaps.fsu.edu>,
+ fl_aggie@thepentagon.com (I R A Aggie) wrote:
+
+ > You mean like my father, when I did something dunderheaded? no, I didn't
+ > like getting chewed out in public. Did I do the same thing again? no.
+ > Why? because I was embarrassed. I understood that *I* had crossed the
+ > line, and that it was up to me to learn from it and avoid it.
+ umm - I don't let total strangers treat me like a five year old, but if
+ you're happy with being treated like that it does explain why you seem to
+ side with the Frequent Newbie Abusers.
Well, when newbies come barging in here and *act* like 5 year olds, I
treat them accordingly. If you don't like that...tough cookies. You can
call it abuse, if you like...I prefer 'tuff luv' myself...
+ > Then they should learn how first, don't you think? I mean before jumping
+ > into perl,
+ Oh dear - did I read about Perl being discussed as a possible language to
+ get kids interested in learning programming, something to do with it being
+ easier than say C or Pascal.
I see...so if I comment that the best way of teaching newbies how to
program in perl is to sit them down in a bath tub, and then toss a running
hair dryer in with them, that means its a good idea??
Just because it was discussed does not mean its a good idea. ITS STILL NOT
A GOOD IDEA TO USE PERL AS AN INTRODUCTORY LANGUAGE. It does NOT ENFORCE
GOOD PROGRAMMING _HABITS_. It requires DISCIPLINE to program well.
Once the HABITS and the DISCIPLINE have been learned, perl opens many
new doors. But guess what? part of that discipline is to consult the docs
that reside on *your* machine. Instead of running to uselessnet and posting.
The good and the bad thing about perl is that perl will quite cheerfully
hand you all the rope you need to hang yourself.
+ O did I just use the word "learn" again,
+ terribly sorry I meant to say "spontaneaously absorb from the atmosphere
+ by osmosis".
And good programming habits are also spontaneously absorbed from the air?
Besides, I've given you the pointers to the _Learning Perl_ book. I haven't
got time to teach you perl. You haven't paid me to teach you perl.
The book is cheaper, and you can go over it as often as you need.
+ Actually I don't own a web server, but if I did I would make sure it had a
+ cgi wrapper, limiting the possible damage to the users home directory. Or
+ is that not being security conscious?
Why, yes, that would be. Now, what happens if you hire someone to write
scripts that are run as the server's UID?
I have more than passing familiarity with electrical wiring. Would you
permit me to wire your house? Do note that I'm not an electrician in
any way, shape or form.
James
------------------------------
Date: Tue, 25 Aug 1998 14:37:07 -0700
From: Kenneth Lum <kin@verio.com>
Subject: Perl Indenter or Beautifier - Does NOT exist?
Message-Id: <35E32E83.AD8D7324@verio.com>
Surprised to know that there isn't a Perl Indenter or Beautifier?
Emacs's perl-mode can do some indentation, but it can't even do
($a, $b) = getData();
or
print<<_DATA_;
abcd
efgh
_DATA
------------------------------
Date: Tue, 25 Aug 1998 21:16:44 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: Perlscript: where is documentation
Message-Id: <35e30f19.7271905@news.btinternet.com>
On Mon, 24 Aug 1998 20:17:54 -0700, Jan Krynicky wrote :
<snip>
>
>BTW: For those that do not know what is the difference.
>PerlScript is a scripting engine made by ActiveState Tool corp.
>This engine allows you to use Perl in ASP pages, in HTML pages instead
>of JavaScript or VBScript, in Windows Scripting Host (I don't know why
>would anyone want to do this) and in a growing list of applications.
Actually, I was having that same thought just the other day - can
anyone see *any* possible advantage of using PerlScript with the
Windows Scripting Host rather than using normal Perl - just a thought
and I dont think I can be bothered to find out by experiment.
--
/J\
Jonathan Stowe
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
------------------------------
Date: Tue, 25 Aug 1998 15:33:52 -0600
From: "Clifford R. Warren" <warren@nospam.amis.com>
Subject: rand function max is 2^16?
Message-Id: <6rvam2$en$1@supernews.com>
I just found out something interesting. If you call the
rand function with more than 65536 (2^16), only
positive numbers are generated. In fact, you loose
randomness the higher you go. For example, doing
a rand on 2^32 and looking at the result in binary,
you see something like:
00111100010001000000000000000000
11101100001011000000000000000000
11001010111010000000000000000000
10011111110111100000000000000000
01101011000100100000000000000000
11011011010101000000000000000000
10010011100110000000000000000000
01100000001101000000000000000000
The resulting numbers approach the maximum, but
precision is lost for everything above 2^16.
I'm not sure if this is a question or if I'm just pointing
this out. If anyone has an insight, please let me know.
------------------------------
Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>
Administrivia:
Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.
If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu.
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 3541
**************************************