- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- how to make perl script to be binary program in HP...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-25-2004 01:04 PM
тАО02-25-2004 01:04 PM
how to make perl script to be binary program in HP-UX?
I just wonder there is any way to compile perl script to be binary for the security of the code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-25-2004 01:19 PM
тАО02-25-2004 01:19 PM
Re: how to make perl script to be binary program in HP-UX?
perlcc -o myfile myfile.pl
Man perlcc and read it fully.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-26-2004 01:59 PM
тАО02-26-2004 01:59 PM
Re: how to make perl script to be binary program in HP-UX?
-P run script through C preprocessor before compilation
Is it OK?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-27-2004 10:43 AM
тАО02-27-2004 10:43 AM
Re: how to make perl script to be binary program in HP-UX?
#define SECONDS_PER_DAY 84600
Now everywhere you had SECONDS_PER_DAY in your Perl code, 86400 would be substitued "on the fly". Of course, it's much better to use this construct
use constant SECONDS_PER_DAY => 86400;
or better still and no performance penalty
use constant SECONDS_PER_DAY => (24 * 60 * 60);
This does nothing about turning your Perl source into an executable. That's the job of perlcc. It's shipped with Perl 5.6.1 for sure sure but it's considered to be experimental; I wouldn't use it.
You can also try this:
perl -MO=C myfile.pl > myfile.c
If that works, you then cc -o myfile myfile.c.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-27-2004 10:55 AM
тАО02-27-2004 10:55 AM
Re: how to make perl script to be binary program in HP-UX?
Look into the Filter Module which is available from www.perl.org/CPAN:
Here's how it would work:
Your Perl "executable" would contain a few line in plaintext (if you wish) like copyright notices or other comments and then
use Filter::decrypt;
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
b456ertyysll;lk'235
Everything after the use Filter::decrypt; is encrypted BUT the beauty of the decrypt module is that the source code is filtered BEFORE it is parsed by the Perl interpreter.
It's a pretty neat technique but it does require some work on your part. The decryption routine that is supplied is very trivial and it intended to only be a demo version but you can easily replace it with as robust a routine as you wish. You also have to write a script to do the encrytion but that's not very difficult either. If you really want to produce secure Perl code that actually executes perfectly this is the way to go. All of the Perl to binary compilers are very trouble prone.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-28-2004 10:30 AM
тАО02-28-2004 10:30 AM
Re: how to make perl script to be binary program in HP-UX?
Unbelievable... some folks still think that "Security through obfuscation" serves a useful purpose. Sad.
Hopefully I misinterpreted the post though.
Good luck! (sic!)
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-29-2004 01:20 PM
тАО02-29-2004 01:20 PM
Re: how to make perl script to be binary program in HP-UX?
Might be better to create C code.
Thanks a lot!!!
More new things we can discuss, pls reply it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-29-2004 06:57 PM
тАО02-29-2004 06:57 PM
Re: how to make perl script to be binary program in HP-UX?
That said, any program written in perl can be descrambled. There are some internal modules available to `disassemble' the target code to readable lines again. This is more easy in Perl than it is with C object files, but it is possible in any language. I know. I've even disassembles optimized pa-risc code to find things I needed to know.
Please assign points to the answers if you expect more replies.
Some hints if you want you C code to be more secret than avarage:
- strip your code
- use illogical names for subroutines (message () instead of exit (), forward () instead of init (), read_password () instead of unlink ())
- spread the letters of your strings accross the code, so 'strings' will not reveal them
- calculate yout constants instead of using constants
- search the forum, there have been more threads like this
Enjoy, Have FUN! H.Merijn