E X E - Q - T E R D O C U M E N T A T I O N Welcome to Exe-Q-Ter, Exe-Krypter, & Exe-Q-Ter Install. The purpose of Exe-Q-Ter and the accompanying files is to allow all users and developers of FoxBase+, FoxPro 1.02, and FoxPro 2.0 the alternative of creating DOS executable files for their respective FoxBase/FoxPro versions, with the added capability of password and/or password/encryption protection for their applications, databases, and memo fields. It is not the intention of Exe-Q-Ter to imply, either directly or indirectly, that non-registered users of FoxBase/FoxPro Runtime or FoxPro 2.0 Distribution Kit, should dismiss the laws of copyright and trademark regulations concerning the distribution of FoxBase/FoxPro applications. On the contrary, you should know that it is UNLAWFUL to distribute FoxBase/FoxPro applications unless you are in fact a registered owner of either the Runtime or Distribution Kit. You may contact Fox Software, Inc. or a legitimate distributor of Fox products to obtain either of the above. Any known infringement of the above will be reported to Fox Software at once. EXE-Q-TER, EXE-KRYPTER, & EXE-Q-TER INSTALL are registered copyrights of E. Scott Jones, (c) 1991, All Rights Reserved. This unlicensed version of Exe-Q-Ter may be distributed in its original format, meaning that ALL files listed in this documentation and in the on-line install documentation are distributed with it. Other than this provision, Exe-Q-Ter, Exe-Krypter, & Exe-Q-Ter Install may not be distributed, reproduced, or in any other manner made available to a third party. Exe-Q-Ter, Exe-Krypter, & Exe-Q-Ter Install are not Fox products, nor are they in any way related to Fox Software, Inc. FoxBase+, FoxPro, and any other word containing the letters "F O X" are to be considered as registered trademarks of Fox Holdings, Inc., and/or Fox Software, Inc. REGISTRATION This unlicensed version comes with a 90 day trial. After that period of time, you must register in order to receive a legitimate copy of Exe-Q-Ter if you plan to continue to use the product. Upon registration, you will receive a full registered copy of Exe-Q-Ter which is not encumbered by the registration screens and security measures. An additional benefit will be a large discount on upgrades to future versions, along with slightly smaller DOS executables owing to the deleted registration and security routines. Exe-Q-Ter can be purchased for $49.50 plus $3.00 shipping and handling - U.S., $49.50 plus $10.00 shipping and handling - international. To order, you may use the form included in the file "register.txt", or you may send a check or money order to E. Scott Jones, 422 Pebblestone Court, Marietta, GA 30067. I cannot accept cash. Additionally, there is a NO REFUND, NO WARRANTY POLICY regarding the Exe-Q-Ter. Therefore, test this program thoroughly before you buy. Put it through its paces, bang it around, make sure it's what you want. After I have received your funds, delivery will be within 10 to 30 days. You may send the additional charges if you would like Exe-Q-Ter delivered by Federal Express or Express Mail. Please be sure to include a note to that effect. LICENSE EXE-Q-TER is licensed for ONE user on ONE machine at a time ONLY. Volume discounts are available. To inquired about this, I may be reached at the above address or on CIS 75500,2370. INSTALLATION To load Exe-Q-Ter Install, simply type "TEINST". First, of course, copy all of the files to your FoxPro directory, or another sub-directory created by you. Exe-Q-Ter Install will install the necessary files on the same drive and in the same directory as it resides. It is MANDATORY for this UNLICENSED COPY of EXE-Q-TER to have ALL of the following files in the same directory as "TEINST.EXE", otherwise the installation will abort. 1) REGISTER.TXT 2) TEREAD.TXT ( this file ) 3) A2079340.SET 4) X2089340.SET 5) X2099340.SET 6) X2109340.SET 7) P2084770.SET 8) P2094770.SET 9) P2104770.SET 10) ECR88200.SET 11) ECR88300.SET 12) ECR88400.SET 13) TE_INST.VOJ ( an encrypted on-line readme file, which can only be read from within Exe-Q-Ter Install. For fun, load the file into your favorite text editor and have a look.) Please read the on-line documentation in Exe-Q-Ter Install. After doing so, simply press the F10 key and Exe-Q-Ter Install will install and rename the above files. More about filenames in subsequent sections. It is recommended that you place all of the install files either in your root FoxPro directory, or a sub-directory created by you. Please understand, it will be necessary for you to have the EXE's created by Exe-Q-Ter in your root FoxPro directory. If you choose to put TE.EXE in a directory other than your root FoxPro directory, you will need to make sure that your APP, FXP, DBF, FPT, and FOX files are in the SAME directory as Exe-Q-Ter. Once you plan to run an EXE file created by Exe-Q-Ter, it MUST be in your root FoxPro directory. This subject will be covered in greater detail in subsequent headings. GETTING STARTED After you have installed Exe-Q-Ter, you are ready to begin creating EXE files with password only, password/full encryption, or no password/no encryption options. To load Exe-Q-Ter, simply type "TE". You will see the dreaded registration screen, which will also appear when you run your EXE programs created by Exe-Q-Ter. Needless to say, these will not be present in the registered version of Exe-Q-Ter. After pressing the F10 key to accept the terms and conditions of the registration screen, you will be presented with the main screen of Exe-Q-Ter, which I will refer to as the category screen from now on. Once inside of Exe-Q-Ter, you may press the F10 key at any time to return directly to the category screen. The category screen presents you with three options: 1) FoxBase 2) FoxPro 1.02 3) FoxPro 2.0. If you are using more than one version of FoxPro, it will be helpful for me to describe the necessary files for each version. FoxPro 2.0 - TE.EXE, TE2SET.ESJ, TE2PAS.ESJ, TE2ENC.ESJ FoxPro 1.x - TE.EXE, TE1SET.ESJ, TE1PAS.ESJ, TE1ENC.ESJ FoxBase + - TE.EXE, TEBSET.ESJ, TEBPAS.ESJ, TEBENC.ESJ Now you can select from the category screen which version of FoxPro you will be creating your EXE programs for. By the way, you may press the ESC key at any time to exit Exe-Q-Ter. After having chosen the version you will be using, you will be presented with the creation options for your EXE file. The first line delineates which FoxPro module you are running under. For example, FOXPRO.EXE, FOXPROLX.EXE, FOXPRORT.EXE, DK (S) for standard ( if you are in 2.0 and a registered owner of the DK )., etc. Simply enter the appropriate number and you will be moved to the next option, which asks you to supply the program name for which you will be creating your EXE file. It is IMPERATIVE that you enter the program name WITHOUT the extension, otherwise Exe-Q-Ter probably won't work. Exe-Q-Ter searches your directory for the highest file order. For instance, if you are in FoxPro 1.x, Exe-Q-Ter will only look for an FXP file with the same name as the program name you've entered. If it doesn't find it, Exe-Q-Ter will inform you a little later that it can't continue the process. If you are in FoxBase, Exe-Q-Ter will only look for FOX files. In 2.0, Exe-Q-Ter will first look for the APP file and if it doesn't find it, then it will look next for the FXP file. Exe-Q-Ter will NOT deal with PRG files. After typing in your program name, you will press and be moved to the next line. Now you are asked if you want to suppress the opening FoxPro screen. The default is N. Therefore, if you desire screen suppression, you must enter a y or Y. Note: this option is useless with FoxBase. Now you are down to the last option in this section, which asks you if you would like to invoke Exe-Krypter. Again, the default is N. If you choose Y, you will be presented with the Exe-Krypter option screen which asks you whether you want password only or password/full encryption. We'll address this subject in the heading under ENCRYPTION. For now, let's assume you've chosen N. If you've chosen not to invoke Exe-Krypter, you will immediately be presented with Exe-Q-Ter's confirmation screen. This screen merely displays the options you've chosen and asks you if everything is correct. The default is Y. You may press Y or . If you choose N ( by pressing the n or N on your keyboard ), you will be driven back to the option screen. Again, you may press the F10 key to return to the category screen, or ESC to leave Exe-Q-Ter. If you've chosen Y, you will be presented with the final screen before Exe-Q-Ter creates your EXE file. This final screen is your bail-out option. It tells you that Exe-Q-Ter is about to create . The default is Y if an EXE file by the same name doesn't already exist, otherwise the screen warns you that an EXE program by the same name already DOES exist and asks you if you wish to over-write it. The default for this screen is N. If you've chosen to proceed, Exe-Q-Ter will begin operations. A screen will be displayed showing you what Exe-Q-Ter is doing. When completed, Exe-Q-Ter will tell you it has finished its task. Any key other than the ESC key will return you to the category screen. RUNNING YOUR EXE-Q-TER EXE PROGRAMS The EXE files created by Exe-Q-Ter are NOT STANDALONE EXE's. In order for your EXE file to operate, it MUST be in the FoxPro root directory along with the APP, FXP, or FOX program file. The reasons for this are varied, some having to do with the encryption process, and some having to do with the fact that it is not my intention to run afoul of the law by creating EXE's using FoxPro code, which would be absolutely necessary in order to create STANDALONE EXE's, or EXE's not requiring the presence of the program file created in FoxPro/FoxBase. If you need to have your FoxPro files in other sub-directories, you must make sure that the code in your main APP, FXP, or FOX files addresses this issue. So what are the advantages of Exe-Q-Ter? Well, we haven't even discussed the password and encryption options yet, and I believe you will see a TREMENDOUS advantage to Exe-Q-Ter when this issue is discussed further down. In the meantime, I believe the advantages will be obvious when we're talking about FoxBase/FoxPro 1.x. As far as FoxPro 2.0 is concerned, I believe you will find Exe-Q-Ter to be extremely reliable when running FoxPro 2.0 programs. If you don't own the Distribution Kit, then again, the advantages are obvious, but let me reiterate - it is UNLAWFUL to distribute FoxPro applications unless you are a registered owner of either the RunTime or Distribution Kit. However, you may certainly use the EXE files created by Exe-Q-Ter for your personal and/or company use, whichever applies. Developers, please read the following sections carefully, especially if you are planning to distribute encrypted applications. NOTE TO DEVELOPERS For those of you who are registered users of the Distribution Kit, a short comment. Should you decide to distribute EXE's created by Exe-Q-Ter, you do not need to include Foxr.exe as far as operational integrity is concerned. However, you should check with Fox in order to ascertain whether or not they have a problem with this. For those developers who are distributing ENCRYPTED applications, it is IMPERATIVE that you thoroughly read the following section on ENCRYPTION AND PASSWORDS. ENCRYPTION Password Only IT IS STRONGLY RECOMMENDED THAT YOU MAKE BACK-UP COPIES OF YOUR FILES BEFORE PROCEEDING WITH EITHER THE PASSWORD OR FULL ENCRYPTION OPTIONS! If you've chosen to invoke Exe-Krypter, you will be presented with the Exe-Krypter option screen. There are two choices: Password Only or Full Encryption. The default is P for Password Only. You may type the letter or press if Password Only is your desired choice. After you've entered your choice, you will be presented with the confirmation screen discussed earlier. To review, this screen merely displays the options you've chosen and asks you if they are correct. After choosing Y or pressing you get the bail-out screen, and finally, the creation of your EXE. If you've chosen the Password Only option and proceeded with the creation of your EXE, you may now exit Exe-Q-Ter and go for a test drive, but please know this: ONE OF YOUR FILES HAS BEEN ENCRYPTED. If you are using 2.0, then either your APP or FXP program file has been encrypted, depending on whether or not an APP file exists. If you are in FoxPro 1.x, then your FXP file has been encrypted. In FoxBase, of course, your FOX file has been encrypted. The very first time you type the program name of your EXE created by Exe-Q-Ter, you will be prompted to enter a password. You may enter up to 38 characters, either alphabetical or alphanumeric. After you've entered your password, it will be displayed and you will be asked if it is correct. If so, you MUST type a y or Y, otherwise Exe-Krypter will retry. If you've typed y or Y, Exe-Krypter will ask you to re-enter the password. This time, the screen will echo "*" while you type. If the password is entered correctly, the program will exit and tell you that your password has been Exe-Krypted and stored. To run the program from now on, the correct password MUST be entered. Passwords are CASE SENSITIVE. If you enter a password in upper case the first time, you must enter it in upper case in order to run the program. Additionally, you may mix upper and lower case and include spaces of varying length. In effect, you have a virtually unlimited combination of password options. For those of you who will be distributing EXE's created by Exe-Q-Ter with the password option, it would be a good idea to hang around until your client has entered the correct password and can get back into his program. If the client screws up the password thing, or if ( in rare circumstances ) the password doesn't "take", you'll still be around to copy the virgin EXE onto his system again and let him retry. NO TWO PASSWORDS ARE ENCRYPTED IN THE SAME MANNER! Because of this, every now and then the password might not "take" on the first try. You need have no fear of the password being invalid once you've made it work on the second run. Again, this has happened only VERY rarely, and it's due to the complex nature of the encryption process. Therefore, if you've gone thru the password routine, it is important that you test your program immediately. If it works ( and it will 99.99% of the time ) then you're home free. If it doesn't work, then you simply go back into the Exe-Q-Ter and repeat the creation process. However, be aware of this *** IMPORTANT *** note. Since your program was encrypted by Exe-Q-Ter the first time, you must do one of two things: either copy your back-up APP, FXP, or FOX file back into the same directory as Exe-Q-Ter, or create the EXE TWO TIMES in a row WITH the Password option specified. Exe-Q-Ter doesn't know if a file is already encrypted or not; it only knows that it is going to assault whatever is in it's charter. More about this in the Full Encryption section. It should work when you try again. Of course, make sure you are entering the CORRECT password before you do this. The reason passwords don't "take" most of the time is due to the nature of the encryption process. This generally happens when you create two EXE's in a row without leaving Exe-Q-Ter. The underlying cause of this is the fact that Exe-Krypter does NOT use the same variables or keys on any two programs. Therefore, if you experience problems, the easiest solution is to exit Exe-Q-ter after creating an EXE with the password or full encryption option specified and simply reload to create your next password-protected or fully encrypted file. The METHOD with which your password and file is encrypted and stored is a method which uses many variables and many keys, and a method which I'm obviously not going to go into detail about. Suffice it to say, however, that your password is entirely secure from just about anybody. If some super-sleuth were able to crack the code and discover your password, he wouldn't be able to use the same keys and variables on the next program because they would be entirely different. If you want to make sure that nobody can run your programs without a password, then Exe-Krypter will do the job for you. Since the Password Only option encrypts only your main program file - either an APP, FXP, or FOX file - you may wonder how to protect other programs which are called by your main program. Here is a simple method which you may find helpful. In your main program, you might want to initialize a PARAMETER. For instance, you might type the following: Sunshine = .T. DO program WITH Sunshine Then in your called program: PARAMETER Sunshine IF Sunshine = .F. QUIT ENDIF This will guarantee that none of your programs will work without them being run from the EXE created by Exe-Q-Ter. To prove the efficacy of this, load FoxPro and DO
. You will find that it won't work! Only by first having the program decrypted can FoxPro read your APP, FXP, or FOX file. And the only way your program can be decrypted is to let the Exe-Krypter in your EXE file work its magic. If you've added the above PARAMETER routine to any called programs, you can try to DO from within FoxPro, and you will discover that it won't work either. And now it's time to explore encryption more thoroughly. Full Encryption If you have read the preceding material on Passwords, you should have a general idea of what is entailed in the encryption process, however, the following will explain how to make sure WHICH files are encrypted and WHICH files are NOT encrypted. Exe-Krypter will automatically encrypt the following types of files - DBF, FPT, APP, FXP, FOX. This is determined by two parameters. The first parameter is the directory. In other words, Exe-Krypter will only search for files in the current working directory, or put another way, the directory in which Exe-Q-Ter itself resides, or - if you are using the EXE with full encryption - the directory in which the EXE file resides. However, it ABSOLUTELY NECESSARY to make sure that the files you wish to encrypt initially are in the same directory as TE.EXE aka The Exe-Q-ter. The second parameter Exe-Krypter uses to determine which files to encrypt are the file-types themselves, along with the specified program name. Here's an example: you've type in PROGNAME for your FoxPro filename and you've chosen Full Encryption. When Exe-Q-Ter has finished creating an EXE by the title PROGNAME, it will then turn over control to Exe-Krypter. Exe-Krypter will search the current working directory for a DBF, FPT, APP, FXP, FOX named PROGNAME. Any of these types of files that are in the current working directory and have the title PROGNAME will be assaulted by Exe-Krypter. As mentioned previously, Exe-Krypter doesn't know whether or not a file has already been encrypted; it merely carries out its charter regardless of the current status of the files. READ-ONLY IS NO PROTECTION!!! If your files are read-only, Exe-Krypter will not be prevented in the least from gaining access, so PLEASE do not depend on a read-only attribute to protect your file from Exe-Krypter. It won't. I suggest that if you are planning to do much file encryption that you create a separate directory for your Exe-Q-Ter files and then copy the necessary FoxPro files into that directory before you begin the encryption process. This will insure that only those files you wish to encrypt will in fact be encrypted. Another example: You have the following files: PROG.FXP, PROG.DBF, PROG.FPT. You wish to encrypt the FXP and the DBF files, but not the memo file. In this case you would simply make sure that you don't have the FPT file in the same directory before invoking Exe-Krypter, or you may rename the file temporarily until Exe-Krypter has completed its task. The other side of this coin is this; you may want to actually encrypt a file but you discover that for some reason Exe-Krypter didn't encrypt it. The answer is that the file you wished to encrypt doesn't have the same title as the program name you entered when creating the EXE. For instance, your main program might have been called ADMENU.FXP, and the subordinate files might have been named ADDRESS.DBF, ADDRESS.FPT, etc. Again, EXE-KRYPTER WILL ONLY ENCRYPT FILES WITH THE SAME TITLE AS THE PROGRAM NAME YOU SUPPLIED TO EXE-Q-TER! I suppose in a future version I will allow a pick-list or point-and-shoot method or some such concoction to give people more control over the encryption selection, but for now the five file-types will have to suffice. Now, we'll discuss the process of DECRYPTION in a bit of detail.. In order to decrypt a file or files, you simply go back to Exe-Q-Ter and create an EXE file with the same option you chose the first time. For instance, if you chose the Password Only option, then only the APP, FXP, or FOX file was encrypted. Therefore, you would go back to The Exe-Q-Ter and create another EXE with the same name, choosing the Password Only option once again. If you've chosen the Password Only option the first time, and then decide to DECRYPT the file, YOU DEFINITELY DO NOT want to decrypt with the Full Encryption option. This will decrypt your original program file alright, but it will also ENCRYPT your DBF and FPT files if they happen to have the same title as your program. If you do this, you will end up with an UNENCRYPTED program file and two ENCRYPTED database files. If this ends up being the case and you don't have these files backed up, you've got a BIG problem. Well, not really. You could wrangle yourself out of it by manipulating the files and Exe-Q-Ter's access to them, but it's certainly much simpler to just make sure you have back-ups. In fact, the fastest way to decrypt your files is to copy your back-ups over them. MAKE BACK-UPS BEFORE YOU ENCRYPT!!! You'll save yourself a lot of headaches later on. Actually, the only reason we've discussed decryption is give you a more thorough understanding of how Exe-Krypter works. The BEST way to decrypt files is, as mentioned previously, to copy your back-up files over the encrypted files. TRY IT OUT! Go ahead and encrypt a file and then run it to make sure everything works properly. Then, exit the program and load FoxPro/FoxBase by itself. Then try to USE a DBF or DO program. Let's recap: 1) Your EXE files MUST BE in the root FoxPro directory. 2) You MUST include an APP, FXP, or FOX file in the root FoxPro Directory. 3) Password Only encrypts the APP, FXP, or FOX file ONLY. 4) Full Encryption encrypts your APP, FXP, or FOX file in addition to the DBF and FPT files as long as they have the SAME name and are in the SAME directory as your Exe-Q-Ter EXE file, which MUST BE in the root FoxPro directory. 5) The best way to decrypt files is to copy your back-ups over the encrypted files. 6) You may use EXE files created by Exe-Q-Ter within the purview of your licensing status with Fox Software/Fox Holdings, Inc. It is unlawful to distribute FoxPro applications unless you are a registered user of the RunTime Version of FoxPro or the Distribution Kit. FINAL COMMENTS I have tested the program as thoroughly as I possibly can, however, that doesn't mean that it is guaranteed to be free of bugs. If you find a bug, or what you consider to be a bug, please let me know and I will address it promptly. Exe-Q-Ter, Exe-Q-Ter Install, and Exe-Krypter were written entirley in Borland C++ 2.0. There are no inline assembly calls. These programs were created on a Zeos 386/33 with 4 meg of ems/xms total memory, however, all programs were additionally tested on a 286/12 with 640K, no ems/xms and no disk cache. And although everything worked like a champ, I must tell you that doing the tests on the 286 was VERY, VERY boring. I have implemented almost NO provisions for a monochrome monitor, although the 286 was a monochrome and all in all, it looked okay. Well . . . it looked like it could get by. If the program is successfull, I will make sure that the registered version addresses the monochrome issue nicely. SUGGESTIONS AND COMMENTS are more than welcome! I can be reached at the address listed under the REGISTRATION heading or on CIS 75500,2370. E. Scott Jones September, 1991