Jump to content

Recommended Posts

Posted (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 by Halsy
Posted

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

Posted

Please give some examples to use that environment variables so it can't run on others machine

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

 

Posted (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 by BIGAL
Posted

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

Posted

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

Posted
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
Posted

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.

Posted (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 by ronjonp
Posted

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.

Posted

Have you started anything? It appears that you want someone else to give you the complete answer.

  • Like 1
Posted

There was a thread a few years ago named "Security" that might be still relevant. Have a look.

Posted

I don't know why most of people prefer running before learning how to walk ! Any solution? :D 

  • Funny 1
Posted

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
Posted

Or put a hidden file in the root directory, and check for its existence.

  • Like 1
Posted

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

  • Like 1
  • Funny 2
Posted (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 by BIGAL
  • Like 1

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...