Author Topic: encrypt LISP program into FAS  (Read 5609 times)

0 Members and 1 Guest are viewing this topic.

baitang36

  • Bull Frog
  • Posts: 213
encrypt LISP program into FAS
« on: February 16, 2022, 07:38:40 PM »
The principle is very simple, that is to transform the LISP file into garbled code, and then embed it into a FAS framework to become a FAS file. It is not valid for the standard tool of Fas, which is made by hand. The encryption strength is similar to the original LSP encryption protected provided by Acad. It is enough to protect free software. For software that sells money, it is recommended to buy professional pfas2 x
When the Fas is loaded, it will decrypt the garbled code into a string and load it from memory without generating temporary files.
A function C: l2f is defined in the program
Usage:L2F enter, select the LISP file to be encrypted, and click open to successfully encrypt it.
Note that the size of LISP file cannot exceed 64K, because the definition of string in LSP uses two bytes, and the maximum number that can be represented is 65535
Since binary files are not allowed in the forum, send me a message if you like it. It's free
« Last Edit: February 16, 2022, 07:46:58 PM by baitang36 »

JohnK

  • Administrator
  • Seagull
  • Posts: 10651
Re: encrypt LISP program into FAS
« Reply #1 on: February 16, 2022, 08:14:00 PM »
I can not, personally use encrypted files at work but it sounds cool. Is this based on the same tool(s) you have been working on all these years?
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

myloveflyer

  • Newt
  • Posts: 152
Re: encrypt LISP program into FAS
« Reply #2 on: February 16, 2022, 08:24:48 PM »
Wouldn't it be nice to spend less time on encryption programs and more time writing code?
Never give up !

baitang36

  • Bull Frog
  • Posts: 213
Re: encrypt LISP program into FAS
« Reply #3 on: February 16, 2022, 09:06:47 PM »
I can not, personally use encrypted files at work but it sounds cool. Is this based on the same tool(s) you have been working on all these years?
This is a new test

baitang36

  • Bull Frog
  • Posts: 213
Re: encrypt LISP program into FAS
« Reply #4 on: February 16, 2022, 09:08:06 PM »
Wouldn't it be nice to spend less time on encryption programs and more time writing code?
Thank you for your advice

JohnK

  • Administrator
  • Seagull
  • Posts: 10651
Re: encrypt LISP program into FAS
« Reply #5 on: February 16, 2022, 09:18:15 PM »
I can not, personally use encrypted files at work but it sounds cool. Is this based on the same tool(s) you have been working on all these years?
This is a new test

Good luck! I hope it turns out.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

PM

  • Guest
Re: encrypt LISP program into FAS
« Reply #6 on: February 17, 2022, 01:49:30 AM »
I have an old lisp encrypt LISP to FAS . I dont know if you are searching something like this

Code - Auto/Visual Lisp: [Select]
  1. ;;  LSP2FAS.lsp                                    ; Scot Harris  11-29-2012
  2. ;;   Minimizes the sequence needed to create FAS files.
  3. ;;   Help facility added.
  4. ;;   Streamlined from original program provided by aqdam1978.
  5.  
  6. (defun c:LSP2FAS-Help (/)
  7.   "\tLisp (LSP) to Fast and Secure (FAS) Help"
  8.   "\n "
  9.   "\nFile dialog begins in the current directory.   "
  10.   "\nIt is suggested to place and open a drawing (DWG)   "
  11.   "\ninside the input folder you wish to batch process.   "
  12.   "\n "
  13.   "\nOutput file will be in the same folder as the file selected.   "
  14.   "\n "
  15.   "\nThere is no provisional check for an existing FAS file of the same name.   "
  16.  ))
  17. );end LSP2FAS-Help
  18.  
  19. (defun c:LSP2FAS ( / a )
  20.  (prompt " Lisp to Fast and Secure (FAS). LSP2FAS-Help available. ")
  21.  (if (wcmatch (strcase (setq a (getfiled "Convert LSP File to FAS" (getvar "DWGPREFIX") "" 16))) "*.LSP")
  22.   (progn
  23.    (c:vlide)(vlisp-compile 'st a)
  24.    (princ (strcat "\n File " (vl-string-subst ".fas" ".lsp" a) " created. "))
  25.   );progn
  26.   (alert "File extension must be \".LSP\"   ")
  27.  );if
  28.  (princ)
  29. );end LSP2FAS
  30.  

JohnK

  • Administrator
  • Seagull
  • Posts: 10651
Re: encrypt LISP program into FAS
« Reply #7 on: February 17, 2022, 08:18:57 AM »
I do not think they are. baitang36 writes professional lisp encryption tools.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

baitang36

  • Bull Frog
  • Posts: 213
Re: encrypt LISP program into FAS
« Reply #8 on: February 19, 2022, 07:25:39 AM »
I have an old lisp encrypt LISP to FAS . I dont know if you are searching something like this

Code - Auto/Visual Lisp: [Select]
  1. ;;  LSP2FAS.lsp                                    ; Scot Harris  11-29-2012
  2. ;;   Minimizes the sequence needed to create FAS files.
  3. ;;   Help facility added.
  4. ;;   Streamlined from original program provided by aqdam1978.
  5.  
  6. (defun c:LSP2FAS-Help (/)
  7.   "\tLisp (LSP) to Fast and Secure (FAS) Help"
  8.   "\n "
  9.   "\nFile dialog begins in the current directory.   "
  10.   "\nIt is suggested to place and open a drawing (DWG)   "
  11.   "\ninside the input folder you wish to batch process.   "
  12.   "\n "
  13.   "\nOutput file will be in the same folder as the file selected.   "
  14.   "\n "
  15.   "\nThere is no provisional check for an existing FAS file of the same name.   "
  16.  ))
  17. );end LSP2FAS-Help
  18.  
  19. (defun c:LSP2FAS ( / a )
  20.  (prompt " Lisp to Fast and Secure (FAS). LSP2FAS-Help available. ")
  21.  (if (wcmatch (strcase (setq a (getfiled "Convert LSP File to FAS" (getvar "DWGPREFIX") "" 16))) "*.LSP")
  22.   (progn
  23.    (c:vlide)(vlisp-compile 'st a)
  24.    (princ (strcat "\n File " (vl-string-subst ".fas" ".lsp" a) " created. "))
  25.   );progn
  26.   (alert "File extension must be \".LSP\"   ")
  27.  );if
  28.  (princ)
  29. );end LSP2FAS
  30.  
This is compiled, not encrypted.
The compiled code can be easily decompiled into the source code. My practice is to become garbled and cannot decompile.


Rustabout

  • Newt
  • Posts: 135
Re: encrypt LISP program into FAS
« Reply #9 on: February 20, 2022, 02:56:57 AM »
My second ever "office" workplace was a key example of the detriment of having code either easily decompiled or stolen. It's very hard to protect property rights / intellectual property with AutoLISP. And sadly, people who write AutoLISP often aren't the one's who benefit from it the most... people who steal it do.
In the office mentioned above, my manager had stolen all of the LISP code from the office he previously had worked at. He was able to leverage that theft to such an extent that the new office was very "successful"... successful as far as profits go, but they are currently dealing with the courts as they did some very bad stuff (unrelated to the code itself but very related to their moral standards). The LISP code was really simple but really good... good enough to allow an incompetent manager to profit heavily from it.

AutoLISP is gradually disappearing, which is a shame because I feel it's actually more useful in practical, real-world applications compared to Dynamo/Grasshopper/whatever else... It's hard to say if all this effort is worth it - is Baitang36's skills and dedication better served towards other pursuits? I myself want to see AutoLISP survive and thrive.

domenicomaria

  • Swamp Rat
  • Posts: 725
Re: encrypt LISP program into FAS
« Reply #10 on: February 20, 2022, 03:06:20 AM »
AutoLISP is gradually disappearing . . .
and what do you think about BricsCAD (BLADE) LISP or SolidWorks VLISP compatibility, or GStarCAD and more. . . ?

Rustabout

  • Newt
  • Posts: 135
Re: encrypt LISP program into FAS
« Reply #11 on: February 20, 2022, 06:15:20 PM »
Quote
and what do you think about BricsCAD (BLADE) LISP or SolidWorks VLISP compatibility, or GStarCAD and more. . . ?

Don't mistake my comment as saying that LISP should be disappearing; with my inferior programming skills I can actually program more useful utilities quicker in AutoLISP than 90% of Dynamo/Grasshopper users and even some .NET programmers. For actually getting work done it's hard to beat except for top level programmers.

GstarCAD has surprisingly good compatibility with LISP made in ACAD. Better than BricsCAD in fact. GstarCAD lacks some compatibility with block parameters/constraints. I would really like to see them include their own code editor.

BricsCAD's ACAD LISP compatibility was slightly below GstarCAD's. BLADE is very good however (that's an understatement; it's actually the best VLISP editor and by a long shot). BricsCAD seems to be in a bit of a lull development-wise: Lots of new bugs appearing each release. Like GstarCAD they did code from the ground up a while back... so perhaps there's room for improvement. I could see myself switching to BricsCAD if the quality improves in the next couple of years. And I'll probably get the "Lite" version just for BLADE at some point regardless.

Solidworks... is interesting. I heard that they have a LISP API but never read about it until replying to this post. No code editor unfortunately (at least I don't think). Same company as Draftsight (which also uses LISP of course).

There's also ZWCAD, ProgeCAD, and some others I think.

Using Visual Studio Code to edit AutoLISP sucks. And I don't think they even have much support for DCL. Most new programming languages also have modern code editors available. The lack of such is a huge reason we're seeing less young people get into LISP maybe...

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8735
  • AKA Daniel
Re: encrypt LISP program into FAS
« Reply #12 on: February 20, 2022, 06:41:48 PM »
BricsCAD's ACAD LISP compatibility was slightly below GstarCAD's.

Care to show examples, test code? Maybe start a new thread, it would be interesting to find these issues and maybe report and get them fixed.
if not, we can at least have the different behaviors documented here at the swamp,


BIGAL

  • Swamp Rat
  • Posts: 1420
  • 40 + years of using Autocad
Re: encrypt LISP program into FAS
« Reply #13 on: February 20, 2022, 07:06:36 PM »
I am using Bricscad every day for lisp programming and they are a company listening to its users, they recently updated like 200 VLA functions, they have added extra lisp functions not in Acad, there is subtle differences like polygon. Also programmed in Intellicad many years ago and same had a couple of issues but simple to get around.

The 1st to do a dcl generator will be a winner just look at VBA forms graphical interface or Opendcl.
A man who never made a mistake never made anything

Rustabout

  • Newt
  • Posts: 135
Re: encrypt LISP program into FAS
« Reply #14 on: February 20, 2022, 10:32:33 PM »
Quote
Care to show examples, test code? Maybe start a new thread, it would be interesting to find these issues and maybe report and get them fixed.
if not, we can at least have the different behaviors documented here at the swamp,

I've used a few different versions of BricsCAD (trials) and have a year-old version on my computer right now. The first time I tried BricsCAD I had issues with LISP and dynamic blocks (recurring lock-ups). The program otherwise felt good all around but I needed that functionality unfortunately. I did another trial and for whatever reason the program just didn't suite me at that time. Did ANOTHER trial and liked the program. I also needed a bail-out from a GstarCAD disaster (it had issues with draw order and PDF... the draw order issue seems to be fixed in the latest version... don't bet a large wager on that statement however). In V21 many of my routines using vla-addblock don't work (but work in both GstarCAD and AutoCAD). I broke them down only to find out that vla-addblock itself works but something else in the routine was causing it to crash (with the error saying that there was no function vla-addblock). Many LISP's throw the "filedia" variable (which sucks, specially since you have to restart BricsCAD to reset it - might be fixed in the latest version... hopefully)... actually come to think of it that's the main reason I had to set it aside... such a shame. Compared with the first ever version of BricsCAD I tried, there seems to be tons of these little bugs and quirks always throwing a wrench in the gears. I don't think the filedia issue existed in older versions (among other things). Those using older versions of BricsCAD might have less of the bugs described above. Visiting the BricsCAD forums gives a good overview of what people are experiencing.

The biggest thing I noticed with GstarCAD was that the "command-s" function: It doesn't work. But using the "command" function instead actually works where as in AutoCAD it doesn't work (there must be some sort of drawback but I was lucky enough to avoid it). With such a high degree of compatibility it's unfortunate that they don't get to work on a LISP editor. It was actually the draw order issues and PDF issues that forced me to stop using it. Other issues were that it was crashing a lot. It also wasn't printing transparency (also fixed apparently). That sucked because I had just spent hours adjusting my standards to use screening instead of transparency, only to find the other issues afterwards. GstarCAD also crashes a lot; sometimes randomly and sometimes with specific tasks. The CUI crashes a lot just like it does in ACAD, maybe 2-4x more frequently.

It takes an IMMENSE amount of time to actually test out every LISP on each platform and find each and every difference. I'm burnt out and probably going to use ACAD (do at work anyways) until I have more time and energy to pick a non-acad program. Productivity loss is something you have to be aware of, so forking out the $$$ for ACAD might not be as expensive as one thinks depending on how much you value your free time. A good programmer however can probably get BricsCAD/GstarCAD tuned well enough to avoid any and all productivity loss. I like that these programs are also "lighter" than ACAD in that they load faster, have less lag, etc... I like that hence why I'll have another crack at them in the future.

One thing I also want to explore is combining GstarCAD and BricsCAD. Buying both programs together is cheaper than one ACAD license. Especially if you only need 2D with LISP. Each program's strengths, and what they lack, actually compliment one another. I tested Dynamic Blocks made in GstarCAD in BricsCAD (A little bit at least) and so far almost everything worked. There was some issue with one block but I can't recall at this time. This is another thing I'll test in the future when I have time (and more money hehe).