#!/usr/bin/perl # # WINDOWS PERL CLICK-N-RUN by Zsolt v1.0 # # This Perl script creates a JavaScript file which unpacks # TinyPerl 5.8 interpreter and your custom Perl script on # a target PC without any prompt or question. The user is supposed # to double-clicks on the JS file to execute it, and when that # happens, TinyPerl is automatically installed on the computer # in less than one second, and your perl script starts to run # in a Windows environment. # # Now, this program can also be used for nefarious purposes such # as destroying Windows or installing spyware, so right now I will # include a short disclaimer here: YOU REALIZE THAT THE PROGRAMS # GENERATED BY THIS PROGRAM CAN DAMAGE A COMPUTER. YOU USE THIS # SOFTWARE AT YOUR OWN RISK. PERIOD. # # All right, so in a nutshell, this program allows the execution of # a Perl script on a Windows PC where you do not know if Perl # is already installed or not. # # The advantage of TinyPerl 5.8 is that it's very small and will run # on all 32-bit and 64-bit versions of Windows. The disadvantage is that # no modules are installed by default, so you can't even include something # like "use warnings;" because that would fetch the warnings.pm file, which # might not exist on the target PC. If you want it to exist, then you have # to include it. And if a module depends on other modules, you'll # have to know which ones are needed and include them as well. # # Sharing JS files online is made difficult by Windows. # You can't just download and run a JS script, because most spyware # infections begin by unwittingly clicking on JS file. So, Windows # made sure that users can't do that easily. In order to run a JS file, # you must download the JS file as a TXT file. Then you have to # give it a JS extension, and then you can double-click on it to run. # Once you double-click on the JS file, from there, everything # happens automatically. The script extracts the Perl program and # installs the TinyPerl interpreter and executes your Perl script. # You will not see any windows pop up except what is generated # by the Perl program's execution. # ####################################################################### use strict; use warnings; ####################################################################### # # THE FOLLOWING FILES WILL BE ADDED TO THE PACKAGE. WHEN THE JS PROGRAM # RUNS, THE DESTINATION SUB-DIRECTORIES AND FILES WILL BE CREATED # AUTOMATICALLY _BEFORE_ THE PERL SCRIPT EXECUTION BEGINS. # # FLAGS AND THEIR MEANING: # A = Set Archive attribute for file # H = Set Hidden attribute for file # R = Set Read-only attribute for file # O = Overwrite file even if it already exists # # D = Just create a directory # # X = Execute this script in normal window. # M = Run this script in a minimized window. # W = Wait. Run this script and wait until it exits # before executing next script in line. # P = Pause. Run this script and keep its terminal window open. # The user will be asked to press Enter before script window closes. # # Even if you are unpacking just one PL file, you should turn on one of the # X/M/W/P flags which indicates that this file is to be executed. # # VERY IMPORTANT: ANY PERL SCRIPT WHICH IS GOING TO BE EXECUTED SHOULD # NOT CONTAIN ANY SPACES IN THE FILE NAME OR PATH!!! For example: # This is wrong: "C:\Program Files\my script\runthis.pl" # This is wrong: "C:\PERL58\my script.pl" # The right way: "C:\PERL58\my_script.pl" # # The input and output file names must not contain any special # characters or unicode characters! # # If you include several PL files, more than one of them can have # have the 'X' flag. The perl scripts will be executed AFTER all # files have been unpacked. They will be executed in the order # they appear in the list! # my @FILES = ( # FLAGS FILE SOURCE DESTINATION # ----- ---------------------- ------------------------ 'AOP', 'C:\\DESKTOP\\ROBINHOOD\\robinhood.pl', 'C:\\PERL58\\ROBINHOOD.PL' # Execute this script );