Jump to content

How to protect Lisp File


Halsy

Recommended Posts

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 by Halsy
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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")

 

Link to comment
Share on other sites

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 by BIGAL
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

 

 

 

 

  • Agree 1
Link to comment
Share on other sites

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 by ronjonp
Link to comment
Share on other sites

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

  • Like 1
Link to comment
Share on other sites

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 by BIGAL
  • Like 1
Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...