home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS 1992 September / Simtel20_Sept92.cdr / msdos / trojanpr / filetest.arc / FILETEST.DOC < prev    next >
Text File  |  1988-03-13  |  7KB  |  149 lines

  1.                             FILETEST
  2.  
  3.                           L« P« Levine
  4.                          MarcΦ 13¼ 1988
  5.  
  6. FILETES╘ i≤ ß prograφ t∩ hel≡ detec⌠ wheε file≤ havσ beeε ì
  7. corrupted«  FILETES╘ use≤ ß lis⌠ oµ al∞ thσ file≤ oε thσ defaul⌠ ì
  8. drivσ whicΦ thσ use≥ wishe≤ t∩ tracσ (FILETEST.FIL⌐ and¼ wheε ruε ì
  9. fo≥ thσ firs⌠ time¼ produce≤ aε origina∞ lis⌠ (FILETEST.OLD⌐ oµ ì
  10. thosσ file≤ alonτ witΦ creatioε date¼ filσ size¼ anΣ ß CR├ ì
  11. (cycliπ redundanc∙ check⌐ fo≥ eacΦ sucΦ file«  Wheε FILETES╘ i≤ ì
  12. ruε agaiε ß ne≈ lis⌠ (FILETEST.NEW⌐ i≤ prepareΣ anΣ compareΣ witΦ ì
  13. thσ olΣ list«  Fo≥ an∙ file¼ i⌠ i≤ possiblσ that:
  14.  
  15. 1⌐   Thσ filσ i≤ completel∙ unchangeΣ froφ thσ previou≤ time«  ì
  16. Thσ filσ namσ (anΣ director∙ entry⌐ arσ thσ samσ a⌠ thσ tw∩ ì
  17. times¼ anΣ i⌠ ha≤ no⌠ beeε modified«  Onl∙ ß coun⌠ oµ sucΦ file≤ ì
  18. wil∞ bσ shown¼ iµ ß repor⌠ i≤ printed.
  19.  
  20. 2⌐   Thσ filσ ha≤ beeε modifieΣ iε thσ norma∞ manner¼ s∩ tha⌠ thσ ì
  21. director∙ entr∙ ha≤ ß ne≈ timσ oµ creation«  File≤ oµ thi≤ sor⌠ ì
  22. arσ counteΣ anΣ ß postinτ t∩ thσ screeε i≤ made«  Yo⌡ shoulΣ bσ ì
  23. awarσ oµ sucΦ filσ alterations.
  24.  
  25. 3⌐   Thσ filσ ha≤ beeε deleteΣ sincσ thσ las⌠ timσ FILETES╘ wa≤ ì
  26. run«  File≤ oµ thi≤ sor⌠ arσ counteΣ anΣ ß postinτ t∩ thσ screeε ì
  27. i≤ made«  Thi≤ shoulΣ onl∙ occu≥ wheε ß changσ ha≤ beeε madσ iε ì
  28. thσ FILETEST.FIL«  
  29.  
  30. 4⌐   ┴ ne≈ filσ ha≤ appeareΣ tha⌠ wa≤ no⌠ oε thσ disδ a⌠ thσ timσ ì
  31. oµ thσ previou≤ ruε oµ FILETEST«  File≤ oµ thi≤ sor⌠ arσ counteΣ ì
  32. anΣ ß postinτ t∩ thσ screeε i≤ made«  Thi≤ shoulΣ onl∙ occu≥ wheε ì
  33. ß changσ ha≤ beeε madσ iε thσ FILETEST.FI╠«  
  34.  
  35. 5⌐   Thσ director∙ entr∙ fo≥ ß filσ i≤ thσ samσ fo≥ botΦ oµ thσ ì
  36. time≤ thσ prograφ wa≤ run¼ bu⌠ thσ filσ wa≤ modifieΣ iε somσ way«  ì
  37. Thi≤ shoulΣ no⌠ occu≥ iε norma∞ practice¼ s∩ thσ prograφ write≤ ß ì
  38. specia∞ alarφ messagσ t∩ thσ terminal«  Thi≤ caε occu≥ wheε yo⌡ ì
  39. usσ NORTO╬ UTILITIES¼ o≥ othe≥ sucΦ program≤ t∩ modif∙ thσ disδ ì
  40. directly¼ bypassinτ thσ norma∞ DO╙ handlinτ oµ thσ files«  I⌠ ì
  41. als∩ caε happeε wheε trojaε horsσ program≤ 'ruε wildº (thi≤ i≤ ì
  42. wha⌠ prompteΣ mσ t∩ writσ thi≤ prograφ iε thσ firs⌠ place).
  43.  
  44. Runninτ thσ prograφ beforσ eacΦ systeφ shutdowε wil∞ hel≡ t∩ ì
  45. assurσ yo⌡ tha⌠ yo⌡ arσ no⌠ continuinτ t∩ ruε witΦ systeφ file≤ ì
  46. tha⌠ havσ beeε corrupted«  Also¼ iε prograφ development¼ runninτ ì
  47. thσ prograφ beforσ anΣ afte≥ ß tes⌠ ruε oµ somσ unknowε prograφ ì
  48. caε hel≡ assurσ yo⌡ tha⌠ thσ tes⌠ prograφ ha≤ no⌠ messeΣ u≡ ì
  49. importan⌠ file≤ oε thσ disk.
  50.  
  51. (Thi≤ prograφ grou≡ i≤ ß mino≥ rewritσ oµ ß pai≥ oµ program≤ ì
  52. calleΣ FILECR├ anΣ COMPAR┼ writteε b∙ TeΣ H« Emigh«  Dr« Emigh'≤ ì
  53. program≤ tes⌠ thσ entirσ harΣ disk¼ rathe≥ thaε onl∙ selecteΣ ì
  54. files¼ anΣ thu≤ takσ man∙ minute≤ t∩ run«  Thi≤ documen⌠ i≤ ß ì
  55. rewritσ oµ hi≤ documentation«  Thσ majo≥ differencσ betweeε hi≤ ìèanΣ m∙ prograφ group≤ i≤ iε thσ increaseΣ speeΣ oµ execution¼ anΣ ì
  56. iε thσ decreasσ iε thσ sizσ oµ thσ reports¼ permittinτ m∙ prograφ ì
  57. t∩ bσ ruε witΦ eacΦ shutdown«  Dr« Emigh'≤ program≤ anΣ ì
  58. documentatioε arσ includeΣ witΦ thi≤ package¼ permittinτ thσ use≥ ì
  59. t∩ seσ ho≈ littlσ worδ ╔ havσ donσ iε thσ modificatioε anΣ ì
  60. permittinτ thσ use≥ t∩ ruε hi≤ grou≡ wheε thσ longe≥ stud∙ timσ ì
  61. i≤ calleΣ for.)
  62.  
  63. RUNNING FILETEST
  64.  
  65. There are six files associated with FILETEST:
  66. FILETEST.BAT -- The main batcΦ program.
  67. FILEREAD.COM -- The prograφ tha⌠ check≤ thσ CRCs.
  68. FILECOMP.COM -- A comparison program.
  69. FILETEST.FI╠ -¡ Thσ lis⌠ oµ file≤ t∩ bσ tested.
  70. FILETEST.OL─ -¡ Thσ olΣ lis⌠ oµ CRC≤.
  71. FILETEST.NE╫ -¡ Thσ ne≈ lis⌠ oµ CRCs.
  72.  
  73. FILETEST.BA╘ firs⌠ call≤ FILEREAD«  FILEREA─ i≤ ruε withou⌠ ì
  74. commanΣ linσ parameter≤ (althougΦ outpu⌠ redirectioε i≤ ì
  75. permitted)«  I⌠ wil∞ reaΣ FILETEST.FI╠ anΣ wil∞ creatσ ì
  76. FILETEST.NE╫ (o≥ FILETEST.OL─ iµ tha⌠ filσ doe≤ no⌠ exis⌠ iε thσ ì
  77. defaul⌠ directory)¼ whicΦ i≤ ß lis⌠ oµ al∞ thσ file≤ thσ use≥ ì
  78. wisheΣ t∩ tes⌠ iε an∙ directory«  (FILEREA─ display≤ thσ ì
  79. director∙ anΣ filσ name≤ a≤ i⌠ goe≤ througΦ them¼ wheε compileΣ ì
  80. anΣ ruε iε diagnostiπ mode.⌐  FILETEST.BA╘ wil∞ theε cal∞ ì
  81. FILECOMP¼ whicΦ wil∞ comparσ thσ file≤ iε FILETEST.NE╫ witΦ thosσ ì
  82. iε FILETEST.OLD¼ notinτ an∙ differences«  Wheε FILECOMP i≤ ì
  83. finished¼ ß repor⌠ i≤ madσ onl∙ iµ difference≤ appea≥ anΣ thσ ì
  84. use≥ i≤ prompteΣ t∩ replacσ FILETEST.OL─ witΦ FILETEST.NEW.
  85.  
  86. An∙ file≤ created¼ deleted¼ o≥ normall∙ altereΣ sincσ thσ ì
  87. previou≤ timσ FILETES╘ wa≤ ruε wil∞ bσ listeΣ t∩ thσ screen«  An∙ ì
  88. file≤ tha⌠ havσ beeε modifieΣ iε ß "NO╬ DOSó manne≥ wil∞ bσ ì
  89. listeΣ t∩ thσ screeε¼ highlighted.
  90.  
  91.  
  92. PROGRAMMING NOTES
  93.  
  94.  
  95. FILETES╘ i≤ writteε usinτ Turb∩ Pascal¼ Versioε 3.░ fo≥ MSDOS«  ì
  96. I⌠ ha≤ beeε testeΣ oε ß nonamσ A╘ anΣ ß ZenitΦ P├ usinτ DO╙ 3.3«  ì
  97. Thi≤ prograφ i≤ no⌠ mean⌠ t∩ represen⌠ thσ epitomσ oµ programminτ ì
  98. skill¼ bu⌠ i⌠ works«  An∙ improvement≤ anΣ suggestion≤ arσ ì
  99. welcome«  
  100.  
  101. FILETES╘ wil∞ worδ witΦ an∙ numbe≥ oµ file≤ o≥ directories«  A≤ ì
  102. written¼ FILECOM╨ ha≤ ß maximuφ oµ 20░ directorie≤ anΣ 180░ file≤ ì
  103. witΦ an∙ numbe≥ oµ file≤ withiε an∙ particula≥ directory«  Thσ ì
  104. maximuφ lengtΦ oµ thσ director∙ namσ strinτ i≤ 6┤ characters«  ╔ ì
  105. havσ useΣ thσ prograφ oε subdirectorie≤ u≡ t∩ 1░ level≤ dee≡ ì
  106. withou⌠ an∙ problems«  Thesσ value≤ fo≥ thσ numbe≥ oµ directorie≤ ì
  107. anΣ thσ numbe≥ oµ file≤ use≤ u≡ jus⌠ abou⌠ a≤ mucΦ memor∙ a≤ ì
  108. TURB╧ Pasca∞ allows¼ s∩ aε increasσ iε thesσ number≤ woulΣ ì
  109. necessitatσ ß redesigε oµ thσ program«  FILETES╘ read≤ filename≤ ìèfroφ FILETEST.FI╠ anΣ searche≤ onl∙ a≤ fa≥ a≤ needeΣ t∩ completσ ì
  110. comparison≤ oµ tha⌠ list«  
  111.  
  112. FILETEST.FI╠ i≤ aε ASCI╔ lis⌠ oµ eacΦ oµ thσ file≤ thσ use≥ ì
  113. wishe≤ traced«  Ful∞ pathname≤ anΣ uppe≥ casσ arσ requireΣ ì
  114. (i.e.C:\WS\WS.EXE)«  Sincσ FILEREA─ wil∞ tracσ thσ director∙ ì
  115. treσ unti∞ FILETEST.FI╠ i≤ satisfied¼ thσ inclusioε oµ ß ì
  116. nonexisten⌠ filσ wil∞ seriousl∙ affec⌠ executioε speed«  SucΦ ì
  117. file≤ arσ listeΣ wheε FILEREA─ terminates«  SpeeΣ wil∞ als∩ bσ ì
  118. enhanceΣ iµ thσ file≤ t∩ bσ testeΣ arσ iε directorie≤ tha⌠ arσ ì
  119. earl∙ iε thσ tree«  Iµ thσ filσ 'C:\?º i≤ includeΣ a≤ thσ firs⌠ ì
  120. filσ iε FILETEST.FIL¼ ß diagnostiπ listinτ oµ thσ file≤ testeΣ ì
  121. wil∞ bσ displayeΣ a≤ thσ prograφ i≤ run«  Iµ neithe≥ oµ thσ ì
  122. condition≤ discusseΣ abovσ i≤ presen⌠ (nonexistan⌠ file≤ o≥ thσ ì
  123. filσ C:\?⌐ FILEREA─ wil∞ ruε silently.
  124.  
  125. Specia∞ thank≤ g∩ t∩ DaviΣ Dantowit· oµ Digita∞ Equipmen⌠ ì
  126. Corporatioε (Dantowitz%eagle1.dec@decwrl⌐ fo≥ providinτ thσ CR├ ì
  127. routine≤ (generate_table_25╢ anΣ crc_string_256⌐ anΣ thσ routine≤ ì
  128. fo≥ gettinτ ß director∙ (get_DTA¼ set_DTA¼ find_first¼ anΣ ì
  129. find_next)«  Oµ course¼ hσ take≤ n∩ responsibilit∙ fo≥ thσ wa∙ ╔ ì
  130. useΣ hi≤ code«  ┴ discussioε oµ thσ CR├ i≤ showε iε thσ listinτ ì
  131. oµ FILEREAD.PA╙ anΣ FILECRC.PAS.
  132.  
  133. Simila≥ thank≤ goe≤ t∩ TeΣ ╚ Emigh¼ (Departmen⌠ oµ Genetics¼ ì
  134. NortΦ Carolinß Statσ University¼ Bo° 7614¼ Raleigh¼ N├ 2769╡-ì
  135. 7614¼ emigh@ncsugn.uucp¼ NEMIGH@TUCC.BITNET⌐ whosσ FILECR├ ì
  136. packagσ form≤ thσ bulδ oµ thi≤ work«  Oµ course¼ hσ take≤ n∩ ì
  137. responsibilit∙ eithe≥ fo≥ thσ wa∙ ╔ useΣ hi≤ code.
  138.  
  139. Leε Levine
  140. Departmen⌠ oµ Electrica∞ Engineerinτ anΣ Compute≥ Science
  141. Universit∙ oµ Wisconsin-Milwaukee
  142. P╧ Bo° 785
  143. Milwaukee¼ W╔ 53201
  144.  
  145. len@evax.milw.wisc.edu
  146. (414⌐ 229-517░ worδ  
  147. (414⌐ 962-471╣ home
  148.  
  149.