Re: covert perl code to binary

2019-01-11 Thread Mike Flannigan


Thanks.

My Strawberry install finally failed with
Stopping: 'install' failed for 'B::C'.

I am running ver 5.26 of Strawberry.



I suspect you mean this Readme file:

|INSTALL|
|cpan B::C|
|On strawberry I needed|
|||perl Makefile.PL FIXIN="perl -S pl2bat.bat"|
|On Windows and AIX for 5.12 and 5.14 you need to patch and rebuild CORE 
perl:|

|||ramblings/Export-store_cop_label-for-the-perl-compiler.patch|
|For 5.14 and 5.15 I recommend also the following patches:|
|||ramblings/revert-B-load-BEGIN.patch (The 5.14.1 version)|
|||ramblings/Carp-wo-B.patch|
|We generally discourage the use of perl since 5.16 unhandled and|
|unacknowledged security problems with the implementation of "unicode"|
|symbols and packagenames, where they really implemented binary names|
|for all symbols without any checks and further support of such binary|
|names. Identifiers are not identifiable anymore.|
|See the warning at perl Makefile.PL.|
|5.20 improved support for binary names for most syscalls, dumpers and|
|APIs, but TR39 and strict names are still not handled, the problems|
|are not understood and reactions are generally hostile.|
|5.18 made it 20% bigger with the implementation of COW strings.|
|Most strings cannot be stored statically anymore since then.|
|The best perl versions for the compiler are 5.14.4, 5.22.1 and cperl,|
|since these are the most tested versions, where the coretest suite 
passes. The above is only part of the Readme file. I'm not sure what to 
make of that. Especially that part that says: 'We generally discourage 
the use of perl since 5.16 unhandled and unacknowledged security 
problems' Mike |




On 1/11/2019 9:28 AM, Bruce Ferrell wrote:
I built it on a Linux box, it blew up so I read the README... that has 
instructions for how to do it on Windows


As noted by another poster, it seems to work in spite of the test 
blowing up


On 1/11/19 5:37 AM, Mike Flannigan wrote:


I could use some more explanation.

B::C is a module that you install from CPAN.
I assume I don't put Use B::C at the top of
my perl script, but instead perlcc uses it.

Is perlcc also a module?
Or is that an executable?
I think I see that it is composed of 5 files:
assemble
cc_harness
disassemble
perlcc.PL
pl2exe.pl

After installing perlcc, do I just open a command
prompt and type perlcc -o hello.exe hello.pl?

Does all this work on Windows?  My guess is Yes.


Mike


On 1/11/2019 6:57 AM, Andrew Solomon wrote:
Just a warning - I'm no expert on this topic, but it was such an 
interesting question I decided to find out for myself :-)


I installed B::C and ran 
https://metacpan.org/pod/distribution/B-C/script/perlcc.PL


It actually does the compilation - as opposed to pp which is just 
packaging it - so you don't see the perl code of the source file.


Does that resolve your question?

Andrew



On Fri, Jan 11, 2019 at 9:59 AM Uday Vernekar 
mailto:vernekaru...@gmail.com>> wrote:


Hi all,

I have a perl code which I need to covert to binary so that
nobody can see the code.

we used pp package to make the perl code binary but here the
user can see the code which gets created in tmp.

Need help if anybody knows kindly reply

With regards
Uday V G



--
Andrew Solomon

Perl Trainer, Geekuni http://geekuni.com/
and...@geekuni.com  // +44 7931 946 062








Re: covert perl code to binary

2019-01-11 Thread Mike Flannigan


Thanks.  On Windows I did 'cpan install B::C'
and it went on and on with many test fails.
After about 3 minutes it threw a 'Perl interpreter
has stopped working' error (details below) and when
I closed that box it continued with the test fails
for another 3+ minutes and then stopped (it was probably
still running - I did a Ctrl C on it).  One little
item I picked out is
ExtUtils::Install  generates non-zero binary'

So then I did 'cpan install -n B::C' and that also
ran about 5 minutes with test fails and threw a
'Perl interpreter has stopped working' error.  When
I closed that box it continued with the test fails
for another 5+ minutes (I took a shower in here) and
then slowed down on statements like


#   Failed test '6: use Pod::Perldoc -O3 gives expected 'ok' outpu
#   at t/modules.t line 227.
#   ''
# doesn't match '(?^ms:ok$)'

The install still running, but I think it is safe to say
it does not install real good on Strawberry Perl.



Mike



Problem Event Name:    APPCRASH
  Application Name:    perl.exe
  Application Version:    5.26.1.1
  Application Timestamp:    59c72b89
  Fault Module Name:    ntdll.dll
  Fault Module Version:    6.1.7601.24335
  Fault Module Timestamp:    5c268115
  Exception Code:    c005
  Exception Offset:    0002a407
  OS Version:    6.1.7601.2.1.0.256.48
  Locale ID:    1033
  Additional Information 1:    62e2
  Additional Information 2:    62e210e3d23b68abf45108a88f3afb70
  Additional Information 3:    2f51
  Additional Information 4:    2f51a0ca5e5e9ac099301d839e2f4ce3



On 1/11/2019 8:53 AM, Andrew Solomon wrote:

Sorry Mike, I was a bit too terse!

Here's what I did on a mac OS X 10.13.6 containing perl-5.26.1 
installed with perlbrew.


cpanm -n B::C

where -n means 'no test' because the first time I tried it the testing 
failed and I wasn't curious enough to work out what went wrong :-)


Then I had a file foo.pl  which was executable and 
contained:


#!/usr/bin/env perl
use 5.26.1;

say "Hello, world.";
say "Hello, world.";
say "Hello, world.";
say "Hello, world.";
say "Hello, world.";
say "Hello, world.";
say "Hello, world.";
say "Hello, world.";

I then ran

perlcc foo.pl 

and found a file  "foo".

I ran
./foo
and its output was the same as
./foo.pl 

Opening foo, I found the string 'Hello, world.' but only once amongst 
a lot of control characters and error messages.


I'm afraid I don't have a Windows box to experiment with.

Andrew

On Fri, Jan 11, 2019 at 1:37 PM Mike Flannigan > wrote:



I could use some more explanation.

B::C is a module that you install from CPAN.
I assume I don't put Use B::C at the top of
my perl script, but instead perlcc uses it.

Is perlcc also a module?
Or is that an executable?
I think I see that it is composed of 5 files:
assemble
cc_harness
disassemble
perlcc.PL
pl2exe.pl 

After installing perlcc, do I just open a command
prompt and type perlcc -o hello.exe hello.pl ?

Does all this work on Windows?  My guess is Yes.


Mike





Re: covert perl code to binary

2019-01-11 Thread Bruce Ferrell
I built it on a Linux box, it blew up so I read the README... that has 
instructions for how to do it on Windows


As noted by another poster, it seems to work in spite of the test blowing up

On 1/11/19 5:37 AM, Mike Flannigan wrote:


I could use some more explanation.

B::C is a module that you install from CPAN.
I assume I don't put Use B::C at the top of
my perl script, but instead perlcc uses it.

Is perlcc also a module?
Or is that an executable?
I think I see that it is composed of 5 files:
assemble
cc_harness
disassemble
perlcc.PL
pl2exe.pl

After installing perlcc, do I just open a command
prompt and type perlcc -o hello.exe hello.pl?

Does all this work on Windows?  My guess is Yes.


Mike


On 1/11/2019 6:57 AM, Andrew Solomon wrote:
Just a warning - I'm no expert on this topic, but it was such an 
interesting question I decided to find out for myself :-)


I installed B::C and ran 
https://metacpan.org/pod/distribution/B-C/script/perlcc.PL


It actually does the compilation - as opposed to pp which is just 
packaging it - so you don't see the perl code of the source file.


Does that resolve your question?

Andrew



On Fri, Jan 11, 2019 at 9:59 AM Uday Vernekar > wrote:


Hi all,

I have a perl code which I need to covert to binary so that
nobody can see the code.

we used pp package to make the perl code binary but here the user
can see the code which gets created in tmp.

Need help if anybody knows kindly reply

With regards
Uday V G



--
Andrew Solomon

Perl Trainer, Geekuni http://geekuni.com/
and...@geekuni.com  // +44 7931 946 062






Re: covert perl code to binary

2019-01-11 Thread Andrew Solomon
Sorry Mike, I was a bit too terse!

Here's what I did on a mac OS X 10.13.6 containing perl-5.26.1 installed
with perlbrew.

cpanm -n B::C

where -n means 'no test' because the first time I tried it the testing
failed and I wasn't curious enough to work out what went wrong :-)

Then I had a file foo.pl which was executable and contained:

#!/usr/bin/env perl
use 5.26.1;

say "Hello, world.";
say "Hello, world.";
say "Hello, world.";
say "Hello, world.";
say "Hello, world.";
say "Hello, world.";
say "Hello, world.";
say "Hello, world.";

I then ran

perlcc foo.pl

and found a file  "foo".

I ran
./foo
and its output was the same as
./foo.pl

Opening foo, I found the string 'Hello, world.' but only once amongst a lot
of control characters and error messages.

I'm afraid I don't have a Windows box to experiment with.

Andrew

On Fri, Jan 11, 2019 at 1:37 PM Mike Flannigan  wrote:

>
> I could use some more explanation.
>
> B::C is a module that you install from CPAN.
> I assume I don't put Use B::C at the top of
> my perl script, but instead perlcc uses it.
>
> Is perlcc also a module?
> Or is that an executable?
> I think I see that it is composed of 5 files:
> assemble
> cc_harness
> disassemble
> perlcc.PL
> pl2exe.pl
>
> After installing perlcc, do I just open a command
> prompt and type perlcc -o hello.exe hello.pl?
>
> Does all this work on Windows?  My guess is Yes.
>
>
> Mike
>
>
> On 1/11/2019 6:57 AM, Andrew Solomon wrote:
>
> Just a warning - I'm no expert on this topic, but it was such an
> interesting question I decided to find out for myself :-)
>
> I installed B::C and ran
> https://metacpan.org/pod/distribution/B-C/script/perlcc.PL
>
> It actually does the compilation - as opposed to pp which is just
> packaging it - so you don't see the perl code of the source file.
>
> Does that resolve your question?
>
> Andrew
>
>
>
> On Fri, Jan 11, 2019 at 9:59 AM Uday Vernekar 
> wrote:
>
>> Hi all,
>>
>> I have a perl code which I need to covert to binary so that nobody can
>> see the code.
>>
>> we used pp package to make the perl code binary but here the user can see
>> the code which gets created in tmp.
>>
>> Need help if anybody knows kindly reply
>>
>> With regards
>> Uday V G
>>
>
>
> --
> Andrew Solomon
>
> Perl Trainer, Geekuni http://geekuni.com/
> and...@geekuni.com // +44 7931 946 062
>
>
>

-- 
Andrew Solomon

Perl Trainer, Geekuni http://geekuni.com/
and...@geekuni.com // +44 7931 946 062


Re: covert perl code to binary

2019-01-11 Thread Mike Flannigan


I could use some more explanation.

B::C is a module that you install from CPAN.
I assume I don't put Use B::C at the top of
my perl script, but instead perlcc uses it.

Is perlcc also a module?
Or is that an executable?
I think I see that it is composed of 5 files:
assemble
cc_harness
disassemble
perlcc.PL
pl2exe.pl

After installing perlcc, do I just open a command
prompt and type perlcc -o hello.exe hello.pl?

Does all this work on Windows?  My guess is Yes.


Mike


On 1/11/2019 6:57 AM, Andrew Solomon wrote:
Just a warning - I'm no expert on this topic, but it was such an 
interesting question I decided to find out for myself :-)


I installed B::C and ran 
https://metacpan.org/pod/distribution/B-C/script/perlcc.PL


It actually does the compilation - as opposed to pp which is just 
packaging it - so you don't see the perl code of the source file.


Does that resolve your question?

Andrew



On Fri, Jan 11, 2019 at 9:59 AM Uday Vernekar > wrote:


Hi all,

I have a perl code which I need to covert to binary so that nobody
can see the code.

we used pp package to make the perl code binary but here the user
can see the code which gets created in tmp.

Need help if anybody knows kindly reply

With regards
Uday V G



--
Andrew Solomon

Perl Trainer, Geekuni http://geekuni.com/
and...@geekuni.com  // +44 7931 946 062




Re: covert perl code to binary

2019-01-11 Thread David Mertens
How dumb is your "nobody"? Would Acme::Bleach do the trick? Or something
similar?

:)

On Fri, Jan 11, 2019, 5:01 AM Uday Vernekar  Hi all,
>
> I have a perl code which I need to covert to binary so that nobody can see
> the code.
>
> we used pp package to make the perl code binary but here the user can see
> the code which gets created in tmp.
>
> Need help if anybody knows kindly reply
>
> With regards
> Uday V G
>


Re: covert perl code to binary

2019-01-11 Thread Andrew Solomon
Just a warning - I'm no expert on this topic, but it was such an
interesting question I decided to find out for myself :-)

I installed B::C and ran
https://metacpan.org/pod/distribution/B-C/script/perlcc.PL

It actually does the compilation - as opposed to pp which is just packaging
it - so you don't see the perl code of the source file.

Does that resolve your question?

Andrew



On Fri, Jan 11, 2019 at 9:59 AM Uday Vernekar 
wrote:

> Hi all,
>
> I have a perl code which I need to covert to binary so that nobody can see
> the code.
>
> we used pp package to make the perl code binary but here the user can see
> the code which gets created in tmp.
>
> Need help if anybody knows kindly reply
>
> With regards
> Uday V G
>


-- 
Andrew Solomon

Perl Trainer, Geekuni http://geekuni.com/
and...@geekuni.com // +44 7931 946 062


Re: covert perl code to binary

2019-01-11 Thread Shlomi Fish
Hi Uday,

On Fri, 11 Jan 2019 15:29:23 +0530
Uday Vernekar  wrote:

> Hi all,
> 
> I have a perl code which I need to covert to binary so that nobody can see
> the code.
> 
> we used pp package to make the perl code binary but here the user can see
> the code which gets created in tmp.
> 
> Need help if anybody knows kindly reply
> 

first of all, see
https://github.com/shlomif/Freenode-programming-channel-FAQ/blob/master/FAQ.mdwn#how-do-i-hideobscureencrypt-my-source-code-to-prevent-end-users-from-learning-how-it-works

(short url: https://is.gd/pLk1b2 .)

Otherwise perhaps https://metacpan.org/pod/B::C will work for you or you can
try paying a C programmer to translate the code for you (I can do that!).

> With regards
> Uday V G



-- 
-
Shlomi Fish   http://www.shlomifish.org/
Optimising Code for Speed - http://shlom.in/optimise

The Klingon warriors’ motto is “It’s a good day to die.” Chuck Norris’s motto
is “It’s a good day to kill.”
— http://www.shlomifish.org/humour/bits/facts/Chuck-Norris/

Please reply to list if it's a mailing list post - http://shlom.in/reply .

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




covert perl code to binary

2019-01-11 Thread Uday Vernekar
Hi all,

I have a perl code which I need to covert to binary so that nobody can see
the code.

we used pp package to make the perl code binary but here the user can see
the code which gets created in tmp.

Need help if anybody knows kindly reply

With regards
Uday V G