Author Topic: Encrypt my DCL file  (Read 7296 times)

0 Members and 1 Guest are viewing this topic.

Coder

  • Swamp Rat
  • Posts: 827
Re: Encrypt my DCL file
« Reply #15 on: August 08, 2019, 06:59:45 AM »
Wow that's too great MP and more than I expected for sure.
Thank you so much for taking the time and giving all these useful examples.

Your ROT45 function looks cool and I think that is the one that I was looking for.

Thanks again and have a great day.  :-)


Grrr1337

  • Swamp Rat
  • Posts: 812
Re: Encrypt my DCL file
« Reply #16 on: August 08, 2019, 08:41:26 AM »
i have to add:
dcl-s are not encrypted inside vlx-s, they are just plain texts and can be view by any viewer

I have the same observation, hence in order to correctly load the .dcl file via the load_dialog function
the DCL code inside should not be encrypted, else one'll get a DCL syntax error.
DCL-on-the-fly + lisp compiling is the way to go, if one sticks to this little detail - erase the temporarily created dcl file right before using the start_dialog function.
Check this -

https://gifyu.com/image/hS0v
« Last Edit: August 08, 2019, 08:45:21 AM by Grrr1337 »
(apply ''((a b c)(a b c))
  '(
    (( f L ) (apply 'strcat (f L)))
    (( L ) (if L (cons (chr (car L)) (f (cdr L)))))
    (72 101 108 108 111 32 87 111 114 108 100)
  )
)
vevo.bg

PKENEWELL

  • Bull Frog
  • Posts: 309
Re: Encrypt my DCL file
« Reply #17 on: August 08, 2019, 12:29:59 PM »

I have the same observation, hence in order to correctly load the .dcl file via the load_dialog function
the DCL code inside should not be encrypted, else one'll get a DCL syntax error.
DCL-on-the-fly + lisp compiling is the way to go, if one sticks to this little detail - erase the temporarily created dcl file right before using the start_dialog function.
Check this -

https://gifyu.com/image/hS0v

Great Example Grrr1337! It had not occurred to me that you could actually delete the DCL file between the calls to "load_dialog" and "start_dialog"! Your KungFu is very strong!  8-)
"When you are asked if you can do a job, tell 'em, 'Certainly I can!' Then get busy and find out how to do it." - Theodore Roosevelt

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Encrypt my DCL file
« Reply #18 on: August 08, 2019, 12:36:30 PM »
... erase the temporarily created dcl file right before using the start_dialog function.



Writing and calling dcl on the fly is def the way to go. A simplistic example from days of yore. If security is an issue you can embed encoded strings representing the dcl def (vl-string-translate can be used to create a simple cypher/de-cypher), decoding them before creating the dcl file and then delete the temp dcl file as soon as it's loaded into memory.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

PKENEWELL

  • Bull Frog
  • Posts: 309
Re: Encrypt my DCL file
« Reply #19 on: August 08, 2019, 12:43:57 PM »
Writing and calling dcl on the fly is def the way to go. A simplistic example from days of yore. If security is an issue you can embed encoded strings representing the dcl def (vl-string-translate can be used to create a simple cypher/de-cypher), decoding them before creating the dcl file and then delete the temp dcl file as soon as it's loaded into memory.

Well - can't leave you out MP! You are a Master!  :-D
"When you are asked if you can do a job, tell 'em, 'Certainly I can!' Then get busy and find out how to do it." - Theodore Roosevelt

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Encrypt my DCL file
« Reply #20 on: August 08, 2019, 12:54:21 PM »


Just because the normal convention is to use the file extensions of .lsp and .dcl for lisp and dcl files respectively does not mean you have to - you can use your own extensions, further adding a level of obfuscation. Try it.

@ PK. :)
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

PKENEWELL

  • Bull Frog
  • Posts: 309
Re: Encrypt my DCL file
« Reply #21 on: August 08, 2019, 01:35:03 PM »


Just because the normal convention is to use the file extensions of .lsp and .dcl for lisp and dcl files respectively does not mean you have to - you can use your own extensions, further adding a level of obfuscation. Try it.

@ PK. :)

"When you are asked if you can do a job, tell 'em, 'Certainly I can!' Then get busy and find out how to do it." - Theodore Roosevelt

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Encrypt my DCL file
« Reply #22 on: August 08, 2019, 03:19:18 PM »
Wow that's too great MP and more than I expected for sure.
Thank you so much for taking the time and giving all these useful examples.

Your ROT45 function looks cool and I think that is the one that I was looking for.

Thanks again and have a great day.  :-)

Sorry, I missed this. You're most welome.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst