[17413] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4833 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Nov 7 18:06:09 2000

Date: Tue, 7 Nov 2000 15:05:25 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <973638325-v9-i4833@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Tue, 7 Nov 2000     Volume: 9 Number: 4833

Today's topics:
        $password = crypt($pass, ar); <me@privacy.net>
    Re: $password = crypt($pass, ar); <gods-apollo@home.com>
    Re: $password = crypt($pass, ar); <me@privacy.net>
    Re: $password = crypt($pass, ar); (Gwyn Judd)
    Re: $password = crypt($pass, ar); <ren.maddox@tivoli.com>
    Re: $password = crypt($pass, ar); <me@privacy.net>
    Re: $password = crypt($pass, ar); (Mark-Jason Dominus)
    Re: $password = crypt($pass, ar); (Mark-Jason Dominus)
    Re: $password = crypt($pass, ar); <szetlan@uu.net>
    Re: $password = crypt($pass, ar); <me@privacy.net>
    Re: -e file tester bug <donv@webimpact.com>
    Re: -e file tester bug <newsposter@cthulhu.demon.nl>
    Re: -e file tester bug <ren.maddox@tivoli.com>
    Re: -e file tester bug (Martien Verbruggen)
    Re: ANN-Upload.it, for sharewarists (and a request) <gellyfish@gellyfish.com>
    Re: ANN-Upload.it, for sharewarists (and a request) <camerond@mail.uca.edu>
        ANNOUNCE: MP3::Tag thg@users.sourceforge.net
        Anonymous Data (probably very easy) dottiebrooks@my-deja.com
    Re: Backtick problems on Windows98 (Martien Verbruggen)
    Re: Backtick problems on Windows98 <jeff@vpservices.com>
    Re: Copy of directory tree <adamf@box43.gnet.pl>
        Email this page Script <admin@allchiro.com>
    Re: Email this page Script (Gwyn Judd)
    Re: Email this page Script <peter.sundstrom@eds.com>
    Re: Failure / I don't know why ... <ren.maddox@tivoli.com>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Tue, 07 Nov 2000 20:08:09 GMT
From: "EM" <me@privacy.net>
Subject: $password = crypt($pass, ar);
Message-Id: <JiZN5.2309$Nw6.6586@news.iol.ie>

a cgi program i have uses this to encrypt a password
$password = crypt($pass, ar);

this particular program has no method of decrypting this though
instead when it verifys the password it encrypts whatever i enter with the
same code
and verifys the two encrypted codes are the same

But i need a code to decrypt the password to its orignal state
I thought about trying every possible code until i hit the right one
so i wrote a program to do it but it takes forever on even a 6 character
password
Is there a way to decrypt this faster? or a program to do it?

Eric




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

Date: Tue, 07 Nov 2000 20:38:12 GMT
From: "John" <gods-apollo@home.com>
Subject: Re: $password = crypt($pass, ar);
Message-Id: <UKZN5.64164$E85.1706681@news1.sttls1.wa.home.com>

Hi, Eric.  I don't have an answer for you.. but I would like a copy of that
code you have if it's open to sharing?

Thanks,

John


EM wrote in message ...
>a cgi program i have uses this to encrypt a password
>$password = crypt($pass, ar);
>
>this particular program has no method of decrypting this though
>instead when it verifys the password it encrypts whatever i enter with the
>same code
>and verifys the two encrypted codes are the same
>
>But i need a code to decrypt the password to its orignal state
>I thought about trying every possible code until i hit the right one
>so i wrote a program to do it but it takes forever on even a 6 character
>password
>Is there a way to decrypt this faster? or a program to do it?
>
>Eric
>
>




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

Date: Tue, 07 Nov 2000 20:54:01 GMT
From: "EM" <me@privacy.net>
Subject: Re: $password = crypt($pass, ar);
Message-Id: <JZZN5.2315$Nw6.6900@news.iol.ie>

The code is
set $password = to whatever encrypted code to break but it takes a long time
And i only tested this on windows with activeperl

# START CODE HERE
$password = "arBPW1YnSg92Y";
print "Brute forcing: $password\n";

($l1,$l2) = split(//,$password);
$salt = "$l1$l2";

$curdec = "0";
GETPASS: {
$test = crypt($curdec, $salt);
if ($test eq "$password"){
print "\nPassword: $curdec\n";
`pause`;
exit
} else {
$curdec ++;
redo GETPASS ;
}
}

#END HERE


"John" <gods-apollo@home.com> wrote in message
news:UKZN5.64164$E85.1706681@news1.sttls1.wa.home.com...
> Hi, Eric.  I don't have an answer for you.. but I would like a copy of
that
> code you have if it's open to sharing?
>
> Thanks,
>
> John
>
>
> EM wrote in message ...
> >a cgi program i have uses this to encrypt a password
> >$password = crypt($pass, ar);
> >
> >this particular program has no method of decrypting this though
> >instead when it verifys the password it encrypts whatever i enter with
the
> >same code
> >and verifys the two encrypted codes are the same
> >
> >But i need a code to decrypt the password to its orignal state
> >I thought about trying every possible code until i hit the right one
> >so i wrote a program to do it but it takes forever on even a 6 character
> >password
> >Is there a way to decrypt this faster? or a program to do it?
> >
> >Eric
> >
> >
>
>




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

Date: Tue, 07 Nov 2000 21:34:29 GMT
From: tjla@guvfybir.qlaqaf.bet (Gwyn Judd)
Subject: Re: $password = crypt($pass, ar);
Message-Id: <slrn90gtb3.hbr.tjla@thislove.dyndns.org>

I was shocked! How could EM <me@privacy.net>
say such a terrible thing:
>a cgi program i have uses this to encrypt a password
>$password = crypt($pass, ar);
>
>But i need a code to decrypt the password to its orignal state

Instead of attempting to brute force decrypt crypt(), how about storing
the password somewhere? In a file perhaps?

-- 
Gwyn Judd (print `echo 'tjla@guvfybir.qlaqaf.bet' | rot13`)
Marriage is a lot like the army, everyone complains, but you'd be
surprised at the large number that re-enlist.
		-- James Garner


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

Date: 07 Nov 2000 15:01:12 -0600
From: Ren Maddox <ren.maddox@tivoli.com>
Subject: Re: $password = crypt($pass, ar);
Message-Id: <m3puk7pkdj.fsf@dhcp11-177.support.tivoli.com>

I hate to step into this quagmire, but...

"EM" <me@privacy.net> writes:

> The code is
> set $password = to whatever encrypted code to break but it takes a long time
> And i only tested this on windows with activeperl
> 
> # START CODE HERE
> $password = "arBPW1YnSg92Y";
> print "Brute forcing: $password\n";
> 
> ($l1,$l2) = split(//,$password);
> $salt = "$l1$l2";

1. This is a silly way to get the salt. This is better:
   $salt = substr $password, 0, 2;
2. But even better than that is to just use the existing password as
   the salt -- only the first two characters will be used anyway.

> $curdec = "0";
> GETPASS: {
> $test = crypt($curdec, $salt);

What's up with people posting non-indented code?

> if ($test eq "$password"){
> print "\nPassword: $curdec\n";
> `pause`;
> exit
> } else {
> $curdec ++;

You initialized $curdec to 0 and then just keep incrementing it.  So
you are only testing for numeric passwords.  You're going to have to
be a little more cleaver to test all possible passwords.

> redo GETPASS ;
> }
> }
> 
> #END HERE

BTW, here's what perlfunc(1) has to say about this issue:

               Note that "crypt" is intended to be a one-way
               function, much like breaking eggs to make an
               omelette.  There is no (known) corresponding
               decrypt function.  As a result, this function
               isn't all that useful for cryptography.  (For
               that, see your nearby CPAN mirror.)

-- 
Ren Maddox
ren@tivoli.com


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

Date: Tue, 07 Nov 2000 21:47:40 GMT
From: "EM" <me@privacy.net>
Subject: Re: $password = crypt($pass, ar);
Message-Id: <0M_N5.2326$Nw6.6955@news.iol.ie>


"Ren Maddox" <ren.maddox@tivoli.com> wrote in message
news:m3puk7pkdj.fsf@dhcp11-177.support.tivoli.com...
> I hate to step into this quagmire, but...
>
> "EM" <me@privacy.net> writes:
>
> > The code is
> > set $password = to whatever encrypted code to break but it takes a long
time
> > And i only tested this on windows with activeperl
> >
> > # START CODE HERE
> > $password = "arBPW1YnSg92Y";
> > print "Brute forcing: $password\n";
> >
> > ($l1,$l2) = split(//,$password);
> > $salt = "$l1$l2";
>
> 1. This is a silly way to get the salt. This is better:
>    $salt = substr $password, 0, 2;
> 2. But even better than that is to just use the existing password as
>    the salt -- only the first two characters will be used anyway.
>
> > $curdec = "0";
> > GETPASS: {
> > $test = crypt($curdec, $salt);
>
> What's up with people posting non-indented code?
>
> > if ($test eq "$password"){
> > print "\nPassword: $curdec\n";
> > `pause`;
> > exit
> > } else {
> > $curdec ++;
>
> You initialized $curdec to 0 and then just keep incrementing it.  So
> you are only testing for numeric passwords.  You're going to have to
> be a little more cleaver to test all possible passwords.

Could u suggest a way for this to work with letters?
I dont know how to increment a word
like make aaaaa go to aaaab etc...

>
> > redo GETPASS ;
> > }
> > }
> >
> > #END HERE
>
> BTW, here's what perlfunc(1) has to say about this issue:
>
>                Note that "crypt" is intended to be a one-way
>                function, much like breaking eggs to make an
>                omelette.  There is no (known) corresponding
>                decrypt function.  As a result, this function
>                isn't all that useful for cryptography.  (For
>                that, see your nearby CPAN mirror.)
>
> --
> Ren Maddox
> ren@tivoli.com




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

Date: Tue, 07 Nov 2000 21:47:12 GMT
From: mjd@plover.com (Mark-Jason Dominus)
Subject: Re: $password = crypt($pass, ar);
Message-Id: <3a087859.6a61$127@news.op.net>
Keywords: Muzak, consonantal, hypocycloid, oppression


In article <UKZN5.64164$E85.1706681@news1.sttls1.wa.home.com>,
John <nobodyshere@com.home> wrote:
>Hi, Eric.  I don't have an answer for you.. but I would like a copy of that
>code you have if it's open to sharing?

Code that does that is available at

        http://perl.plover.com/IAQ/

Here it is:

        sub decrypt {
          my $c = shift;
          my @c = (0) x 8;
          for (;;) {
            my $i = 0;
            my $s = join '', map chr, @c;
            return $s if crypt($s, $c) eq $c;
            $c[$i]=0, $i++ while $c[$i] == 255;
            return undef if $i > 7;
            $c[$i]++;
          }
        }

-- 
@P=split//,".URRUU\c8R";@d=split//,"\nrekcah xinU / lreP rehtona tsuJ";sub p{
@p{"r$p","u$p"}=(P,P);pipe"r$p","u$p";++$p;($q*=2)+=$f=!fork;map{$P=$P[$f|ord
($p{$_})&6];$p{$_}=/ ^$P/ix?$P:close$_}keys%p}p;p;p;p;p;map{$p{$_}=~/^[P.]/&&
close$_}%p;wait until$?;map{/^r/&&<$_>}%p;$_=$d[$q];sleep rand(2)if/\S/;print


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

Date: Tue, 07 Nov 2000 21:48:59 GMT
From: mjd@plover.com (Mark-Jason Dominus)
Subject: Re: $password = crypt($pass, ar);
Message-Id: <3a0878ca.6a6c$2f2@news.op.net>

In article <JiZN5.2309$Nw6.6586@news.iol.ie>, EM <me@privacy.net> wrote:
>Is there a way to decrypt this faster? or a program to do it?

Sorry, there isn't.  If it were possible to reverse the encryption,
then there would be no point in encrypting the passwords in the first
place.



-- 
@P=split//,".URRUU\c8R";@d=split//,"\nrekcah xinU / lreP rehtona tsuJ";sub p{
@p{"r$p","u$p"}=(P,P);pipe"r$p","u$p";++$p;($q*=2)+=$f=!fork;map{$P=$P[$f|ord
($p{$_})&6];$p{$_}=/ ^$P/ix?$P:close$_}keys%p}p;p;p;p;p;map{$p{$_}=~/^[P.]/&&
close$_}%p;wait until$?;map{/^r/&&<$_>}%p;$_=$d[$q];sleep rand(2)if/\S/;print


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

Date: Tue, 7 Nov 2000 16:56:06 -0500
From: "Scott Zetlan" <szetlan@uu.net>
Subject: Re: $password = crypt($pass, ar);
Message-Id: <3a087a1d$0$20099@wodc7nh1.news.uu.net>

I must protest: storing passwords in files is a crime against man and beast.
Or at least against information security.

Better to store the encrypted password in a file, and never save the
password itself; prompt a user for a password and encrypt it as a challenge,
then compare the challenge to the saved encrypted password.  That way when
(not if) someone unscrupulous finds the file, it will take a little longer
to derive the password.

Gwyn Judd wrote in message ...
>I was shocked! How could EM <me@privacy.net>
>say such a terrible thing:
>Instead of attempting to brute force decrypt crypt(), how about storing
>the password somewhere? In a file perhaps?





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

Date: Tue, 07 Nov 2000 22:17:23 GMT
From: "EM" <me@privacy.net>
Subject: Re: $password = crypt($pass, ar);
Message-Id: <Tb%N5.2332$Nw6.6976@news.iol.ie>


"Mark-Jason Dominus" <mjd@plover.com> wrote in message
news:3a087859.6a61$127@news.op.net...
>
> In article <UKZN5.64164$E85.1706681@news1.sttls1.wa.home.com>,
> John <nobodyshere@com.home> wrote:
> >Hi, Eric.  I don't have an answer for you.. but I would like a copy of
that
> >code you have if it's open to sharing?
>
> Code that does that is available at
>
>         http://perl.plover.com/IAQ/
>
> Here it is:
>
>         sub decrypt {
>           my $c = shift;
>           my @c = (0) x 8;
>           for (;;) {
>             my $i = 0;
>             my $s = join '', map chr, @c;
>             return $s if crypt($s, $c) eq $c;
>             $c[$i]=0, $i++ while $c[$i] == 255;
>             return undef if $i > 7;
>             $c[$i]++;
>           }
>         }
>
> --
> @P=split//,".URRUU\c8R";@d=split//,"\nrekcah xinU / lreP rehtona tsuJ";sub
p{
>
@p{"r$p","u$p"}=(P,P);pipe"r$p","u$p";++$p;($q*=2)+=$f=!fork;map{$P=$P[$f|or
d
> ($p{$_})&6];$p{$_}=/
^$P/ix?$P:close$_}keys%p}p;p;p;p;p;map{$p{$_}=~/^[P.]/&&
> close$_}%p;wait until$?;map{/^r/&&<$_>}%p;$_=$d[$q];sleep
rand(2)if/\S/;print

this looks good but where do i put the encrypted string i want to decrypt?






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

Date: Tue, 07 Nov 2000 15:49:09 -0500
From: Don Vaillancourt <donv@webimpact.com>
Subject: Re: -e file tester bug
Message-Id: <3A086AC5.82E302EF@webimpact.com>

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
I wrote a small script which uses the -e file test operator and it works
similarly on both machines.&nbsp; But when I use the code I wrote which
is a database library with 1656 lines of code, that's when I get the problem.&nbsp;
Here is the offending function.
<br>&nbsp;
<p># **** READRUNNING - Read values from the running table ***********************
<br>sub _readRunning
<br>{
<br>&nbsp;&nbsp;&nbsp; $properties->{running}->{"running_size"}=0; # this
is a mock entry
<p>&nbsp;&nbsp;&nbsp; my $i;
<br>&nbsp;&nbsp;&nbsp; my $file = $properties->{running};
<p>&nbsp;&nbsp;&nbsp; if (-e "$file")&nbsp; # &lt;-- This is where the
problem occurs *********************************
<br>&nbsp;&nbsp;&nbsp; {
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (open (RUNNING, "&lt;$file"))
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
@running_list=&lt;RUNNING>;
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
close(RUNNING);
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $i=@running_list;
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $properties->{running}->{"running_size"}=$i;
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; foreach $running (@running_list)
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
($name,$value) = split("=",$running);
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
$properties->{running}->{"$name"}="$value";
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }
<br>&nbsp;&nbsp;&nbsp; }
<br>&nbsp;&nbsp;&nbsp; else
<br>&nbsp;&nbsp;&nbsp; {
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # check to see which columns
require an auto increament id
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; my $column_count = $properties->{column_count};
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for ($i=0; $i &lt; $column_count;
$i++)
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
if ($properties->{columns}->[$i]->{auto} eq $TRUE)
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
{
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
my $name ="$properties->{columns}->[$i]->{name}";
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
$name=$name . "_auto";
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
$properties->{running}->{$name}=0;
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
$properties->{running}->{"running_size"}++;
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }
<br>&nbsp;&nbsp;&nbsp; }
<br>}
<br>&nbsp;
<p>Red Hat Version ------------------------------------------------
<p>This is perl, version 5.005_62 built for i386-bsdos
<p>Copyright 1987-1999, Larry Wall
<p>BSD Version ------------------------------------------------
<p>This is perl, version 5.005_03 built for i386-linux
<p>Copyright 1987-1999, Larry Wall
<br>&nbsp;
<br>&nbsp;</html>



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

Date: 7 Nov 2000 21:06:38 GMT
From: Erik van Roode <newsposter@cthulhu.demon.nl>
Subject: Re: -e file tester bug
Message-Id: <8u9qsu$t3i$1@internal-news.uu.net>

Don Vaillancourt <donv@webimpact.com> wrote:
> <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
> <html>

You might get more responses if you posted in plain text

Erik



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

Date: 07 Nov 2000 14:54:07 -0600
From: Ren Maddox <ren.maddox@tivoli.com>
Subject: Re: -e file tester bug
Message-Id: <m3u29jpkpc.fsf@dhcp11-177.support.tivoli.com>

Don Vaillancourt <donv@webimpact.com> writes:

> I wrote a small script which uses the -e file test operator and it works
> similarly on both machines.  But when I use the code I wrote which is a

So then you know that it isn't the -e operator that is the problem,
right?

> database library with 1656 lines of code, that's when I get the
> problem.  Here is the offending function.   
> 
>     $properties->{running}->{"running_size"}=0; # this is a mock entry

So, $properties->{running} is a reference to a hash, yes?

>     my $i;
>     my $file = $properties->{running};

Or is it the name of a file?

Well, assuming you don't have strict refs enabled, then it can be
both.  And if you do have it enabled, then the first line would get an
error (unless) it isn't really set to a file name at that point.

>     if (-e "$file")  # <-- This is where the problem occurs

Perhaps you should print the value of $file and verify that it is what
you expect.

-- 
Ren Maddox
ren@tivoli.com


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

Date: Tue, 07 Nov 2000 22:42:12 GMT
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: -e file tester bug
Message-Id: <slrn90h1a7.7ck.mgjv@verbruggen.comdyn.com.au>

[Usenet is a plain text medium. Please post plain text. I'll show you
why]

On Tue, 07 Nov 2000 15:49:09 -0500,
	Don Vaillancourt <donv@webimpact.com> wrote:
><!doctype html public "-//w3c//dtd html 4.0 transitional//en">
><html>
> I wrote a small script which uses the -e file test operator and it works
> similarly on both machines.&nbsp; But when I use the code I wrote which
> is a database library with 1656 lines of code, that's when I get the problem.&nbsp;
> Here is the offending function.

This is how (part of) your function looks to me:

><br>&nbsp;
><p># **** READRUNNING - Read values from the running table ***********************
><br>sub _readRunning
><br>{
><br>&nbsp;&nbsp;&nbsp; $properties->{running}->{"running_size"}=0; # this
> is a mock entry
><p>&nbsp;&nbsp;&nbsp; my $i;
><br>&nbsp;&nbsp;&nbsp; my $file = $properties->{running};

[snip rest of wasteful unreadable stuff]

Martien
-- 
Martien Verbruggen              | 
Interactive Media Division      | +++ Out of Cheese Error +++ Reinstall
Commercial Dynamics Pty. Ltd.   | Universe and Reboot +++
NSW, Australia                  | 


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

Date: 7 Nov 2000 07:51:24 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: ANN-Upload.it, for sharewarists (and a request)
Message-Id: <8u8c9s$8th$1@orpheus.gellyfish.com>

On Sun, 05 Nov 2000 13:43:00 -0600 Cameron Dorey wrote:
> Jonathan Stowe wrote:
>> 
>> On Thu, 02 Nov 2000 11:58:23 +0100 Dr.Upload wrote:
>> > Hi!
>> > http://xxxxxx.it is a new site created for
>> > sharewarists, i.e. shareware developers.
>> >
>> 
>> Hands up if there are any 'sharewarists' on the group ....
> 
> I grew up a Methodist, is that close enough? (but now I'm an ...'ian')
> 

Now I'm confused - I thought your name was Cameron, not Ian.

/J\
-- 
Jonathan Stowe                      |     
<http://www.gellyfish.com>          |      This space for rent
                                    |


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

Date: Tue, 07 Nov 2000 15:12:56 -0600
From: Cameron Dorey <camerond@mail.uca.edu>
Subject: Re: ANN-Upload.it, for sharewarists (and a request)
Message-Id: <3A087058.2464C23F@mail.uca.edu>

Jonathan Stowe wrote:
> 
> On Sun, 05 Nov 2000 13:43:00 -0600 Cameron Dorey wrote:
> > Jonathan Stowe wrote:
> >>
> >> On Thu, 02 Nov 2000 11:58:23 +0100 Dr.Upload wrote:
> >> > Hi!
> >> > http://xxxxxx.it is a new site created for
> >> > sharewarists, i.e. shareware developers.
> >> >
> >>
> >> Hands up if there are any 'sharewarists' on the group ....
> >
> > I grew up a Methodist, is that close enough? (but now I'm an ...'ian')
> >
> 
> Now I'm confused - I thought your name was Cameron, not Ian.

That's my 'who,' not my 'what.' (Hmmm, sounds like something Theodor
Geisel could make something out of.)

Cameron

-- 
Cameron Dorey
Associate Professor of Chemistry
University of Central Arkansas
Phone: 501-450-5938
camerond@mail.uca.edu


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

Date: 07 Nov 2000 19:50:11 +0100
From: thg@users.sourceforge.net
Subject: ANNOUNCE: MP3::Tag
Message-Id: <m3em0n1usc.fsf@cal056202.student.utwente.nl>

Hello,

I want to announce a new perl module for reading and writing tags of
mp3 files.

This first beta version supports at the moment reading and writing of
ID3v1, ID3v1.1 and ID3v2.3 tags. But some special frames of ID3v2.3
are not supported yet.

MP3::Tag is actually a wrapper module for the MP3::TAG::ID3v1 and
MP3::TAG::ID3v2 modules, so it will be easy to support other tags
also in near future.

The module comes along with some example perl programs, which show
how to use the modules.

YOu can find the module at CPAN or at 
http://sourceforge.net/projects/tagged . There you will find also
a announce-mailinglist and forums to discuss the module.

Following are the Synopsis of the modules.

If you have comments/suggestions about the modules, I would like
to hear them.

  Thomas

===============================================================

NAME
       MP3::Tag - Perl extension for reading tags of mp3 files

SYNOPSIS
         use Tag;
         $mp3 = MP3::Tag->new($filename);
         $mp3->getTags;

         if (exists $mp3->{ID3v1}) {
           $id3v1 = $mp3->{ID3v1};
           print $id3v1->song;
           ...
         }

         if (exists $mp3->{ID3v2}) {
           ($name, $info) = $mp3->{ID3v2}->getFrame("TIT2");
           ...
         }



NAME
       MP3::TAG::ID3v1 - Perl extension for reading / writing ID3v1 tags 
       of mp3-files

SYNOPSIS
       MP3::TAG::ID3v2 is designed to be called from the MP3::Tag module.  
       It then returns a ID3v2-tag-object, which can be used in a users program.

         use MP3::TAG::ID3v1;
         $id3v1 = MP3::TAG::ID3v1->new($mp3obj);

       `$mp3obj' is a object from MP3::Tag. See according documentation.  
       `$tag' is undef when no tag is found in the `$mp3obj'.

       * Reading the tag

           print "   Song: " .$id3v1->song . "\n";
           print " Artist: " .$id3v1->artist . "\n";
           print "  Album: " .$id3v1->album . "\n";
           print "Comment: " .$id3v1->comment . "\n";
           print "   Year: " .$id3v1->year . "\n";
           print "  Genre: " .$id3v1->genre . "\n";
           print "  Track: " .$id3v1->track . "\n";
           @tagdata = $mp3->all();
           foreach (@tagdata) {
             print $_;
           }

       * Changing / Writing the tag

             $id3v1->comment("This is only a Test Tag");
             $id3v1->song("testing");
             $id3v1->artist("Artest");
             $id3v1->album("Test it");
             $id3v1->year("1965");
             $id3v1->track("5");
             $id3v1->genre("Blues");
             # or at once
             $id3v1->all("song title","artist","album","1900","comment",10,"Ska");
             $id3v1->writeTag;


NAME
       MP3::TAG::ID3v2 - Read / Write ID3v2.3 tags from MP3 audio files

SYNOPSIS
       MP3::TAG::ID3v2 is designed to be called from the MP3::Tag module.  
       It then returns a ID3v2-tag-object, which can be used in a users program.

         $id3v2 = MP3::TAG::ID3v2->new($mp3obj);

       `$mp3obj' is a object from MP3::Tag. See according documentation.  
       `$tag' is undef when no tag is found in the `$mp3obj'.

       * Reading a tag

         @frameIDs = $id3v2->getFrameIDS;

         foreach my $frame (@frameIDs) {
           my ($info, $name) = $id3v2->getFrame($frame);
           if (ref $info) {
             print "$name ($frame):\n";
             while(my ($key,$val)=each %$info) {
               print " * $key => $val\n";
             }
           } else {
             print "$name: $info\n";
           }
         }

       * Changing / Writing a tag

         $id3v2->add_frame("TIT2", "Title of the song");
         $id3v2->change_frame("TALB","Greatest Album");
         $id3v2->remove_frame("TLAN");

         $id3v2->write_tag();


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

Date: Tue, 07 Nov 2000 21:54:24 GMT
From: dottiebrooks@my-deja.com
Subject: Anonymous Data (probably very easy)
Message-Id: <8u9tmc$6lf$1@nnrp1.deja.com>

Hi,
  I'm trying to calculate all permutations of all combinations of some
data.  I have to say that the combination portion of the code is
courtesy of a Bart Lateur of this group, but any errors are entirely my
own.  Essentially the combination portion is returning @result and I
want to feed this into the permutation calculation.  At present I
appear to be feeding in the reference, not the value.  There is
probably a symbol or something equally easy to do this, but I cannot
locate it.  Can anyone help?

Cheers,
Russ

use List::Permutor;
use strict;

my @result;

getemall('A', 'B', 'C', 'D');
my $perm = new List::Permutor @result;
while (my @set = $perm->next) {
    print "One order is @set.\n";
}

sub getemall {

    for my $i (1 .. 1<<@_) {
        push @result, [ map { ($i & 1<<$_)?$_[$_]:() } 0..$#_];
    }
    return @result;
}


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Tue, 07 Nov 2000 22:16:44 GMT
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: Backtick problems on Windows98
Message-Id: <slrn90gvqf.7ck.mgjv@verbruggen.comdyn.com.au>

{please, in the future, post your reply after the suitably trimmed
text you reply to, and wrap the result correctly. It makes posts so
much more easy to read, and conforms to the accepted posting style on
clp.misc and Usenet in general. Thank you]

On Tue, 07 Nov 2000 09:37:32 GMT,
	peter_lerup@my-deja.com <peter_lerup@my-deja.com> wrote:

[reformatted and re-ordered]

> In article <slrn90emnn.7ck.mgjv@verbruggen.comdyn.com.au>,
>   mgjv@tradingpost.com.au wrote:
>> On Mon, 6 Nov 2000 21:55:24 +0100,
>> 	Peter Lerup <peter.lerup@ecs.ericsson.se> wrote:
>> >
>> > $a = `dir`;
>>
>> My recommendation would be to not use external commands for this,
>> since Perl is perfectly capable of doing this internally with a
>> minimum amount of fuss. You'll end up with code which is faster and
>> more portable.
> 
> Well, the problem is that we have a lot of
> scripts with excessive use of backticks and pipes
> and these have up till now been working perfecly

Yes, you could try to find a shell that works better (maybe Microsoft
has a patch lying around that fixes it, or what do they call it? A
service pack or 'supplement', I believe). However, to avoid this
problem in the future, and problems similar to that, it would probably
be a good idea to get in the habit of only using external programs
when it makes sense.

You still don't say whether you need anything else than the file name
from that output. If you do, you could write a little library file
with a sub that mimics the output of DOS dir, using Perl internals.
That way all you need to do in your programs is inlcude the library,
and change the 

$snafu = `dir`;

lines to

$snafu = my_dir();

You could even pass it globs, and let Perl's internal glob function do
its work.

If you find that all that code you use calls `dir`, followed by some
wild pattern matching lines to get file names, you can get rid of all
that code, and replace it with a single glob.

Since you don't specify how that output is being used, I can't give
you any more decent advice. 

> on all Windows versions. The problem has appeared
> on newer laptops. I've tried using the PER5SHELL
> environment variable and that seems to work, that
> is it would if there was an alternative standard
> shell available for Windows 98. The old cmd32.exe
> previously distributed with Perl for Win32
> doesn't work.

There are quite a few different replacement shells out for Win32,
arent' there? Places like www.winfoles.com and www.tucows.com should
have one or two. I don't know that much about windows.

Martien
-- 
Martien Verbruggen              | 
Interactive Media Division      | That's not a lie, it's a
Commercial Dynamics Pty. Ltd.   | terminological inexactitude.
NSW, Australia                  | 


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

Date: Tue, 07 Nov 2000 14:38:08 -0800
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: Backtick problems on Windows98
Message-Id: <3A088450.E8B6807C@vpservices.com>

Peter Lerup wrote:
> 
> The problem is that on some Windows 98 machines the redirection of stdout
> doesn't seem to work. Whenever doing anything like
> 
> $a = `dir`;
> 
> The result of the command goes directly to the console window and not into
> the variable.

Works fine on my win98 with ActiveState perl, build 618.

And since you say it works on *some* of your win98 machines, I suggest
you look at other differences between the machines.  For example, what
version of perl is on each machine?  There were a couple of builds of
ActiveState (613 and some others, IIRC) that had problems with
backticks.  Check the bug reports and change logs on the activestate
site, I'm pretty sure they mention this problem.

-- 
Jeff


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

Date: Tue, 07 Nov 2000 21:01:04 +0100
From: Adam <adamf@box43.gnet.pl>
Subject: Re: Copy of directory tree
Message-Id: <3A085F80.7FF5@box43.gnet.pl>

Andre wrote:
> 
> I want to make a copy of a directory tree (including files). The first
> solution to do this is call system(cp -r) for Linux and system(xcopy /R)
> for Windows but I like to make a perl script that run in both OS.
> Does anyone know a good and clean way to do this?

one clue:
use File::Find;

--
Adam.


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

Date: Tue, 07 Nov 2000 13:11:51 -0800
From: Mike <admin@allchiro.com>
Subject: Email this page Script
Message-Id: <cG0IOkUibIh5sg2TBFuDj7Nj+16B@4ax.com>

I am looking for a script that will email a web page in html and/or
text format.

"Email this page" or "Email this article to a friend"

Something like what is used at Yahoo! or many other sites I have
visited. Any suggestions?

Thanks
Mike


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

Date: Tue, 07 Nov 2000 21:39:55 GMT
From: tjla@guvfybir.qlaqaf.bet (Gwyn Judd)
Subject: Re: Email this page Script
Message-Id: <slrn90gtl9.hbr.tjla@thislove.dyndns.org>

I was shocked! How could Mike <admin@allchiro.com>
say such a terrible thing:
>I am looking for a script that will email a web page in html and/or
>text format.

Have you written any code? :) I'd look into the module called
MIME::Lite, it's nice and easy to use.

-- 
Gwyn Judd (print `echo 'tjla@guvfybir.qlaqaf.bet' | rot13`)
Man is the only animal that blushes -- or needs to.
		-- Mark Twain


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

Date: Wed, 8 Nov 2000 11:19:03 +1300
From: "Peter Sundstrom" <peter.sundstrom@eds.com>
Subject: Re: Email this page Script
Message-Id: <8u9val$4u1$1@hermes.nz.eds.com>


Mike <admin@allchiro.com> wrote in message
news:cG0IOkUibIh5sg2TBFuDj7Nj+16B@4ax.com...
> I am looking for a script that will email a web page in html and/or
> text format.
>
> "Email this page" or "Email this article to a friend"
>
> Something like what is used at Yahoo! or many other sites I have
> visited. Any suggestions?

Go to http://cgi-resources.com/ or any search engine to choose from hundreds
of them.




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

Date: 07 Nov 2000 13:02:36 -0600
From: Ren Maddox <ren.maddox@tivoli.com>
Subject: Re: Failure / I don't know why ...
Message-Id: <m3u29jr4fn.fsf@dhcp11-177.support.tivoli.com>

Christian Oehring <Christian.Oehring@de.bosch.com> writes:

If there's any relevant code before this, you didn't post it.

> push (@groups,remove_enter($_));
> }

[most of code snipped]

> if (!(grep(/$group/,@groups)))

The code that sets @groups is missing above.

> if (grep(/$user/,@users))

As is any code that sets @users.

> It works very fine when I do the task for Global section but not for the
> local section. Does anybody see the failure ???

When I comment out the two ifs, and feed it your data, it outputs:


[User]
[Global]
[Local]
LocGroup1~GroupDesc~User2~
LocGroup2~GroupDesc~User2~User3~
LocGroup3~GroupDesc~User1~User2~User3~

Isn't that what you want?  What's the problem?

-- 
Ren Maddox
ren@tivoli.com


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

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


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