2 Attachment(s)
need security for Lisp file
Dear all
I would like to use my lisp files to work in only my office domain or network...when the same Lisp file is carried out it should not work, and a message should be displayed as SORRY YOU DONT HAVE PERMISSIONS TO USE THIS COMMAND.
I am attaching the lisp file for Ur reference...if any one CAD GURUs please help me out........
One is the lisp file and the other txt file is the values for executing the lisp file...
Thankx in Adv....
Attachment 84654
Attachment 84655
Ravindra
Re: need security for Lisp file
It isnt 100% fool proof, but it would require quite a bit of determination to access the files. What I have done is set up a check in our main lisp file, it checks to see if a particular network location exists. If not, it displays a message. Inside of each separate lisp file, it checks to see if a function is loaded, that is custom and only specified within our main lisp file. Then, I compile all the code to .fas files for loading on everyones machines. Fas files can be cracked, and someone could try to setup their folder structure to match that of the office (which is hard to do if you are using UNC paths), or they could create another main file that has the custom function in it (but that function would be difficult to determine the name if you dont tell anyone what it is)
This is an example of the code in our main file
Code:
(if (= (vl-file-directory-p "\\\\SERVER\FOLDER") nil)
(progn
(prompt
"\nSORRY YOU DONT HAVE PERMISSIONS TO USE THIS COMMAND\n"
) ;_ end of prompt
(princ)
)
(progn
MAIN ROUTINE LOAD CALLS
(defun c:CUSTOMFUNCTION ()
(prompt "\n\nLisp Routines loaded successfully\n")
) ;_ end of defun
) ;_ end of progn
) ;_ end of if
and then in each and every lisp routine file, I wrap our code with this:
Code:
(if (not c:CUSTOMFUNCTION)
()
(progn
LISP ROUTINE CODE
) ;_ end of progn
) ;_ end of if
Re: need security for Lisp file
FWIW - I agree with ccowgill
Re: need security for Lisp file
What about a text file that exists in a specific directory, that has a certain value in it?
eg. When the vlx is loaded, if it doesn't find the file and it doesn't find a particular string within the file, nothing runs.
Too convoluted?
Re: need security for Lisp file
Oh
Thank you vermuch sir. I will check and once again I will caome back to ur help.....:)
Re: need security for Lisp file
Quote:
Originally Posted by
alanjt
What about a text file that exists in a specific directory, that has a certain value in it?
eg. When the vlx is loaded, if it doesn't find the file and it doesn't find a particular string within the file, nothing runs.
Too convoluted?
its basically the same thing, other than you could do it without the main lisp file. I've got mine setup this way so that it becomes a package deal. When I first started customizing, I had a hard time convincing management that it was a good thing. Then I finished up my masterpiece program that would take 4 - 8 hours of work and reduce it to less than a minute, that had them sold. To get all my other customizations loaded, I wrote it in as an all or nothing routine. They didnt seem to care, as long as they had the huge time saver program. That office wasnt big on using the customization, and still isnt (they abandoned everything shortly after I left.)
Re: need security for Lisp file
Stupid question time: you've just posted the LISP on the internet. Its already working beyond your office. The point for security is now...?
Re: need security for Lisp file
Quote:
Originally Posted by
dgorsman
Stupid question time: you've just posted the LISP on the internet. Its already working beyond your office. The point for security is now...?
All names, variables, and folder pathing structures have been changed to protect the innocent, enabling the ability to provide a visual example.
*EDIT*Oh, I get it now, this question was not directed at me, I'm so dense sometimes.*EDIT*
Re: need security for Lisp file
Dear Mr. Ccowgill
Hi...Thanx for the extensive help and cooperation....
Can you help me out how and where to add the CODE which you have given..I have 50 lisp programs, in which every program I need to keep it in secure and work in house only..Please kindly help out HOW and where to define this code in my lisp programs......
I have tried adding the code in my lisp program, by giving the server name and folder paths, but it is working in other systems also.....So please tell me how to add this code...
Thankx In advance..:|
Re: need security for Lisp file
Quote:
Originally Posted by
ravindra.mvk468963
Dear Mr. Ccowgill
Hi...Thanx for the extensive help and cooperation....
Can you help me out how and where to add the CODE which you have given..I have 50 lisp programs, in which every program I need to keep it in secure and work in house only..Please kindly help out HOW and where to define this code in my lisp programs......
I have tried adding the code in my lisp program, by giving the server name and folder paths, but it is working in other systems also.....So please tell me how to add this code...
Thankx In advance..:|
I'm not fully understanding what you are asking. In the examples above, where it says MAIN ROUTINE LOAD CALLS you would place your commands to load your lisp routines (or autoload) and where it says LISP ROUTINE CODE in the secondary example is where you would place you code for each of your 50 sub routines files.