--take it all off...
Download:
By downloading and installing The Stripper v1.1, you agree to indemnify, defend, and
hold harmless Tintagel Consulting, LLC dba Script Solutions from any and all liability, penalties, losses,
damages, costs, expenses, attorneys' fees, causes of action or claims caused by or resulting indirectly
from your use of this script which damages either you, or any other party or parties without limitation
or exception. This indemnification and hold harmless agreement extends to all issues associated with this
script.
By downloading and installing The Stripper v1.1, you agree not to sell, modify or redistribute
the source code.
You also agree to keep our authorship and copyright statements intact.
The Stripper v1.1 (5k) Last Updated: 99/09/02
Demo:
Because of the nature of TheStripper, we cannot offer a full featured demo.
But, play with the interface (files won't
strip) and then see the results of
running the program.
Background:
How many times have you asked yourself if there was a way to protect your code? Perl, by its very nature
is open source. But The Stripper helps you here... Just because your programs are open source, you
don't have to make it easy for others to modify your code.
Objective:
The Stripper 1.1 will strip all newline characters and comment lines (lines beginning with a
pound sign #) after a line you define, giving you some protection for your program from inexperienced
and/or unambitious hackers.
In essence, you can have the source code of your 100k program ... all on one line. Would
you try to hack that one?
Requirements:
To run The Stripper v1.1, you'll need:
- Permission to run CGI scripts on your web server (How's that for obvious?)
- UNIX based server (Though this program may work on NT, Solaris, or
other server, it has not been tested.)
- Perl 5.004 or higher
Installation:
Installing The Stripper v1.1 is extremely easy. Please follow these simple steps:
- Download The Stripper v1.1
- Unzip the program using your favorite unzip program.
- The first line of the program has the path to perl as
#!/usr/bin/perl
a common location for perl. If that is not correct for your server, open stripper.cgi
in your favorite text editor and make sure that the path to perl is correct.
If you don't know your path to perl, telnet to your account and type
whereis perl
at the prompt. You will be returned the path to perl on your server. If you don't know your
path to perl and don't have telnet access, ask your system administrator for your path to
perl.
- If you change The Stripper's name from stripper.cgi to another name, open
stripper.cgi and change the $cgi name to the new name.
- After you've made the above changes, save the file and open your favorite FTP program.
- Upload stripper.cgi in ASCII format into the directory/directories where the files you
want to strip reside. Important: For security, The Stripper can only be used in
the same directory as the file you're stripping.
- Change permissions on stripper.cgi to 755. You can either change permissions using your FTP
program (if that's a feature of your FTP program) or by telnet. Please review your FTP program's
documentation to learn how to do this using your FTP program. If you wish to change permissions by
telnet, telnet to your account and navigate to the directory you uploaded The Stripper into.
Type
chmod 755 stripper.cgi
Please note that some web server require permission settings of 775 or higher to run CGI programs.
If you're unsure what your permissions should be, contact your server administrator.
- Point your web browser to your installation of stripper.cgi. Then follow the on screen
instructions.
Usage:
IMPORTANT: Before you use The Stripper on your programs, read
Required Programming Format below.
There are 4 form fields on the main page of The Stripper:
- What file to strip? -- Simply enter the name of the file. Remember, the file must
reside in the same directory that The Stripper is installed in. This is for your
safety.
- How many lines to remain intact on top? -- You can tell The Stripper to leave
the first x number of lines alone, and only to strip the lines afterward. This is so you can
have your license agreement, variables, etc., clean. Make sure you set at least 2 lines for the
top -- the path to perl.
- Strip tabs -- To further obfuscate your code, you can have hard tabs removed. Please note
this will not affect your \t tabs, only the tabs that you get by hitting your [Tab] key.
- Save backup of clean file -- STRONGLY RECOMMENDED! This option, when checked, saves a
clean, unadulterated copy of your original file. The file is named the same, but with a ".stripper"
appended to it.
Just fill out the form and hit "Strip File". The file will be stripped and you will be presented with
a screen asking you if you want to strip another one.
Required program format:
Because of the nature of The Stripper, the file to be stripped must be in a very specific format.
Comments
Comments must have the pound sign (#) as the FIRST character of any line. The Stripper only looks
for comments in this location so you can use pound signs elsewhere in your program
(such as for colors #FFFFFF).
So, if you have currently have comments like this example:
if ($blah eq $yah){ #comment
&do_stuff
}
-or-
if ($blah eq $yah){
#comment
&do_stuff
}
the program you are stripping WILL NOT WORK. It doesn't take much thought to know that:
if ($blah eq $yah){ #comment &do_stuff }
will cause your program to crash and burn. To avoid this problem, comments should be done like this:
if ($blah eq $yah){
#comment
&do_stuff
}
The Stripper will remove the #comment line and your program will run happily.
The result will be:
if ($blah eq $yah){ &do_stuff}
Tabs
If you use hard tabs instead of \t in your programs, do not check the "strip tabs" box. If you
wish to strip tabs in your program, you'll need to convert whatever tabs you -need- to use
\t
So if you use something like:
@splitline = split(' ',$line);
#(the ' ' has a hard tab in between)
you'll need to change it to:
@splitline = split(/\t/,$line);
or your program will not properly split the line after stripped.
To Strip or not to Strip?
We're not implying that The Stripper will fit the needs of every program.
Depending on the size of your program, and if your program doesn't conform to the guidelines above, you may
wish to forego stripping the program altogether, depending on the amount of time it'll take to make the
program conform.
If so, it may be an idea to keep these guidelines in mind when you develop your next program.
Support:
Because PerlDiver is a freeware program, we offer limited free support. Support Information and Options.