[19233] in Perl-Users-Digest
Perl-Users Digest, Issue: 1428 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Aug 2 14:14:26 2001
Date: Thu, 2 Aug 2001 11:05:11 -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: <996775510-v10-i1428@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Thu, 2 Aug 2001 Volume: 10 Number: 1428
Today's topics:
Re: Can a regex or a tr/ do this sort of successive sub <mjcarman@home.com>
Cgi question... <muus@elyptic.com>
Re: Cgi question... <jurgenex@hotmail.com>
Re: Cgi question... <Tassilo.Parseval@post.rwth-aachen.de>
Re: challenging question <ilya@martynov.org>
Re: challenging question (Tad McClellan)
Changing user while using HTTP authentication <nomis80@linuxquebec.com>
Re: Changing user while using HTTP authentication <jeff@vpservices.com>
Re: Changing user while using HTTP authentication <nomis80@linuxquebec.com>
Re: Converting in Image::Magick (Keith Falconer)
Re: global variables <ren@tivoli.com>
Re: Help on Array ? <gnarinn@hotmail.com>
How do I... <acacia@online.no>
Re: How do I... (Tad McClellan)
Re: how to change environnement variable in perl (Win32 <ilya@martynov.org>
Re: how to change environnement variable in perl (Win32 <mjcarman@home.com>
Re: Howto run traceroute-parse IP's-store in array? (Yves Orton)
interesting way to learn Perl <alexgontcharov@onebox.com>
Re: interesting way to learn Perl (Tad McClellan)
Re: Matching Strings in an array <mjcarman@home.com>
Matt Wrights formmail alert <mp@imchat.com>
Re: Matt Wrights formmail alert <godzilla@stomp.stomp.tokyo>
Re: Matt Wrights formmail alert (Randal L. Schwartz)
Re: Matt Wrights formmail alert <godzilla@stomp.stomp.tokyo>
Re: password protact a file (Nava)
Re: password protact a file (Nava)
PERL is cool - DBD: CHarts <brad7477@!!remoove##aol.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 02 Aug 2001 09:56:33 -0500
From: Michael Carman <mjcarman@home.com>
Subject: Re: Can a regex or a tr/ do this sort of successive substitution?
Message-Id: <3B696A21.B4A6536@home.com>
Perl Girl wrote:
>
> I need to make a char-by-char substitution of one string into another.
> For example, I need to replace each '?' below with the next available
> char from the second scalar. I wish to end up with:
>
> cat
> man1
> dog 2
> mou3se
> hen 4
>
> #!/usr/bin/perl -wd
> use strict;
>
> $_='cat
> man?
> dog ?
> mou?se
> hen ?';
>
> my $m='1234';
>
> s/\?/$m/geos;
You don't need the /os here. (Or the /e, for your sample, but we'll use
it for the fix.)
As your replacement string seems to be a simple counter, the easiest way
is:
my $i;
s/\?/++$i/ge;
For a true char-for-char you could use this:
my $m='1234';
my $i;
s/\?/substr($m,$i++,1)/ge;
-mjc
------------------------------
Date: Thu, 02 Aug 2001 16:46:25 GMT
From: "Tim Muus" <muus@elyptic.com>
Subject: Cgi question...
Message-Id: <Btfa7.39025$sf2.7699417@news3.rdc1.on.home.com>
Help!!! I have a cgi that needs to process japanese characters. How can I
make this work? The only way to get it to work is to remove the japanes
characters - not an option!!! Please help me!!
Thanks in Advance!!
Tim
------------------------------
Date: Thu, 2 Aug 2001 10:36:35 -0700
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: Cgi question...
Message-Id: <3b698fa3$1@news.microsoft.com>
If you have a CGI question (see your own subject), then why are you posting
it to a Perl language group?
"Tim Muus" <muus@elyptic.com> wrote in message
news:Btfa7.39025$sf2.7699417@news3.rdc1.on.home.com...
> Help!!! I have a cgi that needs to process japanese characters. How can
I
> make this work? The only way to get it to work is to remove the japanes
> characters - not an option!!! Please help me!!
Insufficient information. Please define "Japanese characters" (the Japanese
language uses three different sets of characters).
Anyhow, chances are that this is not your real problem. Please read up on
encodings/code pages/charsets and make sure that the browser and your script
agree on the encoding/charset (Shift-JIS, UTF-8, or UCS-2 are probably some
of the more common options).
jue
------------------------------
Date: Thu, 02 Aug 2001 19:42:38 +0200
From: Tassilo von Parseval <Tassilo.Parseval@post.rwth-aachen.de>
Subject: Re: Cgi question...
Message-Id: <3B69910E.2020709@post.rwth-aachen.de>
Tim Muus wrote:
>Help!!! I have a cgi that needs to process japanese characters. How can I
>make this work? The only way to get it to work is to remove the japanes
>characters - not an option!!! Please help me!!
>
I remember recently having seen a module on CPAN going into this
direction. And, alas, here it is:
http://search.cpan.org/search?dist=Jcode
Tassilo
--
Any clod can have the facts, but having opinions is an art.
-- Charles McCabe
------------------------------
Date: 02 Aug 2001 19:28:24 +0400
From: Ilya Martynov <ilya@martynov.org>
Subject: Re: challenging question
Message-Id: <871ymuscpz.fsf@abra.ru>
DJ> I'm nitpicking, but actually this is not correct. Perl builtins
DJ> tend to be exempt from warnings and from strict. Indeed, I have
DJ> used this factum to avoid initialising vars in the JAPH below,
DJ> which is -w and strict clean, at least under 5.6.x :-).
You are right. I always thought that Perl code like
use warnings;
my $test;
$test ++;
should cause undefined value warning but it seems I was wrong. Funny
that simular code
use warnings;
my $test;
$test = $test + 1;
does causes such warning.
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
| Ilya Martynov (http://martynov.org/) |
| GnuPG 1024D/323BDEE6 D7F7 561E 4C1D 8A15 8E80 E4AE BE1A 53EB 323B DEE6 |
| AGAVA Software Company (http://www.agava.com/) |
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
------------------------------
Date: Thu, 2 Aug 2001 11:25:32 -0400
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: challenging question
Message-Id: <slrn9mis7c.rmm.tadmc@tadmc26.august.net>
Ilya Martynov <ilya@martynov.org> wrote:
>
>DJ> I'm nitpicking, but actually this is not correct. Perl builtins
>DJ> tend to be exempt from warnings and from strict. Indeed, I have
>DJ> used this factum to avoid initialising vars in the JAPH below,
>DJ> which is -w and strict clean, at least under 5.6.x :-).
>
>You are right. I always thought that Perl code like
>
> use warnings;
> my $test;
> $test ++;
>
>should cause undefined value warning but it seems I was wrong.
No, you _were_ right, but are _now_ wrong :-)
There used to be such a warning, but it went away many versions ago.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Thu, 2 Aug 2001 12:06:00 -0400
From: Simon Perreault <nomis80@linuxquebec.com>
Subject: Changing user while using HTTP authentication
Message-Id: <HSea7.7632$Ah5.139702@wagner.videotron.net>
I should send this to an HTTP-related group, but none exist, my program is
written in perl, and perl programmers know HTTP.
The problem is simple: I'm programming an administration interface much
like webmin (but much simpler, the audience targetted is not the same) and
I'm using HTTP authentication. Now I want to add a feature that lets you
change the user you are logging as, and that feature shouldn't be "Please
close your browser and come again."
I was thinking of writing a script that would say "access denied" once,
forcing the browser to ask the user for a username/password, and then it
would forward the user to where he came from. But the statelessness is
kinda hard to overcome.
Any ideas?
Thanks.
--
Simon Perreault -- Public key: http://nomis80.dyn.dhs.org/nomis80.gpg
------------------------------
Date: Thu, 02 Aug 2001 09:11:32 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: Changing user while using HTTP authentication
Message-Id: <3B697BB4.BEBD859E@vpservices.com>
Simon Perreault wrote:
>
> I should send this to an HTTP-related group, but none exist
Try one of the 19 groups in the comp.infosystems.www.* hierarchy.
--
Jeff
------------------------------
Date: Thu, 2 Aug 2001 13:31:46 -0400
From: Simon Perreault <nomis80@linuxquebec.com>
Subject: Re: Changing user while using HTTP authentication
Message-Id: <57ga7.2707$_d1.154585@weber.videotron.net>
Jeff Zucker wrote:
> Try one of the 19 groups in the comp.infosystems.www.* hierarchy.
Thanks, I just did that. Now let's play the waiting game...
--
Simon Perreault -- Public key: http://nomis80.dyn.dhs.org/nomis80.gpg
------------------------------
Date: 2 Aug 2001 08:16:19 -0700
From: keith.falconer@planet-interkom.de (Keith Falconer)
Subject: Re: Converting in Image::Magick
Message-Id: <ae4e5404.0108020716.533c7117@posting.google.com>
"Ron Savage" <ron@savage.net.au> wrote in message news:<MV5a7.3046$257.125768@ozemail.com.au>...
> Kolorove Nebo <sky@mail.lviv.ua> wrote in message news:3B67B8D5.D9D1E169@mail.lviv.ua...
> > I'm using Image::Magick on Win32 platform.
> > Can anybody point me an exaple of using "convert" command
> > in PERL scripts in Win32 distribution.
> > In my case i got message: could not find convert.al in @INC (there is no
> > file
> > with such name at my computer at all, i've cecked it), is it possible
> > that i have
> > to load any additional libriaries or programms to use CONVERT.
>
> ImageMagick's convert program is a stand-alone program. Hence it is not in Image::Magick. Hence the error message.
>
> Of course, you could use Perl to run convert like you would run any other command-line program, eg using system() or `` (backticks).
>
> You will need to explain what you are trying to do before we can work out how to help.
There's a complete and nicely commented example of converting image
formats (and many other things) using Image::Magick in the eagle book
(Lincoln Stein & Doug MacEachern, Writing Apache Modules with Perl and
C), pp. 104-13. A demo of the programme is at
http://www.modperl.com/examples/chapter4/Apache::Magick.html
It should be pretty easy to rework the code for purposes other than
mod_perl. What Kolorove seems to be looking for is Image::Magick's
Write() method using the appropriate filename extension in uppercase
(which presumably invokes ImageMagick's convert() behind the scenes).
Assuming this in your application code:
my $q = Image::Magick->new();
you can convert an image using this:
$q->Write('filename' =>'JPG');
Watch out for the fact that Image::Magick expects a filename or - as
input and not a filehandle. The eagle book suggests using the >&=
notation for this.
HTH
Keith
Hm. Google doesn't seem to support .sigs
------------------------------
Date: 02 Aug 2001 11:00:34 -0500
From: Ren Maddox <ren@tivoli.com>
Subject: Re: global variables
Message-Id: <m34rrqih99.fsf@dhcp9-161.support.tivoli.com>
On 2 Aug 2001, anno4000@lublin.zrz.tu-berlin.de wrote:
> According to Manuel Körner <manuel.koerner@rexroth.de>:
>
> Please place your reply below the (suitably trimmed) quoted
> material.
>
>> here's the sourcefile which to include with require:
>>
>> # filename test.pl
>> use strict;
>> package test;
>> our $TRUE = 1;
>> ...
>>
>> # sourcefile which includes the test.pl
>> use strict;
>> require "./test.pl"
>> ...
>> return $TRUE;
>> ...
>>
>> error message:
>> "Global symbol $TRUE requires explicit package name at ...
>>
>> Thank you
>>
>> Manuel Körner
>
> Okay, so you're running under strict, which is good. In test.pl
> you declare $TRUE with our. As "perldoc -f our" tells you, this
> dispenses you from using the fully qualified $main::TRUE in the
> current block. The current block is the whole file test.pl, since
> "our" happens top level, but not any more. Your main program
> constitutes another block, and you need to dispense yourself again.
> Add another "our $TRUE;" to the main program and all will be well.
Except that test.pl includes a package declaration before the "our
$TRUE". So $TRUE is really $test::TRUE. Adding an "our $TRUE;" to
the main program, without a package declaration, is going to be
$main::TRUE.
There are many solutions. Here are a few ranked from less desirable
to more desirable:
4. Remove the package declaration from test.pl. Still need the "our
$TRUE" in both test.pl and the main program.
3. Refer to $test::TRUE from the main program. The "our $TRUE" is no
longer needed in the main program.
2. Use "use" instead of "require". Have Test.pm use the standard
Exporter package to export $TRUE. Use "my $TRUE" in test.pl and just
"use Test" from the main program. (May need to "use lib qw(.)"
first.)
1. Never ever create a variable called $TRUE -- nothing good can come
of it.
--
Ren Maddox
ren@tivoli.com
------------------------------
Date: Thu, 2 Aug 2001 15:53:23 +0000
From: gnari <gnarinn@hotmail.com>
Subject: Re: Help on Array ?
Message-Id: <996767603.357835160102695.gnarinn@hotmail.com>
In article <21724be2.0107310634.58579dc6@posting.google.com>,
Tim <tvn007@hotmail.com> wrote:
>Could someone please help me on this ?
>
>@in1=(10); #Please DO NOT MODIFY the ARRAY
>@in2=(AB);
>$"="";
>for ($i=0;$i<=2;$i++){
>
> print "@in1[$i] @in2[$i]\n";
>}
>
>THe ouput of the script above is:
>
>10 AB
>
>However, I would like the output to be
>
>1 A
>0 B
>
>Any help would be greatly appriciate !!
your problem is that you do not use strict or enable warnings
try to do
perl -w yourscript.pl
and all should be clear. if not, add the line
use diagnostics;
at the start of your script.
then you might want to use strict (although that is not your problem in
this case) to help you avoid more potential problems. In the very least,
when asking for help on the newsgroups, you should always make sure your
code compiles with strict, and does not issue warnings with -w, if you
do not want to look foolish.
gnari
------------------------------
Date: Thu, 2 Aug 2001 18:31:51 -0700
From: "Tarjei Mandt" <acacia@online.no>
Subject: How do I...
Message-Id: <2gfa7.3128$e%4.93463@news3.oke.nextra.no>
I need to find the number of characters between a < and a > in a string.
<a href="#"> would return 10
Also, how do i delete HTML tags like <img src="#"> or <br> from a string?
Help would be much appreciated.
------------------------------
Date: Thu, 2 Aug 2001 12:28:37 -0400
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: How do I...
Message-Id: <slrn9mivtl.rvf.tadmc@tadmc26.august.net>
Tarjei Mandt <acacia@online.no> wrote:
>Subject: How do I...
Please put the subject of your article in the Subject of your article.
>I need to find the number of characters between a < and a > in a string.
><a href="#"> would return 10
What have you tried already?
If you show us your code, we can help you fix it.
Here are a couple of dirty hacks that might maybe sometimes
kinda sorta do what you seem to be asking for:
if ( /<([^>]+)>/ ) { # using regexen is futile and fragile!
print length($1), "\n";
}
# this is easy to break too
if (my $open = index($_, '<') and my $close = index($_, '>') ) {
die "huh?" if $close < $open;
print $close - $open - 1, "\n";
}
>Also, how do i delete HTML tags like <img src="#"> or <br> from a string?
>
>Help would be much appreciated.
Checking the Perl FAQ *before* posting to the Perl newsgroup would be
much appreciated.
perldoc -q HTML
"How do I remove HTML from a string?"
Which points out several cases of legal HTML that will break
the code above.
Use a module that understands HTML for processing HTML.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: 02 Aug 2001 19:22:04 +0400
From: Ilya Martynov <ilya@martynov.org>
Subject: Re: how to change environnement variable in perl (Win32)
Message-Id: <878zh2sd0j.fsf@abra.ru>
>> I would like to change the environnement variable called Hi
>> In batch file, I decare it like this:
>> SET Hi=Hello
>> And use it :
>> ECHO %Hi%
>> After I call a perl script, and I can import this value using:
>> $ENV{Hi}
>> It works for reading, but if I change $ENV{Hi}in the perl scrip:
>> $ENV{Hi}="Good Bye";
>> after the perl script is finished, the %Hi% variable is still set to Hello
>> instead of "Good Bye".
>> Do you know how to make environnement variable change in my perl script
>> still available after execution?
It is impossible. Change of environment variable in child process does
not affect parent process.
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
| Ilya Martynov (http://martynov.org/) |
| GnuPG 1024D/323BDEE6 D7F7 561E 4C1D 8A15 8E80 E4AE BE1A 53EB 323B DEE6 |
| AGAVA Software Company (http://www.agava.com/) |
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
------------------------------
Date: Thu, 02 Aug 2001 09:44:00 -0500
From: Michael Carman <mjcarman@home.com>
Subject: Re: how to change environnement variable in perl (Win32)
Message-Id: <3B696730.C00DAE47@home.com>
[Posted and mailed]
666.diablo@wanadoo.fr wrote:
>
> Do you know how to make environnement variable change in my perl
> script still available after execution?
Tsk. This is answered in the FAQ, which you should check _before_
posting.
At any rate, you can't really do this. The script runs as a separate
process. Changes to a child's environment do not get pushed back to the
parent. The only thing you can try to do is have your script return
something which the parent interprets and have the parent change its own
environment.
-mjc
------------------------------
Date: 2 Aug 2001 08:55:12 -0700
From: demerphq@hotmail.com (Yves Orton)
Subject: Re: Howto run traceroute-parse IP's-store in array?
Message-Id: <74f348f7.0108020755.14913c2c@posting.google.com>
xenite9@my-dejanews.com (Adam) wrote in message news:<b67a511f.0108012248.887dc06@posting.google.com>...
> Hello,
>
> I am trying to write a Perl script that will run traceroute (or maybe
> mtr) and parse out the IP addresses and store them in an array.
> Anyone know how to do this? Below is my ATTEMPT to do half of the
> job, and I can't make it work properly. Just to point out the
> obvious, I am not a Perl programmer, so be gentle. Please help.
A sample data set would help those of us who arent on the same OS to
help you.
My solution is provided below, and is for NT tracert.
> -----------
> #!/usr/bin/perl -w
>
> use strict;
>
> system("/usr/sbin/traceroute www.google.com > tr.txt");
I think you should read up on backticks. For instance I would do it
this way:
my $txt=`tracert www.google.com`; #backticks
> my @array = ("tr.txt");
>
> for my $i(@array) {
> open(FH, "$i");
should be (if you are going to do it this way, which you shouldnt.
open(FH,$i) || die "Cant open $i: $!";
> while(<FH>) {
> $_ =~ s/ /\n/g;
> #THE ABOVE LINE DOES HALF OF THE WORK, BUT I CAN'T GET IT TO ONLY
> #PARSE LINES BEGINNING WITH "(" AND ENDING IN ")" WHERE THE IP
> #ADDRESSES ARE LOCATED.
> print $_;
> }
> }
> ------------
This is a little strange... I dont follow your logic at all.
>
> MY PROJECT OUTLINE:
<SNIP>
Well here how I would pull the IPs out of the output from tracert. I
have provided said output in the data block so you can see the idea.
I imagine (not having seen you input) that you could replace
(/\[([^\]]+)\]/);
with
(/\(([^)]+)\)/);
if the IPs are in round brackety and not square brackets.
Good luck on your project. Sounds quite ambitious.
Yves
________________________________
#!perl
use strict;
use warnings;
my @ips;
while (<DATA>) {
next if !/^\s*\d+/;
push @ips,$1 if (/\[([^\]]+)\]/);
}
print join(",",@ips)."\n";
__DATA__
Tracing route to computer.company.com [123.123.123.123]
over a maximum of 30 hops:
1 <10 ms <10 ms <10 ms computer1.company.com [123.123.123.1]
2 <10 ms <10 ms <10 ms computer.company.com [123.123.123.123]
Trace complete.
------------------------------
Date: Thu, 2 Aug 2001 23:34:55 +0800
From: "Alex Gontcharov" <alexgontcharov@onebox.com>
Subject: interesting way to learn Perl
Message-Id: <9kbpa9$j24$1@newton3.pacific.net.sg>
If you want to learn Perl or Linux , you don't have to install one on your
home system.
You can use on-line dedicated Linux servers available from datacenters
around the globe. Only one problem, usually these boxes are pretty
expensive.
However there is a new technology called Virtuozzo, which allows to
partition server to hundreds independednt virtual private servers(also known
as a virtual environments or VE) which are basically as good as a stand
alone servers but cost only a small fee.
For instance for 9 USD per month you get your own Linux box on the broadband
network with 50 Mb hard disk space, your own administrative (root) access
rights and ability to install any software you like (within your disk
quote)!
Virtual private server (VE) has many features preinstalled.
Since VE is similar to stand alone Linux server it has 2 users root and the
one you have created when subscribing for it. So you can telnet or ssh in to
your server to learn Linux command line and practice your administration
skills.
Virtual Environment has Apache Web server. It is configured to use the
Microsoft FrontPage 2000 Extension. Thus if you have Microsoft Front Page,
you can use it to edit your new web site.
You can do your own scripting: CGI, mod_perl, mod_php, SSI
There is a web mail client and mail server. You can use your normal E-mail
client (Outlook f.e.) to read its E-mail.
Each VE has FTP server and a Web Forum up and running and... lots of stuff
which usually comes with a standard Linux server installation.
Just visit http://virtual.1-net.com.sg hosting portal for example to take a
look
Best Regards,
Alex
------------------------------
Date: Thu, 2 Aug 2001 11:28:31 -0400
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: interesting way to learn Perl
Message-Id: <slrn9miscv.rmm.tadmc@tadmc26.august.net>
Alex Gontcharov <alexgontcharov@onebox.com> wrote:
>
>If you want to learn Perl or Linux , you don't have to install one on your
>home system.
You can install Perl and a web server (both free) on your own
computer, and have control over everything...
>You can use on-line dedicated Linux servers available from datacenters
>around the globe. Only one problem, usually these boxes are pretty
>expensive.
... or you can pay someone and have control over many things.
What was the advantage to your approach again?
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Thu, 02 Aug 2001 10:29:46 -0500
From: Michael Carman <mjcarman@home.com>
Subject: Re: Matching Strings in an array
Message-Id: <3B6971EA.6980156B@home.com>
Per Kistler wrote:
>
> Ryan Gralinski wrote:
> >
> > i need to match if every element of @words is in $cname
>
> [...]
>
> if( @words == grep { $cname =~ /$_/ } @words ){
> print "cname '$cname' matched by all of '@words'\n";
> }
I'd like to clarify something here, lest novices be misled. First, let's
write the above more explicitly:
my @words2 = grep { $cname =~ /$_/ } @words;
if( @words == @words2 ){
print "cname '$cname' matched by all of '@words'\n";
}
There's a trap here for the unwary. To the novice, it looks like the
if() is comparing two arrays. It isn't. It compares the length of the
arrays. By itself, this only tells us whether the arrays *could* be
equivalent based on their size. It says nothing about their contents.
That's enough here, because @words2 was built from the elements of
@words which passed the test. So *in this case* we know that if the two
arrays have the same number of elements, they're equal.
-mjc
------------------------------
Date: Thu, 02 Aug 2001 11:31:49 -0500
From: mark <mp@imchat.com>
Subject: Matt Wrights formmail alert
Message-Id: <3B698075.4F441BC7@imchat.com>
If you're using this forms processor you need to delete it from your
server and use another/better one or at least rename it. formmail.pl and
formmail.cgi are being scanned for and when found, spammers are sending
huge quantities of spam through your domain. You won't find out about it
till you make the spammers list!!
Happened to a friend of mine. The only thing surprising about this is
how long it took spammers to realize they could do this very easily!!!
------------------------------
Date: Thu, 02 Aug 2001 09:37:39 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Matt Wrights formmail alert
Message-Id: <3B6981D3.46ECCE41@stomp.stomp.tokyo>
mark wrote:
> If you're using this forms processor you need to delete it from your
> server and use another/better one or at least rename it. formmail.pl and
> formmail.cgi are being scanned for and when found, spammers are sending
> huge quantities of spam through your domain. You won't find out about it
> till you make the spammers list!!
> Happened to a friend of mine. The only thing surprising about this is
> how long it took spammers to realize they could do this very easily!!!
Why does this only apply to Matt Wright's mailer?
Godzilla!
------------------------------
Date: 02 Aug 2001 09:39:20 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Matt Wrights formmail alert
Message-Id: <m1hevqh0w7.fsf@halfdome.holdit.com>
>>>>> "Godzilla!" == Godzilla! <godzilla@stomp.stomp.tokyo> writes:
Godzilla!> Why does this only apply to Matt Wright's mailer?
It doesn't. It applies to any remailer where the address is specified
by user form data. However, Matt Wright's is the most famous of
those, and is more likely to be installed on sites than all the others
combined.
But you knew that. Why the funny question? :)
print "Just another Perl hacker,"
--
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: Thu, 02 Aug 2001 10:35:35 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Matt Wrights formmail alert
Message-Id: <3B698F67.EB4CB07D@stomp.stomp.tokyo>
Randal L. Schwartz wrote:
> >>>>> Godzilla! wrote:
> Godzilla! > Why does this only apply to Matt Wright's mailer?
> It doesn't. It applies to any remailer where the address is specified
> by user form data. However, Matt Wright's is the most famous of
> those, and is more likely to be installed on sites than all the others
> combined.
> But you knew that. Why the funny question? :)
I suspect this Mark fellow is starting up another one
of these troll initiated "I hate Matt Wright" spam
argument series. Chances are good at least a dozen
people will jump on this bandwagon and spam this
group with fifty reasons to leave Matt Wright.
Last I scanned the net for mailers, I developed a list
of over one-hundred remailers, some written in Perl,
some in C and, others in Java. If I were to scan the
net for installed and working mailers, I wouldn't
limit myself to just Matt's script nor would I be
interested in spamming. My interest would be in those
scripts vulnerable to commands which will mail me
superuser / user password files.
**
Randal, feel free to ignore or not respond to this; I will
not be offended as this is not important at all.
My interest is perked by an article about setting environmental
variables in DOS via Perl. An example,
SET test=successful
Usual DOS command line stuff.
I been playing with a script and carefully reading my old
MS-DOS 6.2 book published by QUE along with searching through
O'Reilly's complete bookshelf and O'Reilly's Perl bookshelf
for any clues on how to imaginatively set DOS variables via Perl.
So far, I have partial success using a rogue method. This
method creates a .bat file, then tries to execute it, all
within a Perl script. Obviously, I can write the file and,
I can execute the file, but I cannot get it to work quite
right; an "out of environment space" message is returned.
Kinda suspect I need a Control C or similar closing command.
I have added echo off but this initiates two separate
commands, as if I am running two bat files.
Here is what I have so far in my play:
#!perl
open (BAT, ">special.bat");
print BAT "SET test=successful";
close (BAT);
system ("special.bat");
print $ENV{test};
This returns:
C:\APACHE\USERS\TEST>SET test=successful
Out of environment space
open (BAT, ">special.bat");
print BAT open (BAT, ">special.bat");
print BAT "\@ECHO OFF
SET test=successful";
close (BAT);
system ("special.bat");
print $ENV{test};
This returns:
C:\APACHE\USERS\TEST>1@ECHO OFF
Bad command or file name
C:\APACHE\USERS\TEST>SET test=successful
Out of environment space
Care to enjoin any comments which will point me
in the right direction? Feel free to pass on this
one; it is only play. I won't be offended, truly.
Want me to send you a list of vulnerable remailers
installed on the net?
Heh!
Godzilla!
------------------------------
Date: 2 Aug 2001 08:59:19 -0700
From: nava@conexys.com (Nava)
Subject: Re: password protact a file
Message-Id: <33730d00.0108020759.68c90fc5@posting.google.com>
"Jag Man" <jagman98@home.com> wrote in message news:<nZ0a7.45119$oh1.15575802@news2.rdc2.tx.home.com>...
> How can it be done from perl, any built in function? similar to "vi -x".
>
> TIA!
test
------------------------------
Date: 2 Aug 2001 09:07:48 -0700
From: nava@conexys.com (Nava)
Subject: Re: password protact a file
Message-Id: <33730d00.0108020807.576cad31@posting.google.com>
"Jag Man" <jagman98@home.com> wrote in message news:<nZ0a7.45119$oh1.15575802@news2.rdc2.tx.home.com>...
> How can it be done from perl, any built in function? similar to "vi -x".
>
> TIA!
test
------------------------------
Date: Thu, 02 Aug 2001 10:28:45 -0600
From: Brad McCormack <brad7477@!!remoove##aol.com>
Subject: PERL is cool - DBD: CHarts
Message-Id: <996769725.658199@goodnews.cos.agilent.com>
Anybody use DBD::Charts yet
------------------------------
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.
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 1428
***************************************