What would be the best way to Compile a WAX File so that it had a Password to execute or would have an Expire Date where as the Compiled Script would no longer work. Date Timestamp ?? Password Window ??? Any Ideas ?? Job Security Issue here.
I have put a little thought into this as well Using "timeval" could do this job, just have the script compare this regester with your expire value and have it not execute if its greater. I think they might be able to get around this by playing with the computer clock. So you could also build in a counter using an INI type file that could limit the amount of times the script could be executed. Create a little basic encryption(masking) for the string in the INI file so they can't screw with it and it will work like a charm. You could update the INI file to keep it running, maybe give them about a month of activations and then blam, no go
I Played around with it and did Like Chris Suggested. You could name the INI File something that resembles a Windows File Name. Since the User doesn't know that the WAX read the INI File, they wouldn't know to look in the C:\WINDOWS Directory. You can use the PROFILERD / PROFILEWR Commands in the WAX File to Communicate with the INI File. I'll look around my Library and see if I can find the example I wrote and then I'll Post it here.
Here is the Script I came up with. It uses an INI File to Hold the
Password. The STRCMP is Case Sensitive So that adds a Little more
Security. I used a Windows Type Filename (IE: WIN33.INI) to somewhat
hide it from Prying Eyes.
Here's The Script:
Proc Main
string IniFile = "WIN33.ini" ;* INI File Name in C:\Windows Directory
string IniValue ;* Value of the Current Trouble Type
string MyPassWord = "pw48"
string Passwd
Proc Passcorrect
usermsg "YOU MADE IT IN !!"
Endproc
Here's the INI File Created in the MS DOS EDITOR and saved in C:\WINDOWS Directory.
WIN33.INI
[SEARCH DATA]
DATASTRING=pw48
You could also do the same thing with the System Time and Date,
But people could reset the PC Clock to the Previous Day to keep
using the program. Another Idea would be to set the IniValue to
an Integer and use the Integer as a Counter for a Maximum Usage
Meter.
I would be very surprised if it didn't work in version 4.5. Other than bug fixes, ASPECT hasn't changed much from version 4.5 through 4.8.
aspect@aspectscripting.com
Create a little basic encryption(masking) for the string in the INI file so they can't screw with it and it will work like a charm HOW can I do this. I am in the same boat. I do not want a password but a expiration date. Thanks
What you would first need to do is determine when you want the expire date and time to be. Once you've done that, you can use the intsltime command to convert the date and time to a long time value. Your script would write this value to your INI file when it is first run, or your install process could copy the file already configured, etc. Next, you would use the profilerd command to read the expire date/time from your INI file each time your script is run, then compare that value to the current $LTIME value. If $LTIME is greater than the expire date/time (meaning it is being executed after the expire date/time), you would use the pwexit command to shutdown Procomm. Here's an example showing how to read the value from the INI file (modify the string values to suit your need):
proc main
string sFileSpec = "TEST.INI"
string sTopic = "Testing"
string sItem = "ExpireDate"
string sDate
long lDate
The atol command is necessary to convert the string value read from your INI file to a long value that can be compared to $LTIME. aspect@aspectscripting.com
ASPECT has an encrypt and decrypt command that you can use to do that. I don't believe the encryption scheme is very tough, but it should thwart the average person at least.
aspect@aspectscripting.com
Generally you will need a different program to create an install, such as InstallShield. Yu could write an ASPECT script that copies files from a pre-determined location (say a certain directory that you would have created on the machine), create the INI file with the correct expire date, and so forth. The good thing about using InstallShield or another such installer is that you aren't dependent on Procomm being installed when your script is installed or having to find where Procomm is installed at.
aspect@aspectscripting.com
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.