home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 1 / ARM_CLUB_CD.iso / contents / apps / maths / progs / 3dmatrix / !3DMatrix / Resources / ModKill (.txt) < prev    next >
Encoding:
RISC OS BBC BASIC V Source  |  1993-04-14  |  2.4 KB  |  117 lines

  1.      >ModKill
  2.      FREEWARE
  3.      
  4.  Steven Kramer
  5.      Supplied with !3DMatrix
  6.      in the struggle against
  7.      the "module" virus.
  8. $" at line : ";
  9.  block 256,code 512+1024*16,file 400<<10
  10. C%=code
  11.     nc%=0
  12.  "Enter search area ( (R)oot/(S)ystem/(A)DFS/Other ) ? ";
  13.     ok%=
  14.  "S","s"
  15. <root$="scsi::4.$.!System":
  16.  <- ALTER THIS TO YOUR SYSTEM
  17.  "R","r"
  18. 4root$="scsi::4.$":
  19.  <- ALTER THIS TO YOUR SYSTEM
  20.  "A","a"
  21. root$="ADFS:$"
  22.  '"Give the root directory : "root$
  23.  "Search root :"root$'
  24. tree(root$)
  25. "Cured = ";c%
  26. "Not cured = ";nc%
  27. tree(dir$)
  28.  e%,t%
  29.  "OS_GBPB",9,dir$,block,1,e%,256,"*" 
  30.  ,,e$,,e%
  31. e$=dir$+"."+e$
  32.  e%<>-1 
  33.  "OS_File",5,e$ 
  34.  t%,,f%
  35.  (f%>>>8)=&FFFD96 
  36.  e$="CFS#"+e$:
  37.  "OS_File",5,e$ 
  38.  t%,,f%
  39.  (f%>>>8)=&FFFFFA 
  40.  t%=2 
  41.  (f%>>8)=&FFFD96 
  42. :e$="CFS#"+e$
  43. search 
  44.  "***   !INFECTED!   *** ";e$
  45.  len%>400*1024 
  46.  1,"File too large !. DIM some more (file)"
  47.  "OS_File",255,e$,file
  48.  file!4<>l%-&3BC 
  49.  file!8<>l%-&2F4 
  50.  file!12<>l%-&29C 
  51. "Can't cure file "+e$:
  52.  7,7,7,7:nc%+=1 
  53.  c%+=1
  54. file!4=l%-&2FC-file!(l%-12)
  55.  file!(l%-12)=0 
  56.  file!4=0
  57. file!8=l%-&2CC-file!(l%-16)
  58.  file!(l%-16)=0 
  59.  file!8=0
  60. file!12=l%-&278-file!(l%-8)
  61.  file!(l%-8)=0 
  62.  file!12=0
  63.  "OS_File",10,e$,&FFA,,file,file+l%-956
  64. tree(e$)
  65. e$,4)="CFS#" 
  66. e$,5)
  67.  e%=-1
  68. search
  69.  "OS_File",5,e$ 
  70.  ,,,,len%
  71. l%=(len%+3)
  72.  12,3,B%,file,16
  73. Q8=(file!4=l%-&3BC 
  74.  file!8=l%-&2F4 
  75.  file!12=l%-&29C)
  76. fullsearch
  77.  B%=0 
  78. "Couldn't open : ";:=0
  79.  C%)<>0)
  80.  opt%=0 
  81. P%=code
  82. [OPT opt%
  83. MOV R0,#4
  84. ADR R2,buf
  85. MOV R3,#1024*16
  86. SWI "OS_GBPB"
  87. RSB R3,R3,#1024*16
  88. SUBS R3,R3,#16
  89. BGT notsmall
  90. MOV R0,#0
  91. SWI "OS_Find"
  92. MOV R0,#0
  93. MOV PC,R14
  94. .notsmall
  95. ADR R5,buf
  96. .nextaddr
  97. ADR R4,seq
  98. MOV R6,#15
  99. .checkit
  100. LDRB R7,[R4,R6]
  101. LDRB R8,[R5,R6]
  102. CMP R7,R8
  103. BNE next
  104. SUBS R6,R6,#1
  105. BPL checkit
  106. MOV R0,#0
  107. SWI "OS_Find"
  108. MOV R0,#1
  109. MOV PC,R14
  110. v    .next
  111. ADD R5,R5,#1
  112. SUBS R3,R3,#1
  113. BNE nextaddr
  114. B code
  115. |?EQUD &8D8A90A6:EQUD &92909CDF:EQUD &9A8B8A8F:EQUD &9E97DF8D
  116. }!EQUD &DF978B96:EQUD &9A939396
  117.