LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-29-2017, 09:19 AM   #16
wpeckham
Senior Member
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, Fedora, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, Vsido, tinycore, Q4OS
Posts: 3,691

Rep: Reputation: 1662Reputation: 1662Reputation: 1662Reputation: 1662Reputation: 1662Reputation: 1662Reputation: 1662Reputation: 1662Reputation: 1662Reputation: 1662Reputation: 1662

The only ways to convert a perl source to a binary executable have (to my knowledge) been depreciated because they no longer work in any useful way.
The supported and approved technique is to read the perl, write a program in Assembler, C, C++, Pascal, FORTRAN, COBOL, or something for which a binary output compiler exists. Then compile, test, and release.

Perl was never intended to obfuscate code or result in binary programs. Use something that is intended for the purpose.

Or, the non-technical solution, start doing business with people you can trust. Then trust them.
 
2 members found this post helpful.
Old 05-01-2017, 12:46 AM   #17
rpittala
Member
 
Registered: Jan 2012
Location: PUNE
Distribution: SunOS sun4v sparc sun4v Solaris
Posts: 91

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Great !

It worked for me. I tried it on Ubuntu 14.04 and Ubuntu 16.04, but it generates 32 bit executable which would not work on a 64 bit Windows.

What worked for me ?

I took a Strawberry Perl (not Active perl) on my windows machine which is already shipped with dmake utilities for gcc compilers to generate the executable.

Use cpan to install the pp utility to work

Quote:
cpan:/> install PAR::Packer
Take your Perl script on to the Windows machine and make changes to run the script on Windows, once the Perl script is ready run the following commands:

Quote:
pp -B -p script.pl
The above bundles all the dependent modules to a par file generated as "a.par" in the same location where you run this script.

Now, run the below command to generate the executable:

Quote:
parl -B -O./foo.exe a.par

Last edited by rpittala; 05-01-2017 at 10:12 AM.
 
Old 08-30-2017, 04:20 PM   #18
jwouter
LQ Newbie
 
Registered: Jun 2013
Posts: 13

Rep: Reputation: Disabled
This might be what you are looking for ....


[Link removed by moderator]

Last edited by astrogeek; 08-30-2017 at 04:59 PM. Reason: Removed advertising link
 
Old 08-30-2017, 04:59 PM   #19
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=14, FreeBSD_12{.0|.1}
Posts: 5,584
Blog Entries: 11

Rep: Reputation: 3606Reputation: 3606Reputation: 3606Reputation: 3606Reputation: 3606Reputation: 3606Reputation: 3606Reputation: 3606Reputation: 3606Reputation: 3606Reputation: 3606
Quote:
Originally Posted by jwouter View Post
This might be what you are looking for ....


[Link removed by moderator]
Even though related to the thread topic, the link provided is for a commercial-only product with a license which restricts use of the executables it produces from user written perl code. The link has been removed as inappropriate for this forum and in conflict with the forum rules which prohibit advertising.
 
Old 08-31-2017, 02:17 AM   #20
jwouter
LQ Newbie
 
Registered: Jun 2013
Posts: 13

Rep: Reputation: Disabled
There is a shareware version of this software...........

Shareware Version

You are hereby licensed to use the shareware evaluation version of Perl2Exe for evaluation purposes without charge for a period of 30 days. This is not free software. If you use this software after the 30 day evaluation period a registration fee is required. Under no circumstances are you licensed to distribute Exe files created by the shareware evaluation version of Perl2Exe. Unregistered use of Perl2Exe after the 30 day evaluation period is in violation of copyright laws.

Distribution of Perl2Exe

You are hereby licensed to make as many copies of the shareware evaluation version of this software and documentation as you wish; give exact copies of the original shareware version to anyone; and distribute the shareware version of the software and documentation in its unmodified form via electronic means. There is no charge for any of the above.
 
Old 08-31-2017, 08:15 AM   #21
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 9,078
Blog Entries: 4

Rep: Reputation: 3187Reputation: 3187Reputation: 3187Reputation: 3187Reputation: 3187Reputation: 3187Reputation: 3187Reputation: 3187Reputation: 3187Reputation: 3187Reputation: 3187
That, of course, is not what "shareware" is.

This commercial product is well-known but not frequently used, because it is frankly easier to install Strawberry Perl (or some other Win32 distribution), which will register the .pl extension to itself so that you can double-click on files to run them. The only thing that "perl-to-exe" products really do is to slightly-package this: the source code is there as a resource in the file-bundle, because Perl is fundamentally a one-step interpreter which accepts source code as input. (So, why bother?)

A language like Perl is also heavily dependent upon library modules, from CPAN, which must be installed and available. Most of "what Perl is, to you," actually comes from these modules. If you ask a product to "package these into an EXE," you will be rewarded with a humongous EXE! (Which is impossible to maintain.) So, again, "why bother?"

Last edited by sundialsvcs; 08-31-2017 at 08:16 AM.
 
Old 08-31-2017, 08:41 AM   #22
jwouter
LQ Newbie
 
Registered: Jun 2013
Posts: 13

Rep: Reputation: Disabled
Well if you where into cyber security / ethical hacking / pen testing you would want to be able to deploy exploits on your targets machine without having to install the perl software ... (same goes for example python).

A lot of exploits are written in perl..... so the ability to make a win32 exe out of such a perl script is very useful.

Regards,
J wouter
 
Old 08-31-2017, 01:23 PM   #23
wpeckham
Senior Member
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, Fedora, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, Vsido, tinycore, Q4OS
Posts: 3,691

Rep: Reputation: 1662Reputation: 1662Reputation: 1662Reputation: 1662Reputation: 1662Reputation: 1662Reputation: 1662Reputation: 1662Reputation: 1662Reputation: 1662Reputation: 1662
Quote:
Originally Posted by jwouter View Post
Well if you where into cyber security / ethical hacking / pen testing you would want to be able to deploy exploits on your targets machine without having to install the perl software ... (same goes for example python).

A lot of exploits are written in perl..... so the ability to make a win32 exe out of such a perl script is very useful.

Regards,
J wouter
A very good reason to rewrite them them in C, C++, Pascal,or any other language that can do that job AND has true compilers available.
 
Old 08-31-2017, 02:27 PM   #24
jwouter
LQ Newbie
 
Registered: Jun 2013
Posts: 13

Rep: Reputation: Disabled
ok if you say so ����������
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Shell script, Perl script, command or utility to convert Binary to text Perseus Programming 26 07-12-2012 06:00 AM
How Can I convert Hex to Binary in a perl script telecom_is_me Programming 18 10-11-2010 04:34 PM
Perl script dieing while waiting on select() for some response from another exe rajeshkdugar Programming 1 04-22-2010 02:56 AM
how to use perl.exe in shell script littletransformer Programming 7 12-03-2007 03:14 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration