Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: need security for Lisp file

  1. #1
    Login to Give a bone
    0

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

    LS_DECKSLAB.lsp

    SLRB_LONG.SEC_DECK_SLAB.txt

    Ravindra

  2. #2
    Certifiable AUGI Addict ccowgill's Avatar
    Join Date
    2004-08
    Location
    Iron Station, NC
    Posts
    3,198
    Login to Give a bone
    0

    Default 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

  3. #3
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,803
    Login to Give a bone
    0

    Exclamation Re: need security for Lisp file

    FWIW - I agree with ccowgill
    R.K. McSwain | CAD Panacea |

  4. #4
    AUGI Addict
    Join Date
    2008-02
    Posts
    1,141
    Login to Give a bone
    0

    Default 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?

  5. #5
    Login to Give a bone
    0

    Default Re: need security for Lisp file

    Oh

    Thank you vermuch sir. I will check and once again I will caome back to ur help.....

  6. #6
    Certifiable AUGI Addict ccowgill's Avatar
    Join Date
    2004-08
    Location
    Iron Station, NC
    Posts
    3,198
    Login to Give a bone
    0

    Default Re: need security for Lisp file

    Quote Originally Posted by alanjt View Post
    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.)

  7. #7
    AUGI Addict
    Join Date
    2015-12
    Posts
    2,095
    Login to Give a bone
    0

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

  8. #8
    Certifiable AUGI Addict ccowgill's Avatar
    Join Date
    2004-08
    Location
    Iron Station, NC
    Posts
    3,198
    Login to Give a bone
    0

    Default Re: need security for Lisp file

    Quote Originally Posted by dgorsman View Post
    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*
    Last edited by ccowgill; 2012-03-15 at 12:14 PM. Reason: I have seen the light.

  9. #9
    Login to Give a bone
    0

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

  10. #10
    Certifiable AUGI Addict ccowgill's Avatar
    Join Date
    2004-08
    Location
    Iron Station, NC
    Posts
    3,198
    Login to Give a bone
    0

    Default Re: need security for Lisp file

    Quote Originally Posted by ravindra.mvk468963 View Post
    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.

Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 2
    Last Post: 2015-04-17, 04:00 PM
  2. 2015: .dwg file Security
    By jaypatel1993674968 in forum AutoCAD Plant 3D - General
    Replies: 2
    Last Post: 2014-06-23, 03:47 PM
  3. Replies: 2
    Last Post: 2007-06-05, 04:44 AM
  4. Lisp Security
    By Lions60 in forum AutoLISP
    Replies: 3
    Last Post: 2006-08-04, 07:26 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •