Jump to content

How to protect Lisp File


Halsy

Recommended Posts

Ok so had a think and ended up with this you need the where are the lisps d:\\temp, where is the licence.lsp and a out put directory \\temp\\compile. Change to suit your pc.

 

its rough as its only used to make new lisps yes can be way better with more bells and whistles.

 


(setq lspdir (vl-directory-files "d:\\temp" "*.lsp"))
(setq fo (open "d:\\temp\\licfiles.bat" "w"))
(foreach lsp lspdir
(write-line (strcat "copy d:\\alan\\lisp\\licence.lsp+" "\"d:\\temp\\" lsp "\"" " " "\"d:\\temp\\compile\\" lsp "\"") fo )
)
(close fo)

(command "shell" "d:\\temp\\licfiles.bat")

 

Edited by BIGAL
Link to comment
Share on other sites

1 hour ago, lrm said:

I was wondering if NFT's (Non-fungible Tokens) might be used. It might not be practical in this application but in theory would it work?

tho this is probably an actual use for nft's.

Link to comment
Share on other sites

11 hours ago, lrm said:

I was wondering if NFT's (Non-fungible Tokens) might be used. It might not be practical in this application but in theory would it work?

 

Not something I have come across before really, but if you apply one of these to a LISP file will that stop another user opening the file and yet allow the originators CAD to run the LISP?

Link to comment
Share on other sites

  • 3 weeks later...
  • 1 year later...
On 2/13/2022 at 12:06 PM, Kajanthan said:

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 2.44 kB · 80 downloads

hi, thanks for your solution.
Can i ask how it work?

 

Link to comment
Share on other sites

You can get hard disk Id, Mac address, or processor ID as suggested. Some hard disk code examples

 

(setq ser (vla-get-Serialnumber (vlax-invoke (vlax-create-object "Scripting.FileSystemObject") 'getdrive "c:")))

; drive type 1 is a usb 2 hard disk
(defun UsbDriveSerialNumber ( / fso dr)
  (setq fso (vlax-create-object "Scripting.FileSystemObject"))
  (vlax-for d (vlax-get fso 'Drives)
    (if
	  (= (Vlax-get  d 'DriveType) 2)
      (setq dr (cons (list (vla-get-path d) (vla-get-SerialNumber d)) dr)
      )
    )
  )
  (vlax-release-object fso)
  (reverse dr)
)
(UsbDriveSerialNumber)


(vlax-for d (vlax-get fso 'Drives)
	  (princ (Vlax-get  d 'DriveType) )
)

 

"Can i ask how it work?" Did you look at the lisp posted ?

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