[13788] in Perl-Users-Digest
Perl-Users Digest, Issue: 1198 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Oct 27 23:17:45 1999
Date: Wed, 27 Oct 1999 20:17:33 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <941080653-v9-i1198@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Wed, 27 Oct 1999 Volume: 9 Number: 1198
Today's topics:
Run some program from Perl script. <sg@midwal.ca>
Re: Run some program from Perl script. (Clinton Pierce)
Running Perl at the Speed of C ;-) <manm@fervid.dcs.ed.ac.uk>
Re: Running Perl at the Speed of C ;-) (Abigail)
Re: Running Perl at the Speed of C ;-) <bivey@teamdev.com>
Re: Running Perl at the Speed of C ;-) <sjohns17@uic.edu>
Re: Safe Mode in Perl (take 2) jemisa@my-deja.com
Safe Mode in Perl jemisa@my-deja.com
Re: Safe Mode in Perl (Alan Curry)
Re: Safe Mode in Perl <abarb@nmg.fr>
script memory usage (I.J. Garlick)
Re: script memory usage <rootbeer@redcat.com>
Script to list days between given dates reldridg@my-deja.com
Re: Script to list days between given dates (Michael Budash)
Re: Script to list days between given dates <lr@hpl.hp.com>
Re: Script to list days between given dates (Sean McAfee)
Scripts that invoke one another via Location: and/or UR (Ben Blish)
Re: Scripts that invoke one another via Location: and/o <rootbeer@redcat.com>
SDBM problem on Win98 <mballard1@uswest.net>
Re: Security on the web with Perl (Jim)
Re: Security on the web with Perl (Jim)
Re: Security on the web with Perl (Tad McClellan)
Re: Security on the web with Perl (Brett W. McCoy)
Re: Security on the web with Perl <gellyfish@gellyfish.com>
Re: Security on the web with Perl (Abigail)
Re: Security on the web with Perl (Abigail)
Re: Security on the web with Perl <flavell@mail.cern.ch>
Sending file through CGI <ab@dalnet.se>
Re: Sending file through CGI <abarb@nmg.fr>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 27 Oct 1999 13:29:12 GMT
From: SG <sg@midwal.ca>
Subject: Run some program from Perl script.
Message-Id: <3816FC0A.65B865@midwal.ca>
Dear Experts!
I run some program from my Perl script and receive it's output by the
following construction:
open (SG, "program.exe | ") or die "Error ...";
while (<SG> ) {
# ... do something with program's output ...
}
close (SG);
It works OK, but I need to examine the exit status of this program too.
How can I receive it?
Regards,
Serguei.
------------------------------
Date: Wed, 27 Oct 1999 14:35:11 GMT
From: cpierce1@ford.com (Clinton Pierce)
Subject: Re: Run some program from Perl script.
Message-Id: <38180cf6.1893292741@news.ford.com>
[poster cc'd in e-mail]
On Wed, 27 Oct 1999 13:29:12 GMT, SG <sg@midwal.ca> wrote:
>It works OK, but I need to examine the exit status of this program too.
>How can I receive it?
From the online documentation in "perlfunc" under the entry "close":
Closing a pipe explicitly also puts the exit status
value of the command into C<$?>.
There's a recipe for checking exit statuses in the manual page also..
--
Clinton A. Pierce "If you rush a Miracle Man, you
clintp@geeksalad.org get rotten Miracles." -- Miracle Max,
http://www.geeksalad.org The Princess Bride
------------------------------
Date: Tue, 26 Oct 1999 10:08:08 +0100
From: Mani Mohanathas <manm@fervid.dcs.ed.ac.uk>
Subject: Running Perl at the Speed of C ;-)
Message-Id: <Pine.LNX.3.96.991026100457.15984A-100000@fervid.dcs.ed.ac.uk>
Hi,
I am doing a project at the moment, which involves two halves. The problme
is one half is crying to be written in Perl and the other, in C.
unfortunatly the Perl half supplies input to the C half. Hence, it would
seem that the C half would always be waiting about for the Perl half. Is
there any way I could get Perl to run as fast as , or even the near the
speed of C ?
If any one can provide any suggestion I would be grateful.
Mani.
------------------------------
Date: 26 Oct 1999 11:55:12 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Running Perl at the Speed of C ;-)
Message-Id: <slrn81bn6m.fji.abigail@alexandra.delanet.com>
Mani Mohanathas (manm@fervid.dcs.ed.ac.uk) wrote on MMCCXLVII September
MCMXCIII in <URL:news:Pine.LNX.3.96.991026100457.15984A-100000@fervid.dcs.ed.ac.uk>:
~~
~~ If any one can provide any suggestion I would be grateful.
One suggestion is that you don't post the same message twice.
Abigail
--
perl -wleprint -eqq-@{[ -eqw\\- -eJust -eanother -ePerl -eHacker -e\\-]}-
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: 26 Oct 1999 15:00:32 GMT
From: "William" <bivey@teamdev.com>
Subject: Re: Running Perl at the Speed of C ;-)
Message-Id: <01bf1fc3$12967fc0$3527e1ce@bill.jump.net>
Mani Mohanathas <manm@fervid.dcs.ed.ac.uk> wrote in article
<Pine.LNX.3.96.991026100457.15984A-100000@fervid.dcs.ed.ac.uk>...
> Hi,
>
> I am doing a project at the moment, which involves two halves. The
problme
> is one half is crying to be written in Perl and the other, in C.
> unfortunatly the Perl half supplies input to the C half. Hence, it would
> seem that the C half would always be waiting about for the Perl half.
Probably, depends on the relative tasks, but it's likely. The real
question is: Why is this a problem? If the Perl side runs at an
acceptable speed, who cares if the C side has to wait? (Do you worry
about the time the C side wastes waiting for disk accesses?)
Assuming you do care, the next question is: Do you care enough to
spend the time it will take trying to get both sides running at
the same speed? (Or, would you rather just get the primary task
done?) If you need real-time response from the system, then, yeah,
it's probably worth thinking about (but it's also probably not a
task for Perl in the first place).
Of course, the easy solution is to find more things for the C side
to do that will slow it down :-) -Wm
------------------------------
Date: Tue, 26 Oct 1999 05:47:51 -0500
From: Seth David Johnson <sjohns17@uic.edu>
Subject: Re: Running Perl at the Speed of C ;-)
Message-Id: <Pine.A41.4.10.9910260544440.213430-100000@tigger.cc.uic.edu>
On Tue, 26 Oct 1999, Mani Mohanathas wrote:
> Hi,
>
> I am doing a project at the moment, which involves two halves. The problme
> is one half is crying to be written in Perl and the other, in C.
> unfortunatly the Perl half supplies input to the C half. Hence, it would
> seem that the C half would always be waiting about for the Perl half.
hmm.. doesn't follow (actually, it's kinda vague, too). It depends what
both "halves" are doing.
> Is
> there any way I could get Perl to run as fast as , or even the near the
> speed of C ?
You could write an extension in C or XS :)
-Seth
www.pdamusic.com
------------------------------
Date: Wed, 27 Oct 1999 07:09:34 GMT
From: jemisa@my-deja.com
Subject: Re: Safe Mode in Perl (take 2)
Message-Id: <7v68fd$das$1@nnrp1.deja.com>
Hi,
thanks for your answers, but I think I didn't make myself clear.
I want to offer perl support to users ie, anybody, from script kiddies
to my gand ma who never coded a line of perl.
Therefore I need something robust and fool proof.
Something like Tripod is doing for their perl support...
AFAIK, suexec doesn't restrain a user to read all the filesystem, just
run under the USER ID (which is a good thing, but not enough).
I want the user just to be able to read his own home dir (so he cannot
exec anyhting).
If you have more ideas, they are welcome...
--
jm
In article <wplR3.39890$E_1.2285837@typ11.nn.bcandid.com>,
pacman@defiant.cqc.com (Alan Curry) wrote:
> >So is there a way to simulate "safe-mode" in Perl ?
> >With some lib or by hacking perl...
> >
> >I'm running perl 5.005 on Linux and Apache
>
> Forget about "safe" languages. Use a safe server interface: suexec.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Tue, 26 Oct 1999 13:25:06 GMT
From: jemisa@my-deja.com
Subject: Safe Mode in Perl
Message-Id: <7v4a3e$vrd$1@nnrp1.deja.com>
Hello all,
I'm right now using PHP with safe-mode enabled for providing CGI-like
support to my users.
What this mode does is mainly:
+ restrict system, exec use
+ restrict the usage of open and file operations
+ and various others security checks
Still I'd like to propose the usage of perl to do CGI
So is there a way to simulate "safe-mode" in Perl ?
With some lib or by hacking perl...
I'm running perl 5.005 on Linux and Apache
Thanks,
jm
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Tue, 26 Oct 1999 17:20:28 GMT
From: pacman@defiant.cqc.com (Alan Curry)
Subject: Re: Safe Mode in Perl
Message-Id: <wplR3.39890$E_1.2285837@typ11.nn.bcandid.com>
>So is there a way to simulate "safe-mode" in Perl ?
>With some lib or by hacking perl...
>
>I'm running perl 5.005 on Linux and Apache
Forget about "safe" languages. Use a safe server interface: suexec.
--
Alan Curry |Declaration of | _../\. ./\.._ ____. ____.
pacman@cqc.com|bigotries (should| [ | | ] / _> / _>
--------------+save some time): | \__/ \__/ \___: \___:
Linux,vim,trn,GPL,zsh,qmail,^H | "Screw you guys, I'm going home" -- Cartman
------------------------------
Date: Tue, 26 Oct 1999 17:43:14 +0200
From: BARBET Alain <abarb@nmg.fr>
To: "jemisa@my-deja.com" <jemisa@my-deja.com>
Subject: Re: Safe Mode in Perl
Message-Id: <3815CC12.C937E29E@nmg.fr>
Hi,
Try use this :
#!/usr/bin/perl -Tw
use CGI qw(:standard);
use CGI::Carp qw/fatalsToBrowser/;
use strict;
and take a look at perldoc perlsec
Hope that's help,
--
Alain BARBET
abarb@nmg.fr - http://www.citeweb.net/alian
------------------------------
Date: Wed, 27 Oct 1999 11:58:03 GMT
From: ijg@connect.org.uk (I.J. Garlick)
Subject: script memory usage
Message-Id: <FK9Fwr.ACp@csc.liv.ac.uk>
Does anyone know how I can get the memory usage of a process while it's
running?
What I am trying to do is get how much memeory a script uses when it's run
as a CGI from within the script it's self and log it.
I have searched deja.com and the faq's with no results, surely someone has
done this before?
Thanks.
--
Ian J. Garlick
ijg@connect.org.uk
Tempt not a desperate man.
-- William Shakespeare, "Romeo and Juliet"
------------------------------
Date: Wed, 27 Oct 1999 11:24:50 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: script memory usage
Message-Id: <Pine.GSO.4.10.9910271122590.29843-100000@user2.teleport.com>
On Wed, 27 Oct 1999, I.J. Garlick wrote:
> Does anyone know how I can get the memory usage of a process while
> it's running?
Your OS may provide a syscall to do this, or you may have some information
in a /proc directory. Then again, maybe not.
You may be able to accomplish your goals with the BSD::Resource module
from CPAN. Then again, maybe not.
Good luck!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Tue, 26 Oct 1999 05:43:27 GMT
From: reldridg@my-deja.com
Subject: Script to list days between given dates
Message-Id: <7v3f1v$d1h$1@nnrp1.deja.com>
Hi there group,
I was wondering if someone could offer me a suggestion on how to list
the dates between 2 given dates in a columnar format using a quick
script.
for instance I need to list the dates between 10/1/1950 and 9/30/1997.
Is there a quick function that I can use in a loop for this ?
thanks for any help.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Mon, 25 Oct 1999 23:28:48 -0700
From: mbudash@wcws.com (Michael Budash)
Subject: Re: Script to list days between given dates
Message-Id: <mbudash-2510992328480001@adsl-216-103-91-123.dsl.snfc21.pacbell.net>
In article <7v3f1v$d1h$1@nnrp1.deja.com>, reldridg@my-deja.com wrote:
> Hi there group,
>
> I was wondering if someone could offer me a suggestion on how to list
> the dates between 2 given dates in a columnar format using a quick
> script.
>
> for instance I need to list the dates between 10/1/1950 and 9/30/1997.
>
> Is there a quick function that I can use in a loop for this ?
>
Date::Calc and/or Date::Manip come to mind...
--
Michael Budash ~~~~~~~~~~ mbudash@wcws.com
------------------------------
Date: Tue, 26 Oct 1999 00:30:49 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Script to list days between given dates
Message-Id: <MPG.127ef87d2867d85d98a12b@nntp.hpl.hp.com>
In article <7v3f1v$d1h$1@nnrp1.deja.com> on Tue, 26 Oct 1999 05:43:27
GMT, reldridg@my-deja.com <reldridg@my-deja.com> says...
> I was wondering if someone could offer me a suggestion on how to list
> the dates between 2 given dates in a columnar format using a quick
> script.
>
> for instance I need to list the dates between 10/1/1950 and 9/30/1997.
>
> Is there a quick function that I can use in a loop for this ?
The function is gmtime(), but getting it to work for dates before 1970
requires a bit of chicanery. Fudge, anyone?
#!perl -w
use strict;
use Time::Local;
my $FUDGE = 1900 - 7 * 4;
my $final = timegm 0, 0, 0, 30, 9 - 1, 1997 - $FUDGE;
for (my $start = timegm 0, 0, 0, 1, 10 - 1, 1950 - $FUDGE;
$start <= $final; $start += 24 * 60 * 60) {
my ($day, $month, $year) = (gmtime $start)[3 .. 5];
printf "%.2d/%.2d/%d\n", $month + 1, $day, $year + $FUDGE;
}
__END__
Isn't it nice that 2000 is a leap year?
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Tue, 26 Oct 1999 07:53:03 GMT
From: mcafee@waits.facilities.med.umich.edu (Sean McAfee)
Subject: Re: Script to list days between given dates
Message-Id: <z5dR3.1026$4G.162010@news.itd.umich.edu>
In article <7v3f1v$d1h$1@nnrp1.deja.com>, <reldridg@my-deja.com> wrote:
>I was wondering if someone could offer me a suggestion on how to list
>the dates between 2 given dates in a columnar format using a quick
>script.
>for instance I need to list the dates between 10/1/1950 and 9/30/1997.
>Is there a quick function that I can use in a loop for this ?
Is this quick enough for you?
use Date::Calc qw(Delta_Days Add_Delta_Days);
my @start = (1950, 10, 1);
my @end = (1997, 9, 30);
my $numdays = Delta_Days(@start, @end) + 1;
while ($numdays--) {
print join("/", @start[1,2,0]), "\n";
@start = Add_Delta_Days(@start, 1);
}
--
Sean McAfee mcafee@umich.edu
print eval eval eval eval eval eval eval eval eval eval eval eval eval eval
q!q@q#q$q%q^q&q*q-q=q+q|q~q:q? Just Another Perl Hacker ?:~|+=-*&^%$#@!
------------------------------
Date: Tue, 26 Oct 1999 21:10:27 GMT
From: bblishA@TblackbeltDO.Tcom (Ben Blish)
Subject: Scripts that invoke one another via Location: and/or URI: - environment persistence?
Message-Id: <38161870.169658264@news.montanavision.net>
I have a situtation where I'm redirecting a browser from
a CGI script (script1.pl) which is running, to another,
(script2.pl) because no cookie was found. script2.pl does
some testing of the browser. If the browser is found able
to handle cookies, it's given the one it was missing, and
sent back to script1.pl with the right cookie; at that
point, script1.pl can continue normally. This all works
fine.
However, script1.pl has an environment that carries some
parameters from the HTML page that initiated it;
For example, such-and-such a button was pressed, or
such-and-such an item was selected from a dropdown list.
I need to carry those parameters to the second CGI script
that I'll invoke with...
print "Location: http://www.domain.com/cgi-bin/script2.pl\n\n";
...because if the browser can handle cookies, and I re-invoke
script1.pl, I need to hand off the selections that were made.
Otherwise, the HTML page will need to be re-submitted, which
seems needlessly onerous for the surfer.
So, my questions revolve around:
o Is there a way to preserve or copy the enviroment of script1.pl
so that script2.pl sees them just as script1.pl did? Then,
this concept could be extended so that script1.pl could be
called again from script2.pl and "think" it was invoked
from the original HTML page, which would be perfect.
o Failing that, is there a way to pass parameters to script2.pl
in or on the URL, much as a local anchor can be passed on the
end of a regular anchor:
<a href="http://www.domain.com/boo.html"></a>
<a href="http://www.domain.com/boo.html#localname"></a>
o Failing either of those, any suggestions in any other realm,
pointers to the PERL docs, etc.?
Thanks for any assistance on this.
--Ben
------------------------------
Date: Tue, 26 Oct 1999 15:23:11 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Scripts that invoke one another via Location: and/or URI: - environment persistence?
Message-Id: <Pine.GSO.4.10.9910261521520.29843-100000@user2.teleport.com>
On Tue, 26 Oct 1999, Ben Blish wrote:
> However, script1.pl has an environment that carries some
> parameters from the HTML page that initiated it;
> For example, such-and-such a button was pressed, or
> such-and-such an item was selected from a dropdown list.
>
> I need to carry those parameters to the second CGI script
> that I'll invoke with...
It sounds as if you want a browser to make a certain request of a server.
Perhaps you should search for the docs, FAQs, and newsgroups about
servers, browsers, the protocols they use, and related issues.
Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Tue, 26 Oct 1999 22:53:51 -0500
From: Mike <mballard1@uswest.net>
Subject: SDBM problem on Win98
Message-Id: <3816774F.D0158679@uswest.net>
I have several SDBM files feeding a set of web pages. I have had
problem when updating these files to suddenly find a bunch of HTML and
PERL code in them and also just misc trash. The code will be from
things I am not even working on. What is up with this. Is there a way
to keep this from happening?
Mike
------------------------------
Date: Wed, 27 Oct 1999 06:49:55 GMT
From: jkrogerDONCHA_SPAM_ME@earthlink.net (Jim)
Subject: Re: Security on the web with Perl
Message-Id: <jkrogerDONCHA_SPAM_ME-2710990259090001@ip133.princeton.nj.pub-ip.psi.net>
In article <Pine.HPP.3.95a.991025121218.28398B-100000@hpplus01.cern.ch>,
"Alan J. Flavell" <flavell@mail.cern.ch> wrote:
> On Mon, 25 Oct 1999, Jim wrote:
>
> > What's HTTPS?
>
> Off-topic for this group. Use the web, Luke.
>
>
> [and yet another jeopardendectomy]
Off topic. Use alt.self-appointed-dictators.fetish.
Jim
------------------------------
Date: Wed, 27 Oct 1999 03:07:38 -0500
From: jkrogerDONCHA_SPAM_ME@earthlink.net (Jim)
Subject: Re: Security on the web with Perl
Message-Id: <jkrogerDONCHA_SPAM_ME-2710990307390001@ip133.princeton.nj.pub-ip.psi.net>
In article <s1536ck985913@corp.supernews.com>, cberry@cinenet.net (Craig
Berry) wrote:
>
> : How do I protect my stuff? Should I try to use all C instead of Perl? They
> : can still steal it though.
>
> Hope this makes more sense, now.
Yes, moreso now, thanks for the great response. Call it paranoia, but what
with the stuff you see in the news, I am still afraid that no matter how
my server is configured, somebody can "hack" in and steal my stuff. And,
isn't the server configured by my web host, and look at the misteps that
even Microsoft makes with its servers.
Anyway, thanks much.
Jim
------------------------------
Date: Mon, 25 Oct 1999 07:30:43 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Security on the web with Perl
Message-Id: <31f1v7.nk7.ln@magna.metronet.com>
Jim (jkrogerDONCHA_SPAM_ME@earthlink.net) wrote:
: Hey little twit, feel like a man now?
*plonk*
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Mon, 25 Oct 1999 14:04:50 GMT
From: bmccoy@foiservices.com (Brett W. McCoy)
Subject: Re: Security on the web with Perl
Message-Id: <slrn818p4v.u3d.bmccoy@moebius.foiservices.com>
Also Sprach Jim <jkrogerDONCHA_SPAM_ME@earthlink.net>:
>What's HTTPS?
Secure HTTP. You'll want that if you're doing things like E-Commerce or
trying to maintain privacy between client and server. Kind of like Secure
Shell but using the HTTP protocol.
>> What is there to stop anyone from reverse engineering your C code or
>> Java code, and using that?
>
>Because 1) my program is very complex and subtle, and 2) though it
>would take a long time, it could be done, but with Perl, they can
>steal it directly, no reverse engineering required. I think my concept
>is complex enough that reverse engineering would not happen before
>I've made my score, but they could have a site up using my Perl scripts
>tomorrow.
If they can get your Perl scripts. If you properly configure your
webserver, that shouldn't be an issue. I'd be more worried about having
improperly written CGI programs with wide open security holes -- then
anyone could get in and steal whatever they wanted, including the source
code to your C programs. Writing stuff in C or Java isn't going to
automatically make your server more secure.
--
Brett W. McCoy bmccoy@foiservices.com
Computer Operations Manager (Alpha Geek) http://www.foiservices.com
FOI Services, Inc./DIOGENES 301-975-0110
---------------------------------------------------------------------------
------------------------------
Date: 25 Oct 1999 09:25:59 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Security on the web with Perl
Message-Id: <38141417_2@newsread3.dircon.co.uk>
Jim <jkroger@earthlink.net> wrote:
> In article <7uv1cr$g49$1@gellyfish.btinternet.com>, Jonathan Stowe
> <gellyfish@gellyfish.com> wrote:
>
>> On Sat, 23 Oct 1999 23:59:26 -0500 Jim wrote:
>> > the program is using CGIs, which are
>> > Perl.
>> >
>>
>> Wrong. A program that uses the Common Gateway Interface can be written
>> in any language that supports its input and output requirements.
>>
>> Next.
>>
>
>
> Hey little twit, feel like a man now?
>
Sorry, do you know me ? You make a false assertion you get corrected
you become abusive you get in my killfile. Bye Bye.
/J\
--
"The only man in the cabinet who supported them was that fucking lunatic
Redwood" - John Major
------------------------------
Date: 25 Oct 1999 03:34:46 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Security on the web with Perl
Message-Id: <slrn8185gd.fji.abigail@alexandra.delanet.com>
Jim (jkrogerDONCHA_SPAM_ME@earthlink.net) wrote on MMCCXLV September
MCMXCIII in <URL:news:jkrogerDONCHA_SPAM_ME-2310992359260001@ip216.princeton.nj.pub-ip.psi.net>:
^^
^^ Hi, I have a question about Perl security on the web.
^^
^^ I want to do a web site that takes info from a form, feeds it to a
^^ program, takes the output from the program, and puts it back on the
^^ website for the reader to see.
^^
^^ The program will be a compiled C program,
Then you shouldn't be asking here. Twice. CGI questions go to a CGI
group, C language questions go to comp.lang.c.*.
^^ but as far as I know the way you
^^ feed info between the web page and the program is using CGIs,
How many Common Gateway Interfaces are you going to use?
^^ which are
^^ Perl.
Eh? Wouldn't you write your CGI in English, with perhaps something like
BNF for some syntax descriptions?
Or do you mean that programs that use CGI have to be written in Perl?
In that case, you are utterly mistaken. The CGI specification does not
mandate any language to be used - why would it?
^^ If I'm not mistaken those have to be text files which the Perl
^^ interpreter reads.
You mean, the Perl programs? Well, yeah, that's the usual way, although
perl can take code from STDIN.
^^ So what is to stop somebody from stealing my program,
^^ and my Perl scripts?
I don't understand your question. Are you having a problem securing your
computer? In that case, your questions do not belong here, they do not
belong in a CGI group, they do not belong in a C group either. Go ask
in a group about security - or when it comes to basics, in a group about
your OS.
^^ The program alone would not help them, because
^^ without the scripts it wouldn't make sense, but with the scripts they
^^ could basically steal the
^^ entire engine driving my site (let's say it's a horiscope program). Also,
^^ the Perl scripts are useful themselves, and they can just read them.
^^
^^ How do I protect my stuff? Should I try to use all C instead of Perl? They
^^ can still steal it though.
If they can "steal" files from your computer, you have a much bigger
problem then wondering whether they can read the files or not.
Be afraid. Be very afraid.
Abigail
--
perl -wlne '}{print$.' file # Count the number of lines.
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: 25 Oct 1999 03:52:41 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Security on the web with Perl
Message-Id: <slrn8186i1.fji.abigail@alexandra.delanet.com>
Jim (jkrogerDONCHA_SPAM_ME@earthlink.net) wrote on MMCCXLVI September
MCMXCIII in <URL:news:jkrogerDONCHA_SPAM_ME-2510990148370001@ip223.princeton.nj.pub-ip.psi.net>:
??
?? Hey little twit, feel like a man now?
*plonk*
Good luck with your security!
Abigail
--
perl -we '$_ = q ;4a75737420616e6f74686572205065726c204861636b65720as;;
for (s;s;s;s;s;s;s;s;s;s;s;s)
{s;(..)s?;qq qprint chr 0x$1 and \161 ssq;excess;}'
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Mon, 25 Oct 1999 12:12:58 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Security on the web with Perl
Message-Id: <Pine.HPP.3.95a.991025121218.28398B-100000@hpplus01.cern.ch>
On Mon, 25 Oct 1999, Jim wrote:
> What's HTTPS?
Off-topic for this group. Use the web, Luke.
[and yet another jeopardendectomy]
------------------------------
Date: Mon, 25 Oct 1999 16:17:04 +0200
From: "Andreas Björck" <ab@dalnet.se>
Subject: Sending file through CGI
Message-Id: <7v1oo9$b5d$1@gordon.dalnet.se>
I know this is probably the wrong newsgroup for this question, but I
could'nt find a cgi & perl newsgroup, so here goes anyway. I'm trying to
make a file download program using cgi,
and it works pretty good with netscape 4.61 under windows, but MS Explorer 5
gets into a waiting state after the file is sent through. I suspect it
doesn't understand that the file has reached EOF.
---
$filename = "test.gif";
open FIL, $filename or die "Couldn't open " . $filename . "\n";
binmode(FIL);
@file = <FIL>;
$file_length = length(join(//,@file));
print "Content-type: application/octet-stream\n";
print "Content-Transfer-Coding: binary\n";
print "Content-length: $length\n";
print "Content-Disposition: attachment; filename=". $filename .
"\r\n\r\n";
close(FIL);
print @file;
---
This sends the file through okay on Netscape, but Explorer just ends up
waiting (with the hourglass)
for an EOF. Can someone point me to a reference, or perhaps someone has
solved this already?
Regards,
Andreas
------------------------------
Date: Mon, 25 Oct 1999 17:04:37 +0200
From: BARBET Alain <abarb@nmg.fr>
To: Andreas =?iso-8859-1?Q?Bj=F6rck?= <ab@dalnet.se>
Subject: Re: Sending file through CGI
Message-Id: <38147185.F7EE75C1@nmg.fr>
May be this : http://support.microsoft.com/support/kb/articles/q182/3/15.asp
can help you.
(For the NG, try comp.infosystems.www.authoring.cgi)
--
Alain BARBET
abarb@nmg.fr - http://www.citeweb.net/alian
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
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: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
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 V9 Issue 1198
**************************************