Skip Menu |

This queue is for tickets about the Filter-Crypto CPAN distribution.

Report information
The Basics
Id: 48752
Status: resolved
Priority: 0/
Queue: Filter-Crypto

People
Owner: Nobody in particular
Requestors: mianrojas [...] hotmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: $0 is not working when encrypted
Date: Sun, 16 Aug 2009 17:07:58 +0200
To: <bug-filter-crypto [...] rt.cpan.org>
From: Miguel Angel Rojas Gómez <mianrojas [...] hotmail.com>
Hi all, Here is an very short and concise example in which you can see something is not working properly when a perl file is encrypted: # cat test.pl #!/usr/bin/perl print "\$0 : $0\n"; $0 = "xxxxxxxxxxx 1 2 3 4"; print "--\n"; system("ps -ef | grep -v grep | grep $$"); print "--\n"; print "\$0 : $0\n"; exit 0; # ./test.pl A B C $0 : ./test.pl -- root 2992 2806 0 16:53 pts/0 00:00:00 xxxxxxxxxxx 1 2 3 4 -- $0 : xxxxxxxxxxx 1 2 3 4 # pp -f Crypto -F Crypto -M Filter::Crypto::Decrypt -o test test.pl # ./test A B C $0 : ./test -- root 3017 2806 99 16:53 pts/0 00:00:01 xxxxxx A B C -- $0 : xxxxxxxxxxx 1 2 3 4 # uname -a Linux test01 2.6.26-2-686 #1 SMP Sun Jun 21 04:57:38 UTC 2009 i686 GNU/Linux # perl -v This is perl, v5.10.0 built for i486-linux-gnu-thread-multi Copyright 1987-2007, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at http://www.perl.org/, the Perl Home Page. I'm currently using Debian GNU/Linux, lenny version. Crypto (1.23) modules have been compiled and installed properly with no error. As you can see, it seems not possible to change executable name when file is encrypted and only 6 characters have changed. It seems to be an error, because encryption should warranty same output. Any ideas? Thanks for you help. Show quoted text
_________________________________________________________________ Internet Explorer 8 más sencillo y seguro ¡Descárgatelo gratis! http://events.es.msn.com/noticias/internet-explorer-8/
CC: Miguel Angel Rojas Gómez <mianrojas [...] hotmail.com>
Subject: RE: [rt.cpan.org #48752] $0 is not working when encrypted
Date: Mon, 17 Aug 2009 09:44:16 +0100
To: <bug-Filter-Crypto [...] rt.cpan.org>
From: "Steve Hay" <SteveHay [...] planit.com>
Hi Miguel, Thanks for the bug report. Unfortunately, I only have a Windows system available and I can't reproduce this problem. I have Cygwin installed, but your test program (unencrypted!) just produces this: $ perl ./test.pl $0 : ./test.pl -- shay 4960 3504 con 09:36:22 /usr/bin/perl shay 2884 4960 con 09:36:22 /usr/bin/sh -- $0 : xxxxxxxxxxx 1 2 3 4 Note that you're doing two things at once with the "pp -f Crypto..." command: you're encrypting the script and you're packaging it up into a PAR executable. Perhaps you could do some further tests to discover whether it is the encryption done by Filter-Crypto or the executable packaging done by PAR that is the cause of the problem. For example, if you run the crypt_file script to encrypt test.pl but don't package it up into a PAR executable, does that exhibit the same problem? And if you run "pp" without the -f / -F / -M arguments to produce a PAR executable in which the script is not encrypted, does that exhibit the same problem? Cheers, Steve Show quoted text
> -----Original Message----- > From: Miguel Angel Rojas Gómez via RT [mailto:bug-Filter- > Crypto@rt.cpan.org] > Sent: 16 August 2009 16:09 > To: undisclosed-recipients > Subject: [rt.cpan.org #48752] $0 is not working when encrypted > > Sun Aug 16 11:08:31 2009: Request 48752 was acted upon. > Transaction: Ticket created by mianrojas@hotmail.com > Queue: Filter-Crypto > Subject: $0 is not working when encrypted > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: mianrojas@hotmail.com > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=48752 > > > > > Hi all, > > > > Here is an very short and concise example in which you can see > something is not working properly when a perl file is encrypted: > > > > # cat test.pl > #!/usr/bin/perl > > print "\$0 : $0\n"; > $0 = "xxxxxxxxxxx 1 2 3 4"; > print "--\n"; > system("ps -ef | grep -v grep | grep $$"); > print "--\n"; > print "\$0 : $0\n"; > > exit 0; > > > > # ./test.pl A B C > $0 : ./test.pl > -- > root 2992 2806 0 16:53 pts/0 00:00:00 xxxxxxxxxxx 1 2 3 4 > -- > $0 : xxxxxxxxxxx 1 2 3 4 > > > > # pp -f Crypto -F Crypto -M Filter::Crypto::Decrypt -o test test.pl > > > > # ./test A B C > $0 : ./test > -- > root 3017 2806 99 16:53 pts/0 00:00:01 xxxxxx A B C > -- > $0 : xxxxxxxxxxx 1 2 3 4 > > > > # uname -a > Linux test01 2.6.26-2-686 #1 SMP Sun Jun 21 04:57:38 UTC 2009 i686 > GNU/Linux > > > > # perl -v > > This is perl, v5.10.0 built for i486-linux-gnu-thread-multi > > Copyright 1987-2007, Larry Wall > > Perl may be copied only under the terms of either the Artistic License > or the > GNU General Public License, which may be found in the Perl 5 source kit. > > Complete documentation for Perl, including FAQ lists, should be found > on > this system using "man perl" or "perldoc perl". If you have access to > the > Internet, point your browser at http://www.perl.org/, the Perl Home > Page. > > > > I'm currently using Debian GNU/Linux, lenny version. Crypto (1.23) > modules have been compiled and installed properly with no error. > > > > As you can see, it seems not possible to change executable name when > file is encrypted and only 6 characters have changed. > > It seems to be an error, because encryption should warranty same output. > > > > Any ideas? > > > > Thanks for you help. > > > > > > > > > > > _________________________________________________________________ > Internet Explorer 8 más sencillo y seguro ¡Descárgatelo gratis! > http://events.es.msn.com/noticias/internet-explorer-8/
Subject: RE: [rt.cpan.org #48752] $0 is not working when encrypted
Date: Mon, 17 Aug 2009 13:26:15 +0200
To: <bug-filter-crypto [...] rt.cpan.org>
From: Miguel Angel Rojas Gómez <mianrojas [...] hotmail.com>
Hi Steve, First for the quick response. a) For the encrypt file, it seems the behaviour is not reproduced when the file is encrypted: #crypt_file <test.pl >testenc.pl OK # perl ./testenc.pl $0 : ./testenc.pl -- root 3189 2984 4 13:12 pts/1 00:00:00 xxxxxxxxxxx 1 2 3 4 -- $0 : xxxxxxxxxxx 1 2 3 4 But this is not valid for me because I would like to pack everything into a binary executable. But the good news it seems the problem is not reproduce b) I tested with PAR alone (no filter) test01:~# ./test A B C $0 : ./test -- root 3257 2984 0 13:23 pts/1 00:00:00 xxxxxx A B C <-- See that!! -- $0 : xxxxxxxxxxx 1 2 3 4 As you can see, it does not work either. If you apply a filter to the PAR archive (different from crypto) ... test01:~# ./test A B C $0 : ./test -- root 3276 2984 30 13:24 pts/1 00:00:00 xxxxxx A B C <-- Same result with other filter?? -- $0 : xxxxxxxxxxx 1 2 3 4 Same behaviour. Something weird... only 6 first character are replaced and arguments seems to be missing as well.. (????) Any ideas? Could it be related to PAR?? Regards Show quoted text
> Subject: RE: [rt.cpan.org #48752] $0 is not working when encrypted > From: bug-Filter-Crypto@rt.cpan.org > To: mianrojas@hotmail.com > Date: Mon, 17 Aug 2009 04:45:10 -0400 > > <URL: http://rt.cpan.org/Ticket/Display.html?id=48752 > > > Hi Miguel, > > > > Thanks for the bug report. > > > > Unfortunately, I only have a Windows system available and I can't reproduce this problem. I have Cygwin installed, but your test program (unencrypted!) just produces this: > > > > $ perl ./test.pl > > $0 : ./test.pl > > -- > > shay 4960 3504 con 09:36:22 /usr/bin/perl > > shay 2884 4960 con 09:36:22 /usr/bin/sh > > -- > > $0 : xxxxxxxxxxx 1 2 3 4 > > > > Note that you're doing two things at once with the "pp -f Crypto..." command: you're encrypting the script and you're packaging it up into a PAR executable. Perhaps you could do some further tests to discover whether it is the encryption done by Filter-Crypto or the executable packaging done by PAR that is the cause of the problem. > > > > For example, if you run the crypt_file script to encrypt test.pl but don't package it up into a PAR executable, does that exhibit the same problem? > > > > And if you run "pp" without the -f / -F / -M arguments to produce a PAR executable in which the script is not encrypted, does that exhibit the same problem? > > > > Cheers, > > Steve > > > > >
> > -----Original Message-----
>
> > From: Miguel Angel Rojas Gómez via RT [mailto:bug-Filter-
>
> > Crypto@rt.cpan.org]
>
> > Sent: 16 August 2009 16:09
>
> > To: undisclosed-recipients
>
> > Subject: [rt.cpan.org #48752] $0 is not working when encrypted
>
> >
>
> > Sun Aug 16 11:08:31 2009: Request 48752 was acted upon.
>
> > Transaction: Ticket created by mianrojas@hotmail.com
>
> > Queue: Filter-Crypto
>
> > Subject: $0 is not working when encrypted
>
> > Broken in: (no value)
>
> > Severity: (no value)
>
> > Owner: Nobody
>
> > Requestors: mianrojas@hotmail.com
>
> > Status: new
> >
> >
>
> >
>
> >
>
> > Hi all,
>
> >
>
> >
>
> >
>
> > Here is an very short and concise example in which you can see
>
> > something is not working properly when a perl file is encrypted:
>
> >
>
> >
>
> >
>
> > # cat test.pl
>
> > #!/usr/bin/perl
>
> >
>
> > print "\$0 : $0\n";
>
> > $0 = "xxxxxxxxxxx 1 2 3 4";
>
> > print "--\n";
>
> > system("ps -ef | grep -v grep | grep $$");
>
> > print "--\n";
>
> > print "\$0 : $0\n";
>
> >
>
> > exit 0;
>
> >
>
> >
>
> >
>
> > # ./test.pl A B C
>
> > $0 : ./test.pl
>
> > --
>
> > root 2992 2806 0 16:53 pts/0 00:00:00 xxxxxxxxxxx 1 2 3 4
>
> > --
>
> > $0 : xxxxxxxxxxx 1 2 3 4
>
> >
>
> >
>
> >
>
> > # pp -f Crypto -F Crypto -M Filter::Crypto::Decrypt -o test test.pl
>
> >
>
> >
>
> >
>
> > # ./test A B C
>
> > $0 : ./test
>
> > --
>
> > root 3017 2806 99 16:53 pts/0 00:00:01 xxxxxx A B C
>
> > --
>
> > $0 : xxxxxxxxxxx 1 2 3 4
>
> >
>
> >
>
> >
>
> > # uname -a
>
> > Linux test01 2.6.26-2-686 #1 SMP Sun Jun 21 04:57:38 UTC 2009 i686
>
> > GNU/Linux
>
> >
>
> >
>
> >
>
> > # perl -v
>
> >
>
> > This is perl, v5.10.0 built for i486-linux-gnu-thread-multi
>
> >
>
> > Copyright 1987-2007, Larry Wall
>
> >
>
> > Perl may be copied only under the terms of either the Artistic License
>
> > or the
>
> > GNU General Public License, which may be found in the Perl 5 source kit.
>
> >
>
> > Complete documentation for Perl, including FAQ lists, should be found
>
> > on
>
> > this system using "man perl" or "perldoc perl". If you have access to
>
> > the
>
> > Internet, point your browser at http://www.perl.org/, the Perl Home
>
> > Page.
>
> >
>
> >
>
> >
>
> > I'm currently using Debian GNU/Linux, lenny version. Crypto (1.23)
>
> > modules have been compiled and installed properly with no error.
>
> >
>
> >
>
> >
>
> > As you can see, it seems not possible to change executable name when
>
> > file is encrypted and only 6 characters have changed.
>
> >
>
> > It seems to be an error, because encryption should warranty same output.
>
> >
>
> >
>
> >
>
> > Any ideas?
>
> >
>
> >
>
> >
>
> > Thanks for you help.
>
> >
>
> >
>
> >
>
> >
>
> >
>
> >
>
> >
>
> >
>
> >
>
> >
>
> > _________________________________________________________________
>
> > Internet Explorer 8 más sencillo y seguro ¡Descárgatelo gratis!
> >
Show quoted text
_________________________________________________________________ ¿Quieres los nuevos emoticonos en 3D? ¡Descárgatelos gratis! http://www.vivelive.com/emoticonos3d/index2.html
Subject: RE: [rt.cpan.org #48752] $0 is not working when encrypted
Date: Mon, 17 Aug 2009 13:30:56 +0200
To: <bug-filter-crypto [...] rt.cpan.org>
From: Miguel Angel Rojas Gómez <mianrojas [...] hotmail.com>
Hi Steve, Forgot to include the command that I use: #pp -o test test.pl --> No filter used #pp -f Bleach -o test test.pl <-- Bleach filter used Miguel Show quoted text
_________________________________________________________________ Entérate de todas las noticias al instante ¡Suscríbete al servicio de Alertas MSN! http://especiales.es.msn.com/noticias/msninforma.aspx
CC: Miguel Angel Rojas Gómez <mianrojas [...] hotmail.com>
Subject: RE: [rt.cpan.org #48752] $0 is not working when encrypted
Date: Mon, 17 Aug 2009 12:36:18 +0100
To: <bug-Filter-Crypto [...] rt.cpan.org>
From: "Steve Hay" <SteveHay [...] planit.com>
Hi Miguel, Thanks for trying the extra tests. So it looks like the problem is nothing to do with Filter-Crypto, but is actually a bug in PAR/pp instead. Therefore, it would be best if this ticket was closed and you opened a new ticket in the PAR queue for the bug in that instead. If you give them the simplest example that you have which exhibits the bug (i.e. the test with the "pp -o test test.pl" command, and no filters involved at all) then hopefully someone will be able to help you there. There is also a PAR mailing list (par@perl.org) that you could try as well. Cheers, Steve Show quoted text
> -----Original Message----- > From: Miguel Angel Rojas Gómez via RT [mailto:bug-Filter- > Crypto@rt.cpan.org] > Sent: 17 August 2009 12:27 > To: undisclosed-recipients > Subject: RE: [rt.cpan.org #48752] $0 is not working when encrypted > > Queue: Filter-Crypto > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=48752 > > > > > Hi Steve, > > > > First for the quick response. > > > > a) For the encrypt file, it seems the behaviour is not reproduced > when the file is encrypted: > > > > #crypt_file <test.pl >testenc.pl > OK > > > # perl ./testenc.pl > $0 : ./testenc.pl > -- > root 3189 2984 4 13:12 pts/1 00:00:00 xxxxxxxxxxx 1 2 3 4 > -- > $0 : xxxxxxxxxxx 1 2 3 4 > > > But this is not valid for me because I would like to pack > everything into a binary executable. But the good news it > > seems the problem is not reproduce > > > > b) I tested with PAR alone (no filter) > > > > test01:~# ./test A B C > $0 : ./test > -- > root 3257 2984 0 13:23 pts/1 00:00:00 xxxxxx A B C <-- See > that!! > -- > $0 : xxxxxxxxxxx 1 2 3 4 > > > As you can see, it does not work either. If you apply a filter to > the PAR archive (different from crypto) ... > > > > test01:~# ./test A B C > $0 : ./test > -- > root 3276 2984 30 13:24 pts/1 00:00:00 xxxxxx A B C <-- Same > result with other filter?? > -- > $0 : xxxxxxxxxxx 1 2 3 4 > > > Same behaviour. Something weird... only 6 first character are > replaced and arguments seems to be missing as well.. (????) > > > > Any ideas? Could it be related to PAR?? > > > > Regards > >
> > Subject: RE: [rt.cpan.org #48752] $0 is not working when encrypted > > From: bug-Filter-Crypto@rt.cpan.org > > To: mianrojas@hotmail.com > > Date: Mon, 17 Aug 2009 04:45:10 -0400 > > > > <URL: http://rt.cpan.org/Ticket/Display.html?id=48752 > > > > > Hi Miguel, > > > > > > > > Thanks for the bug report. > > > > > > > > Unfortunately, I only have a Windows system available and I can't
> reproduce this problem. I have Cygwin installed, but your test program > (unencrypted!) just produces this:
> > > > > > > > $ perl ./test.pl > > > > $0 : ./test.pl > > > > -- > > > > shay 4960 3504 con 09:36:22 /usr/bin/perl > > > > shay 2884 4960 con 09:36:22 /usr/bin/sh > > > > -- > > > > $0 : xxxxxxxxxxx 1 2 3 4 > > > > > > > > Note that you're doing two things at once with the "pp -f Crypto..."
> command: you're encrypting the script and you're packaging it up into a > PAR executable. Perhaps you could do some further tests to discover > whether it is the encryption done by Filter-Crypto or the executable > packaging done by PAR that is the cause of the problem.
> > > > > > > > For example, if you run the crypt_file script to encrypt test.pl but
> don't package it up into a PAR executable, does that exhibit the same > problem?
> > > > > > > > And if you run "pp" without the -f / -F / -M arguments to produce a
> PAR executable in which the script is not encrypted, does that exhibit > the same problem?
> > > > > > > > Cheers, > > > > Steve > > > > > > > > > >
> > > -----Original Message-----
> >
> > > From: Miguel Angel Rojas Gómez via RT [mailto:bug-Filter-
> >
> > > Crypto@rt.cpan.org]
> >
> > > Sent: 16 August 2009 16:09
> >
> > > To: undisclosed-recipients
> >
> > > Subject: [rt.cpan.org #48752] $0 is not working when encrypted
> >
> > >
> >
> > > Sun Aug 16 11:08:31 2009: Request 48752 was acted upon.
> >
> > > Transaction: Ticket created by mianrojas@hotmail.com
> >
> > > Queue: Filter-Crypto
> >
> > > Subject: $0 is not working when encrypted
> >
> > > Broken in: (no value)
> >
> > > Severity: (no value)
> >
> > > Owner: Nobody
> >
> > > Requestors: mianrojas@hotmail.com
> >
> > > Status: new
> > > >
> > >
> >
> > >
> >
> > >
> >
> > > Hi all,
> >
> > >
> >
> > >
> >
> > >
> >
> > > Here is an very short and concise example in which you can see
> >
> > > something is not working properly when a perl file is encrypted:
> >
> > >
> >
> > >
> >
> > >
> >
> > > # cat test.pl
> >
> > > #!/usr/bin/perl
> >
> > >
> >
> > > print "\$0 : $0\n";
> >
> > > $0 = "xxxxxxxxxxx 1 2 3 4";
> >
> > > print "--\n";
> >
> > > system("ps -ef | grep -v grep | grep $$");
> >
> > > print "--\n";
> >
> > > print "\$0 : $0\n";
> >
> > >
> >
> > > exit 0;
> >
> > >
> >
> > >
> >
> > >
> >
> > > # ./test.pl A B C
> >
> > > $0 : ./test.pl
> >
> > > --
> >
> > > root 2992 2806 0 16:53 pts/0 00:00:00 xxxxxxxxxxx 1 2 3 4
> >
> > > --
> >
> > > $0 : xxxxxxxxxxx 1 2 3 4
> >
> > >
> >
> > >
> >
> > >
> >
> > > # pp -f Crypto -F Crypto -M Filter::Crypto::Decrypt -o test test.pl
> >
> > >
> >
> > >
> >
> > >
> >
> > > # ./test A B C
> >
> > > $0 : ./test
> >
> > > --
> >
> > > root 3017 2806 99 16:53 pts/0 00:00:01 xxxxxx A B C
> >
> > > --
> >
> > > $0 : xxxxxxxxxxx 1 2 3 4
> >
> > >
> >
> > >
> >
> > >
> >
> > > # uname -a
> >
> > > Linux test01 2.6.26-2-686 #1 SMP Sun Jun 21 04:57:38 UTC 2009 i686
> >
> > > GNU/Linux
> >
> > >
> >
> > >
> >
> > >
> >
> > > # perl -v
> >
> > >
> >
> > > This is perl, v5.10.0 built for i486-linux-gnu-thread-multi
> >
> > >
> >
> > > Copyright 1987-2007, Larry Wall
> >
> > >
> >
> > > Perl may be copied only under the terms of either the Artistic
> License
> >
> > > or the
> >
> > > GNU General Public License, which may be found in the Perl 5 source
> kit.
> >
> > >
> >
> > > Complete documentation for Perl, including FAQ lists, should be
> found
> >
> > > on
> >
> > > this system using "man perl" or "perldoc perl". If you have access
> to
> >
> > > the
> >
> > > Internet, point your browser at http://www.perl.org/, the Perl Home
> >
> > > Page.
> >
> > >
> >
> > >
> >
> > >
> >
> > > I'm currently using Debian GNU/Linux, lenny version. Crypto (1.23)
> >
> > > modules have been compiled and installed properly with no error.
> >
> > >
> >
> > >
> >
> > >
> >
> > > As you can see, it seems not possible to change executable name
> when
> >
> > > file is encrypted and only 6 characters have changed.
> >
> > >
> >
> > > It seems to be an error, because encryption should warranty same
> output.
> >
> > >
> >
> > >
> >
> > >
> >
> > > Any ideas?
> >
> > >
> >
> > >
> >
> > >
> >
> > > Thanks for you help.
> >
> > >
> >
> > >
> >
> > >
> >
> > >
> >
> > >
> >
> > >
> >
> > >
> >
> > >
> >
> > >
> >
> > >
> >
> > > _________________________________________________________________
> >
> > > Internet Explorer 8 más sencillo y seguro ¡Descárgatelo gratis!
> > > >
> > _________________________________________________________________ > ¿Quieres los nuevos emoticonos en 3D? ¡Descárgatelos gratis! > http://www.vivelive.com/emoticonos3d/index2.html
Raised as bug #48770 in the PAR queue as suggested, so closing this ticket.