[25970] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 8189 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jun 21 03:05:48 2005

Date: Tue, 21 Jun 2005 00:05:05 -0700 (PDT)
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, 21 Jun 2005     Volume: 10 Number: 8189

Today's topics:
    Re: "use CGI " hangs  "CGI time out " <1usa@llenroc.ude.invalid>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Mon, 20 Jun 2005 14:30:35 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: "use CGI " hangs  "CGI time out "
Message-Id: <Xns967B6AE9C9751asu1cornelledu@127.0.0.1>

"GMI" <Admin@GoMonitor.com> wrote in
news:11bdj7n7uacn26d@corp.supernews.com: 

> The program, it hangs and after a long time system comes with a  CGI
> time out error?
> in DOS mode however the routine works fine.

perldoc -q 500

might help when you encounter this type of situation. However, see my 
specific comments below:

> #Login process for NOYQ
> require "subparseform.lib";

This is probably some crappy cargo cult CGI processing thingy: Dump it.

>  use CGI;
>  $Query = new CGI;

You should have 

use strict;
use warnings;

in your code.

This seems to be a good time for you to peruse the posting guidelines 
for this group: They contain invaluable information on how you can help 
yourself, and help others help you.

> my $ErrMsg,$ErrNo=0, $ID ;
> my $PassWord,$fName,$lName;

You should always declare variables in the smallest applicable scope, 
and name them so they are readable.

> my $Dte_Lst,$Cookie;
> ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=localtime(time);
> $mon=$mon+1;
> $year=$year+1900;
> $Date     = "$year-$mon-$mday $hour:$min:$sec" ;

This is crazy.

> Parse_Form();

What's happening is that instantiating a CGI object consumes the input 
coming in, there is nothing for Parse_Form to read from STDIN, so it 
waits for input until the web server decides to kill it.

You have a choise to make here: Either use the crappy code, or use CGI, 
not both. I think the choice is clear.

It also seems clear to me that you should read "Learning Perl".


> NOinitFrm();
> $ID='***';$PassWord='******',$Continue='Continue';
> #
> if ($Continue ne "Continue")

WTF? How can this happen?

> {
>   # this is the initial run (Not continue & not Cancel)

Most of the code from this point on is fairly incomprehensible to me.

> ------------------------------------------------
> HERE IS THE DOS COMMAND  OUTPUT...........
> c:>Perl No-logi1.pl
> ---------
> Content-type: text/html
> 
> <P>Use Post or GetSet-Cookie: NOYQSecure=bazil; domain=WWW.NOYQ.ca;

You really, really need to o back to the basics. You have just told me 
how to crack my way in to www.noyq.ca. Please do not use this script for 
any purpose. You need some *intensive* studying of both Perl and web 
security fundamentals.

This is for your own good.

Sinan
-- 
A. Sinan Unur <1usa@llenroc.ude.invalid>
(reverse each component and remove .invalid for email address)

comp.lang.perl.misc guidelines on the WWW:
http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html


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

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 8189
***************************************


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