[24312] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 6503 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun May 2 18:06:08 2004

Date: Sun, 2 May 2004 15:05:09 -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           Sun, 2 May 2004     Volume: 10 Number: 6503

Today's topics:
    Re: Books online???? <catcher@linuxmail.org>
    Re: Can perl be used for cookie setting? <noreply@gunnar.cc>
    Re: Can perl be used for cookie setting? (Randal L. Schwartz)
    Re: Can perl be used for cookie setting? <dannywork5@hotmail.com>
    Re: Can perl be used for cookie setting? <webmaster @ infusedlight . net>
    Re: Can perl be used for cookie setting? <sbryce@scottbryce.com>
    Re: Can perl be used for cookie setting? <noreply@gunnar.cc>
    Re: CRC on Unix vs Win32 <Joe.Smith@inwap.com>
    Re: CRC on Unix vs Win32 <geoff@invalid.invalid>
    Re: free source search engine (simple) ## comments? <webmaster @ infusedlight . net>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Sun, 02 May 2004 16:05:51 -0400
From: Robert <catcher@linuxmail.org>
Subject: Re: Books online????
Message-Id: <VcKdneYkorcCyQjd4p2dnA@adelphia.com>

Henry Williams wrote:
> On Fri, 30 Apr 2004 22:02:19 -0400, Robert <catcher@linuxmail.org>
> wrote:
> 
> 
>>They are out there and you should report them to O'Reilly.
> 
> 
> I was hoping you were going to! I already have a fulltime job.
> 
Meaning what?


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

Date: Sun, 02 May 2004 20:04:40 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Can perl be used for cookie setting?
Message-Id: <c73dmm$huu14$1@ID-184292.news.uni-berlin.de>

Danny wrote:
> Is there a way I can use PERL to create a cookie in the same
> fashion? Just put a call to a cgi script in the header or body of
> all web pages to return the cookie info or set it if need be.

I suppose you can use SSI to include a CGI script that gets or sets a
cookie.

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl



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

Date: Sun, 02 May 2004 18:41:24 GMT
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Can perl be used for cookie setting?
Message-Id: <67550059482efeed121446f370a19ac1@news.teranews.com>

>>>>> "Gunnar" == Gunnar Hjalmarsson <noreply@gunnar.cc> writes:

Gunnar> Danny wrote:
>> Is there a way I can use PERL to create a cookie in the same
>> fashion? Just put a call to a cgi script in the header or body of
>> all web pages to return the cookie info or set it if need be.

Gunnar> I suppose you can use SSI to include a CGI script that gets or sets a
Gunnar> cookie.

SSI cannot set cookies.  The headers of an SSI are checked for
well-formedness, but otherwise mostly ignored (other than redirects).
This includes the cookie-setting information.  THus, no cookies.

print "Just another Perl hacker,"; # the first

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


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

Date: Sun, 02 May 2004 19:11:54 GMT
From: "Danny" <dannywork5@hotmail.com>
Subject: Re: Can perl be used for cookie setting?
Message-Id: <_Jblc.94090$Gd3.22319695@news4.srv.hcvlny.cv.net>


"Randal L. Schwartz" <merlyn@stonehenge.com> wrote in message
news:67550059482efeed121446f370a19ac1@news.teranews.com...
> >>>>> "Gunnar" == Gunnar Hjalmarsson <noreply@gunnar.cc> writes:
>
> Gunnar> Danny wrote:
> >> Is there a way I can use PERL to create a cookie in the same
> >> fashion? Just put a call to a cgi script in the header or body of
> >> all web pages to return the cookie info or set it if need be.
>
> Gunnar> I suppose you can use SSI to include a CGI script that gets or
sets a
> Gunnar> cookie.
>
> SSI cannot set cookies.  The headers of an SSI are checked for
> well-formedness, but otherwise mostly ignored (other than redirects).
> This includes the cookie-setting information.  THus, no cookies.
>
> print "Just another Perl hacker,"; # the first
>
> -- 
> Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777
0095
> <merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
> Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
> See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl
training!


Yes  I am new to perl.
I cannot change the extensions of all of my html files.
So I need something that gets called automatically as the html page is
loaded.
I also need to pass a variable to and from the cgi script.
This needs to be done transparaently.
I would greatly appreciate your advice or perhaps some direction as to how
to go about this.

Thanks so much

Danny




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

Date: Sun, 2 May 2004 12:34:58 -0800
From: "Robin" <webmaster @ infusedlight . net>
Subject: Re: Can perl be used for cookie setting?
Message-Id: <c73m2n$a5n$1@reader2.nmix.net>


"Danny" <dannywork5@hotmail.com> wrote in message
news:NGalc.93810$Gd3.22108107@news4.srv.hcvlny.cv.net...
> I wrote some javascript to retrive/set cookie for user.
> The code just puts the reffering id passed in URL somewhere on the website
> for tracking purposes.
>
> I don't like how the code can be seen by all users if the wanted to.  I
> would also prefer something server side.
> Is there a way I can use PERL to create a cookie in the same fashion?
> Just put a call to a cgi script in the header or body of all web pages to
> return the cookie info or set it if need be.

See perldoc CGI! Your probably going to have to set the cookie with a cgi
script, so perhaps use the script and then redirect to your html page with
print redirect.
Good luck!

-Robin







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

Date: Sun, 02 May 2004 15:00:00 -0600
From: Scott Bryce <sbryce@scottbryce.com>
Subject: Re: Can perl be used for cookie setting?
Message-Id: <109aoa9hgnqic0c@corp.supernews.com>

Danny wrote:

> Is there a way I can use PERL to create a cookie in the same fashion?
> Just put a call to a cgi script in the header or body of all web pages to
> return the cookie info or set it if need be.

Assuming this is being done in a CGI script...

To set the cookie you want to send a Set-Cookie header to the browser. 
Do a Google search on http headers to get the correct syntax. It will 
look something like this:

print "Set-Cookie:SessionID=$session_id\n";

To get cookies, read the docs for CGI.pm.



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

Date: Sun, 02 May 2004 23:11:39 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Can perl be used for cookie setting?
Message-Id: <c73odl$h4cop$1@ID-184292.news.uni-berlin.de>

Danny wrote:
> Randal L. Schwartz wrote:
>> Gunnar Hjalmarsson wrote:
>>> Danny wrote:
>>>> Is there a way I can use PERL to create a cookie in the same 
>>>> fashion? Just put a call to a cgi script in the header or
>>>> body of all web pages to return the cookie info or set it if
>>>> need be.
>>> 
>>> I suppose you can use SSI to include a CGI script that gets or 
>>> sets a cookie.
>> 
>> SSI cannot set cookies.  The headers of an SSI are checked for 
>> well-formedness, but otherwise mostly ignored (other than
>> redirects). This includes the cookie-setting information.  THus,
>> no cookies.

Hmm.. You learn something new every day. :) Thanks, Randal!

> Yes  I am new to perl.

That's okay. Note that your problem has nothing to do with the
programming language Perl.

> I cannot change the extensions of all of my html files. So I need
> something that gets called automatically as the html page is 
> loaded.

That could still have been an SSI invoked script, provided that you
are able to modify the server configuration with e.g. an .htaccess
file. But now we know that SSI cannot be used for other reasons.

> I also need to pass a variable to and from the cgi script. This
> needs to be done transparaently.

Sorry, but it's not clear to me what you mean by that.

This group is for discussing Perl, so this thread is off topic here.
To increase your chances to get help, I would recommend that you post
in a more suitable group, such as comp.infosystems.www.authoring.cgi.
If you do, please try to include a better description of what it is
you are trying to accomplish. (Also, don't forget to study
http://www.thinkspot.net/ciwac/howtopost.html if you haven't posted to
comp.infosystems.www.authoring.cgi before.)

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl



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

Date: Sun, 02 May 2004 19:38:37 GMT
From: Joe Smith <Joe.Smith@inwap.com>
Subject: Re: CRC on Unix vs Win32
Message-Id: <17clc.16908$0H1.1577022@attbi_s54>

Frank Sconzo wrote:

> I'm writing a perl module that sends rich-text messages to Microsoft
> Outlook recipients from Unix. This involves generating CRCs of the
> plaintext and rtf versions of the mail message.
> 
> Unfortunately, when I use perl modules to generate the CRC, the values
> do not match those that the Outlook Client is expecting.

Richtext and plain text are non-binary files.
Non-binary files on Windows use "\015\012" at the end of each line
Non-binary files on Unix use "\012" at the end of each line.
When data is transfered in ASCII mode (as opposed to BINARY) mode,
the CRC will change.  You need to convert one or both to canonical
form before performing a CRC check.
	-Joe


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

Date: Sun, 02 May 2004 21:37:34 GMT
From: Geoff <geoff@invalid.invalid>
Subject: Re: CRC on Unix vs Win32
Message-Id: <a3qa90ta365a2painn6bhbr934i2tdcku7@4ax.com>

On 2 May 2004 10:21:23 -0700, frank.sconzo@dowjones.com (Frank Sconzo)
wrote:

>The RTFSync function
>computes the CRC using only the characters that it considers to be
>significant to the message. For example, some white space and other
>ignorable characters are omitted from the CRC:

You appear to have the answer right there. Assuming Outlook is using
this function to do the CRC.  Naturally they are not using all the
characters in the message for computation of the CRC as any _normal_
CRC would.  Another undocumented proprietary implementation.

Perhaps you can guess the chars they are ignoring by eliminating
spaces, linefeeds and cr's from the chars you use in your CRC
computation. What other chars they may consider "not significant" is
anybody's guess.


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

Date: Sun, 2 May 2004 12:31:20 -0800
From: "Robin" <webmaster @ infusedlight . net>
Subject: Re: free source search engine (simple) ## comments?
Message-Id: <c73ls8$a5i$1@reader2.nmix.net>


"gnari" <gnari@simnet.is> wrote in message
news:c72hjl$n5$1@news.simnet.is...
> "Robin" <webmaster @ infusedlight . net> wrote in message
> news:c71ii0$aah$1@reader2.nmix.net...
> >
> [snip discussion about how his script can compromise his site]
>
> > >
> > > do you want a demonstration ?
> >
> > true, they'd still have to guess the password though :-)
>
> Robin, you are not *listening*.
> I was telling you: your search script gave me the password.
>
> look at your blog if you need proof:
> http://www.infusedlight.net/robin/blogger.pl

What did you search for? And how? See most recent post. Also, check out the
search script now, it only gives the titles for html pages -
www.infusedlight.net/robin
Later,
-Robin





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

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


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