View Full Version : "Lisp Lock"
vipin_nair
2008-02-07, 07:31 AM
Hi Everyone,
Does anyone knows how to lock or unlock Autolisp programs. Is there any application for this? Any suggestion will be appreciated. Thank you.
ccowgill
2008-02-07, 01:18 PM
you can compile them, but then there is no way to decompile them.
rkmcswain
2008-02-07, 02:28 PM
Hi Everyone,
Does anyone knows how to lock or unlock Autolisp programs. Is there any application for this? Any suggestion will be appreciated. Thank you.
Define "lock". What is your purpose?
If you are writing lisp routines and just want to hide the source code, you can compile them to FAS or VLX. Use the VLIDE and reference the help file. This isn't 100% secure, as they can be converted back to source code, but it's not easy.
Or are you distributing lisp routines and you need a security method to combat unauthorized distribution and usage?
Adesu
2008-02-08, 01:49 AM
Hi vipin,
I agree with "Swain's" argument, but as your attempt , test this code
; pfc is stand for Password For Code
; Design by : Adesu <Ade Suharna>
; Email : mteybid@yuasabattery.co.id
; Homepage : http://www.yuasa-battery.co.id
; Create : 13 July 2006
; Program no.: 0381/07/2006
; Edit by : Adesu 14/07/2006 1).
(defun c:pfc (/ om ce current_date limit_date dcl_id ans key rk lim)
(setq *error* myer)
(setq om (getvar "osmode")) ; get osmode setting
(setvar "osmode" 0) ; osmode set to 0
(setq ce (getvar "cmdecho")) ; get cmdecho setting
(setvar "cmdecho" 0) ; cmdecho set to 0
(setq current_date (rtos (getvar "cdate") 2 0))
(setq limit_date "20060712")
(if
(< limit_date current_date)
(progn
(vl-load-com)
(*create_dialog*)
(setq dcl_id (load_dialog fname))
(if
(not (new_dialog "temp" dcl_id))
(exit)
) ; if
(set_tile "pw" " ")
(mode_tile "pw" 2)
(action_tile "ld" "(setq lim $value)") ; 1).
(action_tile "pw" "(setq pass $value)")
(action_tile "accept" "(done_dialog 1)")
(action_tile "cancel" "(done_dialog 0)")
(setq ans (start_dialog))
(if
(= ans 0)
(progn
(alert (strcat "\nAre you sure to want try again"
"\nplease type pfc...and hit enter"))
(unload_dialog dcl_id)
(exit)
) ; progn
(progn
(setq key "Adesu")
(if
(= key pass)
(progn
(setq rk "HKEY_LOCAL_MACHINE\\SOFTWARE\\Autodesk\\AutoCAD\\R16.0\\ACAD-201:409\\Adesu_pfc")
(setq limit_date (atoi lim))
(vl-registry-write rk nil limit_date)
(setq limit_date (itoa (vl-registry-read rk)))
(alert (strcat "\nYou just resetting limit date"
"\nNew limit date is = "
limit_date))
) ; progn
(alert "\nInvalid enter code,your access denied")
) ; if
) ; progn
) ; if
) ; progn
(alert "\nPlease use this code,you are not yet blockade")
) ; if
(setvar "osmode" om) ; return setting
(setvar "cmdecho" ce) ; return setting
(setq *error* nil)
(princ)
) ; defun
(defun myer (msg)
(setvar "osmode" om)
(setvar "cmdecho" ce)
(setq att "***Resetting system variable was done***")
(princ att)
)
(defun *create_dialog* ()
(setq fname (vl-filename-mktemp "dcl.dcl"))
(setq fn (open fname "w"))
(write-line "temp : dialog {label = \"Password Protected\";
: text_part {label = \"Type..example 20060714\";}
: edit_box {label =\"Limit date\";
key = \"ld\";}
: text_part {label = \"Enter four digit code\";}
: edit_box {label = \"Password:\";
edit_width = 20;
key = \"pw\";
password_char = \"*\";}
ok_cancel;}" fn)
(close fn)
) ;defun
Hi Everyone,
Does anyone knows how to lock or unlock Autolisp programs. Is there any application for this? Any suggestion will be appreciated. Thank you.
vBulletin® v3.6.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.