Halsy Posted February 8, 2022 Posted February 8, 2022 (edited) How to protect Lisp file so that other user can't use that lisp file when try to install in their autocad and display waring message Edited February 8, 2022 by Halsy Quote
Steven P Posted February 8, 2022 Posted February 8, 2022 Don't send it to them? That is normally the best way to stop someone using a file. LISP is a text based language and you can open the code with a text editor such as notepad, even if you can prevent the file running on their AutoCAD they can just open the file in a text editor, copy, paste, edit and save, and make it run. You can try to make it into a VLX file which isn't editable in a text editor and that can help. If you do that then you could do something like looking at environmental settings, (https://www.afralisp.net/archive/lisp/enviro.htm) if the computer name isn't on your list, don't run for example. But if it was me, if you don't want to share it, don't send it out Quote
Halsy Posted February 8, 2022 Author Posted February 8, 2022 Please give some examples to use that environment variables so it can't run on others machine Quote
ronjonp Posted February 8, 2022 Posted February 8, 2022 31 minutes ago, Halsy said: Please give some examples to use that environment variables so it can't run on others machine Here are a few: (getenv "LOGONSERVER") (getenv "COMPUTERNAME") (getenv "USERNAME") Quote
BIGAL Posted February 9, 2022 Posted February 9, 2022 (edited) Making a fas file may be easier its a compiled file for each lisp. It may be easier than a VLX as that is a group of lisp dcl etc. Like Ronjonp, a few more, you can use a time bomb, you can check a hard drive serial number or get the IP address of pc, save a code to the pc into the registery with a install lisp that gets deleted once run. Get Version number of the CAD. If you have a web server can ping the server and check. A little complicated but as part of install can get emailed install details but that may not help. "The software is not working" was the phone call, the person who paid for it was trying to install on another pc. You can makes fas files in a script so compiling a lot in one go, there is a way of adding the check lisp part to all your lisps as you compile. In the old days a program called "Protect" was used. Edited February 9, 2022 by BIGAL Quote
Halsy Posted February 9, 2022 Author Posted February 9, 2022 BIGAL thanks for your Reply. But I don't know how to use that hard drive serial number Or ip address of pc so please shear some lisp program which can I use in my lisp routine Quote
Halsy Posted February 9, 2022 Author Posted February 9, 2022 If same user change their pc name and username to that machine on which fas or vlx file install that getenv "computer name" and "username" is not very powerful to protect Lisp routine Quote
mhupp Posted February 9, 2022 Posted February 9, 2022 9 hours ago, Halsy said: If same user change their pc name and username to that machine on which fas or vlx file install that getenv "computer name" and "username" is not very powerful to protect Lisp routine 99.9% of the time the user doesn't know what your testing/looking at for the protection. with enough time and poking around anything can be bypassed. most users wouldn't go to the hassle to do that. 1 Quote
maratovich Posted February 9, 2022 Posted February 9, 2022 If you really want protection, then you need additional software. I can recommend this - https://www.star-force.com/ write them a letter with your question. This is a powerful protection system but paid. Quote
ronjonp Posted February 9, 2022 Posted February 9, 2022 (edited) 11 hours ago, Halsy said: If same user change their pc name and username to that machine on which fas or vlx file install that getenv "computer name" and "username" is not very powerful to protect Lisp routine This is true, can you suggest another method that's better? Next step is to compile your code into VLX .. do you know how to do that? Edited February 9, 2022 by ronjonp Quote
Halsy Posted February 9, 2022 Author Posted February 9, 2022 Yes I know how to compile lisp into vlx and fas but I need routine to protect my lisp file being use bye some one else. Quote
ronjonp Posted February 9, 2022 Posted February 9, 2022 Have you started anything? It appears that you want someone else to give you the complete answer. 1 Quote
eldon Posted February 9, 2022 Posted February 9, 2022 There was a thread a few years ago named "Security" that might be still relevant. Have a look. Quote
Tharwat Posted February 9, 2022 Posted February 9, 2022 I don't know why most of people prefer running before learning how to walk ! Any solution? 1 Quote
Steven P Posted February 9, 2022 Posted February 9, 2022 Simplest might be best then? Assuming that the other person is clever enough to open a plain LISP file, that you can compile your code to VLX why not go mega simple? (defun c:ThisIsMyLisp ( / ) (princ "\nEnter Password") (if (= (getstring) "APassword") (progn .. do lots of clever stuff ) ; end progn (progn (alert "Invalid Password") ) ; end progn ) ; end if ) Change the getsting to look at computer name or whatever you want 1 Quote
eldon Posted February 9, 2022 Posted February 9, 2022 Or put a hidden file in the root directory, and check for its existence. 1 Quote
Kajanthan Posted February 13, 2022 Posted February 13, 2022 Very Strongest Protected lisp code funny result (eq "DD:13:EF:3D:95:AC" ret) ;; This is your Pc MAC (eq "BFEBFBFF040908EA" serx) ;; This is your Processor Id Licence.lsp 1 2 Quote
BIGAL Posted February 16, 2022 Posted February 16, 2022 (edited) Like the pline bit. As before using cmd in WIN 10, for us oldies DOS. copy c:\mylisps\license.lsp+mylisp22.lsp c:\mylisp\compile\mylisp22.lsp When you look in \compile\mylisp22.lsp it will have the serial code added no need to copy and paste make a fas of that one. I use a Bat file to do around a 100 in one go. Happy to provide more info how to make. Send the end user a fas of the display ID no mention of what it is. They email you back the ID number BFEBFBFF040908EA Edited February 16, 2022 by BIGAL 1 Quote
Halsy Posted February 16, 2022 Author Posted February 16, 2022 Please tell me how to make that bat file 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.