Code Red > AutoLISP (Vanilla / Visual)

vlx password

(1/1)

dussla:
i made  vlx file with some lisp files.but i need password for vlx.

example) if i load xxxx.vlx ,  command demands pasword for excuting .

is good solution for that ?

rkmcswain:
Put some password code it in your lisp code somewhere. It will be hidden after "compiling" to VLX

See also: http://www.pacifier.com/~nemi/password.htm

Didge:
Hope this helps, it should be fairly secure once compiled into a vlx.

(if (equal (get-password "Please Enter Password") "YOUR-PASS")
  (progn
    ; do stuff
  )
  (prompt "\nSorry wrong password)
)




--- Code: ---;*****************************************************************************
; GET-PASSWORD - Dialogue box for standard password entry.                   *
; ============   Arguments: PRMPT = Prompt for top of dialogue box           *
;                                                                            *
;                Example:   (get-password "Please Enter Password")           *
;*****************************************************************************
(defun GET-PASSWORD ( PRMPT / dclname tempname filen dclid ret)
  (setq dclname (cond ((setq tempname (vl-filename-mktemp "GET-PASSWORD.tmp") filen (open tempname "w"))
       (foreach stream '( "passdlg : dialog { key = \"TITLE\"; label = \" \";\n"
  "          : boxed_column {\n"
  "            : edit_box { label = \"Password:\"; edit_width = 20; key = \"password\"; password_char = \"*\";}\n"
  "          }\n"
  "          spacer_1;\n"
  "          ok_cancel;\n"
  "        }\n")
                    (princ stream filen)
                )   
                (close filen)
                tempname
  )))
  (setq dclid (load_dialog dclname))
  (if (not (new_dialog "passdlg" dclid))(progn (alert "Dynamic Dialogue Extraction Failed.")(exit)))
  (if PRMPT (set_tile "TITLE" PRMPT))
  (mode_tile "password" 2)
  (action_tile "password" "(setq ret $value)")
  (start_dialog)
  (unload_dialog dclid)
  ret
)

--- End code ---

dussla:
wow
really thank you for good answer~
always thank you again

TimSpangler:

--- Quote from: Didge on April 21, 2008, 07:44:11 AM ---Hope this helps, it should be fairly secure once compiled into a vlx.

(if (equal (get-password "Please Enter Password") "YOUR-PASS")
  (progn
    ; do stuff
  )
  (prompt "\nSorry wrong password") Don't forget to close the quotes  :wink:
)


--- End quote ---

Navigation

[0] Message Index

Go to full version