Ahmeds Posted December 5, 2012 Posted December 5, 2012 I attend a seminar a while a ago, and I just remember it lately that someone made a hardware lock for his LISP routines and it works like this. 1. Opens the Autocad 2. Load all necessary LISPs 3. Once you click the icon for the command it ask to enter what drive should the hardware lock located. 4. he supplied the drive letter then it goes ok then. 5. All the commands/routines works after that. It works like the code from the flash drive resides at the memory.. I think i need more practice to do that.. Quote
ReMark Posted December 5, 2012 Posted December 5, 2012 I thought a hardware lock was a physical object (dongle or flash drive) attached to a port on a computer that acts as a key for operating a piece of software. What exactly are you trying to do? Quote
Ahmeds Posted December 5, 2012 Author Posted December 5, 2012 I thought a hardware lock was a physical object (dongle or flash drive) attached to a port on a computer that acts as a key for operating a piece of software. What exactly are you trying to do? Exactly that is.. but what I'm trying to do is creating a line of code that has to be read by from a flash drive then after I can get off the flash drive but after that all routines works well.. My purpose is like if I wanted to Demo my software, and It would only work by session. After turning off/close the autocad the next tim you open it would ask the hardware lock again.. Quote
ReMark Posted December 5, 2012 Posted December 5, 2012 I fail to see the point of all this. Let's say you have developed a custom lisp program that you want to demo at a client's office. The program is on a flash drive. You attach the flash drive to your client's computer. You APPLOAD the program off the flash drive and into AutoCAD. Demonstrate your program. When done you exit out of AutoCAD. You remove your flash drive and bid your client "good day". What could be easier? Quote
Ahmeds Posted December 5, 2012 Author Posted December 5, 2012 I fail to see the point of all this. Let's say you have developed a custom lisp program that you want to demo at a client's office. The program is on a flash drive. You attach the flash drive to your client's computer. You APPLOAD the program off the flash drive and into AutoCAD. Demonstrate your program. When done you exit out of AutoCAD. You remove your flash drive and bid your client "good day". What could be easier? I got your point sir.. Thank you What if I had 30 persons or more than that, your advice is good but only for one person, What if my product had to demo not just for one whole day? I think very time consuming if everyday I would install it in their computer before we go to work... Quote
Organic Posted December 5, 2012 Posted December 5, 2012 I fail to see the point of all this. Let's say you have developed a custom lisp program that you want to demo at a client's office. The program is on a flash drive. You attach the flash drive to your client's computer. You APPLOAD the program off the flash drive and into AutoCAD. Demonstrate your program. When done you exit out of AutoCAD. You remove your flash drive and bid your client "good day". What could be easier? Hardware locks are given to clients after they purchase the software. I.e. the software will not run at all if the hardware lock is not plugged into the computer (or the server for networked software). I still use a few programs that use these locks. Quote
irneb Posted December 5, 2012 Posted December 5, 2012 I think he's trying to get another way of copy-protection. The old HW-Locks were electronic circuit boards which were connected to either one of the COM ports or the LPT port on the back of the PC. This would then require some RAW C (or such) to read from specific pins on that port, the circuit was designed to only perform special functions when normally unused pins in the port was sent signals - otherwise it would simply pass normal signals through so you could still use the port for something else. The circuit was usually also designed to give varying responses - e.g. using a hardware-encoded-formula to change a number into another. Then the software would send say the current time as an integer and compare the dongle's response to an algorithm. Later USB dongles perform similar to an encrypted read-only flash disc, though you now have to guard against someone simply copying the contents onto another disc. And more complex versions do similar to what the old serial dongles did - i.e. transform integer values through a preset algorithm. You could even do something similar to what most games do: require a CD/DVD to be inserted while the program is running. This does much the same as the simpler usb dongle does. Some companies like Sony write erroneous code onto the CD to try and stop users from simply duplicating the CD (normal burning software will stop at this error code), but the program would read the error code as is since it's meant to be an error - that's the "protection". Various different methods have been designed for this since the 80's through to new ones this year - all of them are already cracked. None of these systems are crack-proof. Again (as I've mentioned in the other thread) there is no such thing as a crack-proof copy protection system which allows your legitimate users to actually use your software. It's like a safe door, you can place the absolute most expensive lock system onto it - but that's still not a 100% guarantee that some thief won't be able to open it. The only "crack-proof" thing to do is to make your program so it will never run, no matter what - which means the users who have legitimate licenses won't be able to use it either (this would be like welding the safe door shut). Quote
Tharwat Posted December 5, 2012 Posted December 5, 2012 I would go with setenv and set my own variable name with a limitation of running times , and the routine would fail to run when it exceeds a specific number of course . Quote
irneb Posted December 5, 2012 Posted December 5, 2012 Actually for this scenario I'd simply go with a password-entry. Have your code as for a string input and use the grread to read the keystrokes but not show the text. That way you activate the program once, after acad is shut down it needs to be re-activated. IMO this is no less "secure" than a dongle. Since if they can figure out the code for the password, then they can figure out the code for the dongle. Quote
Ahmeds Posted December 5, 2012 Author Posted December 5, 2012 I would go with setenv and set my own variable name with a limitation of running times , and the routine would fail to run when it exceeds a specific number of course . Ok, I think what I need to know or to learn is how could I use a variable from one file or defun to another file or defun, so that I can use the value of a variable from the routine I made in my flash drive and if not satisfied by the one inside the hard drive it could not run. It was hard for me to explain that, I could only imagine what I wanna do, but luck of words I could create to explain it clearly. I am so sorry for that, just using my imagination with those things. I know this is a very long way to go to be like one you guys, but I'm willing to learn and very thankful that this site exist. Quote
irneb Posted December 5, 2012 Posted December 5, 2012 Well if you simply want to "read" a value from a file on the usb stick, then use open to open the file then read-line to read it as text. Then you can use read / atoi / rtos to convert it to a number. And then the usual if statement. Though this is not stopping anyone from simply copying the file on your usb "dongle". Quote
MSasu Posted December 5, 2012 Posted December 5, 2012 Please also keep in mind that if decide to use an USB stick as a dongle, you need to design a flexible approach for accessing it - this is because its drive letter is allocated dynamically and therefore will vary with the number of hard-disks/partitions one user have. Quote
Ahmeds Posted December 6, 2012 Author Posted December 6, 2012 (edited) Please also keep in mind that if decide to use an USB stick as a dongle, you need to design a flexible approach for accessing it - this is because its drive letter is allocated dynamically and therefore will vary with the number of hard-disks/partitions one user have. yeah, that's why i'm creating one that asking for the drive letter where the usb flash drive was inserted, then if i enter the wrong letter the file(.lsp) wasn't be located. Then I should have to removed it(flash drive) out again after reading the necessary file just to keep my software safe from copying. What I want is to create a key like program that would make my routines run after accessing it. Can someone here make me a sample for that, I just don't know how the logical expression and syntax gonna be. Edited December 6, 2012 by Ahmeds Quote
irneb Posted December 6, 2012 Posted December 6, 2012 So you don't want to use something like this for example? Otherwise use something like a CRC generated from one of your souce LSP files - so it's not readily calculatable from the FAS file. As for the drive letter - how about using the Scripting.FileSystemObject to run through the list of drives in the Drives Collection on the PC? You can even filter for different type of drives, so you don't try searching through stuff like the HDD's or CD Roms. And here's an example of how to use the FileSystemObject through VLisp. Quote
BIGAL Posted December 7, 2012 Posted December 7, 2012 Why not just use a FAS put a time in it or number of runs and do a delete file or better still do a overwrite file with say message time up. Also add in a MAc address or disk ID for good luck. Stops copying onto multiple machines. The reallity is 99% of end users have no idea how to even look at a plain jane lisp file let alone have a go at cracking a registry entry protected trial version. I have been down this path of protection and you really have to look at how many are you going to sell and to what value. You may upset the prospective client by not providing a trial version. Look at shareware is it better to get 100x$30 or spend heaps of time trying to get 1x$500. The protection needs to be simple. Check out a post I did last week about combining a protection lisp with a normal lisp program making a full set for the client. This is not the one but ahs good ideas same theme of post http://www.cadtutor.net/forum/showthread.php?75657-Is-there-any-way-to-create-a-license-key-for-my-LISP-programs&highlight=protection Search protection you will find lots more Quote
Ahmeds Posted December 10, 2012 Author Posted December 10, 2012 Thank you very much to all of you guys who shared and suggest what should I do.. I got it now. I created a code(LOCK.lsp) that asking for the volume serial number of my flash drive.. for example the output would be vsnr = A1B2-C3D4 then before the end of defun I place a (setq lock vsnr) after that, I put in the first line (setq frsn "A1B2-C3D4")in every LISP i make then(defun a ()(if (= lock frsn) (progn ....... routine goes here if this condition satisfied );end progn .. if not ); end if (load "lock.lsp") ); end defun this is ment to run only in every session otherwise it ask the flash drive to insert again so, the only thing i have to care for is not letting the user know what the volume serial number of my flash drive to make sure the safety from copying/pirating of my program. I made this to share an idea to those who conducted seminars to promote their programs consisting numbers of users that needs a hands on. I hope this was right way of sharing, thanks a lot again guys. Quote
irneb Posted December 10, 2012 Posted December 10, 2012 If you want that working throughout the session, you might need to use the vl-propagate or the vl-bb-* functions to set that variable across all opened DWGs. Actually, I'd advise having a function do the check for you - instead of using an equal in every lisp you have. That way if you later decide to change your security method - do don't need to change every single lisp you have - just that one function. Just another thing. Say there's nothing loaded yet. That means lock=nil, and vsnr=nil ... therefore lock = vsnr and your equal will return true (even though your security might not have loaded). Quote
Ahmeds Posted December 10, 2012 Author Posted December 10, 2012 If you want that working throughout the session, you might need to use the vl-propagate or the vl-bb-* functions to set that variable across all opened DWGs. Actually, I'd advise having a function do the check for you - instead of using an equal in every lisp you have. That way if you later decide to change your security method - do don't need to change every single lisp you have - just that one function. Just another thing. Say there's nothing loaded yet. That means lock=nil, and vsnr=nil ... therefore lock = vsnr and your equal will return true (even though your security might not have loaded). Ok, Thanks for the suggestions but as a beginner only limited knowledge i have But, of course I'm always love to learn something new..... Quote
Tharwat Posted December 10, 2012 Posted December 10, 2012 ..... but as a beginner only limited knowledge i have Out of offense , why you are looking for a way to secure *YOUR* lisps before learning ( lisping ) very well ? Quote
Ahmeds Posted December 10, 2012 Author Posted December 10, 2012 Out of offense , why you are looking for a way to secure *YOUR* lisps before learning ( lisping ) very well ? I know what's running in your mind. Actually, it was just given by a friend and he ask me to learn like what he did on my own. So, that is why I'm learning LISPs right now to create some enhancements from his creation. He said it helps me a lot someday, and thanks to you being a part of it. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.