Re: Help needed with here documents (security?)

2013-10-24 Thread Octavian Rasnita
From: "Ronald F. Guilmette" > > In message <7E7181F2497441C88988DD1F16E4A743@octavianf303f0>, you wrote: > >>From: "Janek Schleicher" >> >>> Am 24.10.2013 15:07, schrieb Shawn H Corey: > my $email = Email::Simple->create( > header => [ > From => $sender_addr

Re: Help needed with here documents (security?)

2013-10-24 Thread Ronald F. Guilmette
In message <20131024183255.3c233104@sage>, you wrote: >On Thu, 24 Oct 2013 14:55:51 -0700 >"John W. Krahn" wrote: > >> stdin (and stdout) are part of a stream protocol and as such are not >> about files and do not signal End-Of-File which is part of why emails >> use the single period to signa

Re: Help needed with here documents (security?)

2013-10-24 Thread Ronald F. Guilmette
In message <52699767.2050...@shaw.ca>, you wrote: >Ronald F. Guilmette wrote: >> In message<5268663c.4040...@stemsystems.com>, >> Uri Guttmanwrote: >> >>> i think a blank line with . will end input to smtp servers. try that too >>> in the line after the from field. >> >> DING DING DING!!! >> >> G

Re: Help needed with here documents (security?)

2013-10-24 Thread Shawn H Corey
On Thu, 24 Oct 2013 14:55:51 -0700 "John W. Krahn" wrote: > stdin (and stdout) are part of a stream protocol and as such are not > about files and do not signal End-Of-File which is part of why emails > use the single period to signal the end of the message. I thought that was from the old mai

Re: Help needed with here documents (security?)

2013-10-24 Thread John W. Krahn
Ronald F. Guilmette wrote: In message<5268663c.4040...@stemsystems.com>, Uri Guttmanwrote: i think a blank line with . will end input to smtp servers. try that too in the line after the from field. DING DING DING!!! Give that man a cupie doll, because he's the winner of today's perplexing pu

Re: Help needed with here documents (security?)

2013-10-24 Thread Jim Gibson
On Oct 24, 2013, at 11:59 AM, Ronald F. Guilmette wrote: > But, getting back to my original 2 questions... > > I want to stress that I did not ask how to formulate and/or send a > properly formatted e-mail message. I can handle that part, even if > perhaps only in my own clumsey way. > > What

Re: Help needed with here documents (security?)

2013-10-24 Thread Ronald F. Guilmette
In message <7E7181F2497441C88988DD1F16E4A743@octavianf303f0>, you wrote: >From: "Janek Schleicher" > >> Am 24.10.2013 15:07, schrieb Shawn H Corey: my $email = Email::Simple->create( header => [ From => $sender_addr, To => 'ad...@

Re: Help needed with here documents (security?)

2013-10-24 Thread Octavian Rasnita
From: "Janek Schleicher" Am 24.10.2013 15:07, schrieb Shawn H Corey: my $email = Email::Simple->create( header => [ From => $sender_addr, To => 'ad...@tristatelogic.com', X-Server-Protocol => $server_protocol, X-Http-User-Agent => $ht

Re: Help needed with here documents (security?)

2013-10-24 Thread Janek Schleicher
Am 24.10.2013 15:07, schrieb Shawn H Corey: my $email = Email::Simple->create( header => [ From => $sender_addr, To => 'ad...@tristatelogic.com', X-Server-Protocol => $server_protocol, X-Http-User-Agent => $http_user_agent, X-Http-

Re: Help needed with here documents (security?)

2013-10-24 Thread Shawn H Corey
On Thu, 24 Oct 2013 06:30:58 -0700 Jim Gibson wrote: > > On Oct 24, 2013, at 6:07 AM, Shawn H Corey wrote: > > > On Thu, 24 Oct 2013 13:52:51 +0200 > > Janek Schleicher wrote: > > > >> use Email::Simple; > >> > >> my $email = Email::Simple->create( > >> header => [ > >> From

Re: Help needed with here documents (security?)

2013-10-24 Thread Jim Gibson
On Oct 24, 2013, at 6:07 AM, Shawn H Corey wrote: > On Thu, 24 Oct 2013 13:52:51 +0200 > Janek Schleicher wrote: > >> use Email::Simple; >> >> my $email = Email::Simple->create( >> header => [ >> From => $sender_addr, >> To => 'ad...@tristatelogic.com',

Re: Help needed with here documents (security?)

2013-10-24 Thread Shawn H Corey
On Thu, 24 Oct 2013 13:52:51 +0200 Janek Schleicher wrote: > use Email::Simple; > > my $email = Email::Simple->create( >header => [ > From => $sender_addr, > To => 'ad...@tristatelogic.com', > X-Server-Protocol => $server_protocol, > X-Http-

Re: Help needed with here documents (security?)

2013-10-24 Thread Janek Schleicher
Another way of handling is to use one of the availabe Email::* modules on CPAN. This would have the advantages of (beside you don't have to worry about details of string quoting): - better code, as you write down what you intend to do instead of how you do it - better security, as those module

Re: Help needed with here documents (security?)

2013-10-23 Thread Ronald F. Guilmette
In message <40504.1382576...@server1.tristatelogic.com>, I wrote: >>> Well, I added to the script some rudimentary filtering/validation of >>> the input strings in question also. >> >>you need more than rudimentary filtering. make sure the from field is >>one string, no newlines or anything but

Re: Help needed with here documents (security?)

2013-10-23 Thread Ronald F. Guilmette
In message <5268663c.4040...@stemsystems.com>, Uri Guttman wrote: >i think a blank line with . will end input to smtp servers. try that too >in the line after the from field. DING DING DING!!! Give that man a cupie doll, because he's the winner of today's perplexing puzzle test! In short, ye

Re: Help needed with here documents (security?)

2013-10-23 Thread Ronald F. Guilmette
In message <20131023193228.38cf83e2@sage>, you wrote: >On Wed, 23 Oct 2013 16:12:12 -0700 >"Ronald F. Guilmette" wrote: > >> I believe that you may be on to something here, but it is more than >> just Postfix seeing a \n\n and believeing that it had encountered the >> end of the headers. It is

Re: Help needed with here documents (security?)

2013-10-23 Thread Uri Guttman
On 10/23/2013 07:12 PM, Ronald F. Guilmette wrote: In message <52684f18.2000...@stemsystems.com>, you wrote: I _do_ know more than a little about mail servers, and while you are basically correct, i.e. that Postfix would certainly view anything past the first \n\n encountered as being *messag

Re: Help needed with here documents (security?)

2013-10-23 Thread Dr.Ruud
On 2013-10-24 01:12, Ronald F. Guilmette wrote: In message <52684f18.2000...@stemsystems.com>, you wrote: On 10/23/2013 06:18 PM, Ronald F. Guilmette wrote: ... print SM < From: "$sender_name" <$sender_addr> Subject: Your message to Tristatelogic.Com X-Server-Protocol: $server_protocol X-Http

Re: Help needed with here documents (security?)

2013-10-23 Thread Shawn H Corey
On Wed, 23 Oct 2013 16:12:12 -0700 "Ronald F. Guilmette" wrote: > I believe that you may be on to something here, but it is more than > just Postfix seeing a \n\n and believeing that it had encountered the > end of the headers. It is possible that something in the input > stream I gave it signal

Re: Help needed with here documents (security?)

2013-10-23 Thread Ronald F. Guilmette
In message <52684f18.2000...@stemsystems.com>, you wrote: >On 10/23/2013 06:18 PM, Ronald F. Guilmette wrote: > >> ... >> print SM <> To: "Tristatelogic.Com Administrator" >> From: "$sender_name" <$sender_addr> >> Subject: Your message to Tristatelogic.Com >> X-Server-Protocol: $server_protocol

Re: Help needed with here documents (security?)

2013-10-23 Thread Uri Guttman
On 10/23/2013 06:18 PM, Ronald F. Guilmette wrote: ... print SM < From: "$sender_name" <$sender_addr> Subject: Your message to Tristatelogic.Com X-Server-Protocol: $server_protocol X-Http-User-Agent: $http_user_agent X-Http-Referer: $http_referer X-Remote-Addr: $remote_addr X-Remote-Host: $remot

Re: Help needed with here documents (security?)

2013-10-23 Thread Ronald F. Guilmette
In message <39517.1382566...@server1.tristatelogic.com>, I wrote: >About a day ago, some schmuck set about to try, hard, to exploit the >personally written Perl code I have in place and that processes the >input for the contact form on my web site... I neglected to mention that this was obviousl

Help needed with here documents (security?)

2013-10-23 Thread Ronald F. Guilmette
n my inbox that appear to indicate that not all of these exploit attempts failed. It now seems at least possible that two attempts may have breached my security, possibly because of a misunderstnding on my part of "here" documents and the way they actually work. So I need, desperately, to

Re: HERE DOCUMENTS and teachable moments

2004-03-09 Thread Robin Sheat
On Wed, Mar 10, 2004 at 11:30:35AM +1100, David le Blanc wrote: > Can we create a 'how do' keyed on 'problems answered' rather > than 'pure perl'. After all, who reads a 'how to' for something > they are not trying to do at the time :-) I started my own for my own problems at: http://www.kallisti

RE: HERE DOCUMENTS and teachable moments

2004-03-09 Thread David le Blanc
> -Original Message- > From: WC -Sx- Jones [mailto:[EMAIL PROTECTED] > Sent: Tuesday, 9 March 2004 5:54 PM > To: [EMAIL PROTECTED] > Subject: Re: HERE DOCUMENTS and teachable moments > > R. Joseph Newton wrote: > > > Better just to respond to the situation

Re: HERE DOCUMENTS and teachable moments

2004-03-09 Thread Robin Sheat
On Tue, Mar 09, 2004 at 08:57:45PM +1300, Robin Sheat wrote: > I was looking through my archives of the list for someone the other day. > I knew it was in there, but had no idea of the subject. If you continue Err, to clarify...was looking for something that wasn't in a howto, just something I sa

Re: HERE DOCUMENTS and teachable moments

2004-03-08 Thread Robin Sheat
On Tue, Mar 09, 2004 at 01:54:29AM -0500, WC -Sx- Jones wrote: > I agree - so I am totally talked out of the 'how to' thread. Oh :( I kinda liked them. It meant that if I knew I wanted to do something, and I knew that there was a how-to out there, I also knew they would have a meaningful subject

Re: HERE DOCUMENTS and teachable moments

2004-03-08 Thread WC -Sx- Jones
R. Joseph Newton wrote: Better just to respond to the situations as they arise. Sometimes this will mean pointing a person back to a recent thread that they *really should have* read themselves before posting. Sometimes a thread may also lead to other questions about the approach a person is t

Re: HERE DOCUMENTS and teachable moments

2004-03-08 Thread R. Joseph Newton
WC -Sx- Jones wrote: > Serguei Krivov wrote: > > Bill, > > > > Would it not be better to post (copy) this message and the following postings to > > perl.tips oriented for beginners (like me) > > > > http://www.nntp.perl.org/group/perl.tips > > > > Later it is going to be much easier to search per

Re: HERE DOCUMENTS

2004-03-08 Thread James Edward Gray II
search Perl Beginner's and if they, do they may find one of your posts, assuming they search for "HERE Documents" over "HERE Docs" for example. If they get here though, we have to ask ourselves if your post will clear up their question better than the HERE Doc questio

Re: HERE DOCUMENTS

2004-03-08 Thread WC -Sx- Jones
Serguei Krivov wrote: Bill, Would it not be better to post (copy) this message and the following postings to perl.tips oriented for beginners (like me) http://www.nntp.perl.org/group/perl.tips Later it is going to be much easier to search perl.tips with 8 messages posted up to date then go th

Re: HERE DOCUMENTS

2004-03-08 Thread Serguei Krivov
messages in perl.beginners. Thanks, Serguei > ATTACHMENT part 20 message/rfc822 Date: Sat, 06 Mar 2004 00:57:58 -0500 From: WC -Sx- Jones To: [EMAIL PROTECTED] Subject: HERE DOCUMENTS This is Part One of a Multipart posting - just to see if we can't keep things in the list archieves (

Re: HERE DOCUMENTS

2004-03-06 Thread Andrew Gaffney
WC -Sx- Jones wrote: This is Part One of a Multipart posting - just to see if we can't keep things in the list archieves (Give the listbots something to do :) (These are not really posted questions so much as they are things that beginners need to consider.) "HERE" DOCUMENTS *

HERE DOCUMENTS

2004-03-05 Thread WC -Sx- Jones
This is Part One of a Multipart posting - just to see if we can't keep things in the list archieves (Give the listbots something to do :) (These are not really posted questions so much as they are things that beginners need to consider.) "HERE" DOCUMENTS * Here documents ar

Re: evaluating expressions in here documents

2002-10-09 Thread Jenda Krynicky
From: Jim Ockers <[EMAIL PROTECTED]> > Is there any concise method of fully evaluating the arithmetic > expressions in here documents, rather than just one level of > substitution?: > > sub RotationMatrix { > my $theta = $_[0] * 3.14159265 / 180.0; > my $m

Re: evaluating expressions in here documents

2002-10-08 Thread John W. Krahn
Jim Ockers wrote: > > Is there any concise method of fully evaluating the arithmetic > expressions in here documents, rather than just one level of > substitution?: > > sub RotationMatrix { > my $theta = $_[0] * 3.14159265 / 180.0; > my $m = cos($theta);

evaluating expressions in here documents

2002-10-08 Thread Jim Ockers
Is there any concise method of fully evaluating the arithmetic expressions in here documents, rather than just one level of substitution?: sub RotationMatrix { my $theta = $_[0] * 3.14159265 / 180.0; my $m = cos($theta); my $n = sin($theta); my $T = Math::MatrixReal

Re: Interpolating function call in here documents causes out-of-order execution

2001-09-01 Thread Maxim Berlin
Hello Yusuf, Thursday, August 30, 2001, Yusuf Goolamabbas <[EMAIL PROTECTED]> wrote: YG> The following test program YG> #!/usr/bin/perl YG> sub main() { YG> $key = 5 ; YG> print <<"TARGET" ; YG> Foobar YG> Snafu YG> ${\(interp($key))} YG> TARGET YG> } YG> sub interp { YG> my ($arg) = @_ ; YG

Interpolating function call in here documents causes out-of-order execution

2001-09-01 Thread Yusuf Goolamabbas
The following test program #!/usr/bin/perl sub main() { $key = 5 ; print <<"TARGET" ; Foobar Snafu ${\(interp($key))} TARGET } sub interp { my ($arg) = @_ ; print "Hello World, $arg \n" ; return; } main(); gives the following output -- Hello World 5 Foobar Snafu -- I am stumped at this o

Re: interpolation of variables in here documents?

2001-07-24 Thread Michael Fowler
On Tue, Jul 24, 2001 at 02:34:48PM +0100, KAVANAGH, Michael wrote: > print <<"EOF"; > text text text $item{'key'} text text > EOF > > The value from the hash variable $item{'key'} doesn't seem to be > interpolated. It doesn't generate an error though. What string are you seeing printed? What di

interpolation of variables in here documents?

2001-07-24 Thread KAVANAGH, Michael
Hi there... I've checked learning perl and perl cookbook, and perldoc, but can't seem to come up with the reason why the following is failing: print <<"EOF"; text text text $item{'key'} text text EOF The value from the hash variable $item{'key'} doesn't seem to be interpolated. It doesn't genera