home *** CD-ROM | disk | FTP | other *** search
/ The Unsorted BBS Collection / thegreatunsorted.tar / thegreatunsorted / programming / misc_programming / MAIN / UPLOAD / TBWEEDER.DOC < prev   
Encoding:
Text File  |  1994-03-17  |  10.5 KB  |  249 lines

  1.  
  2.  
  3. What is TbWeeder,
  4. Revised By Falcon 3/15/94. Read the entire document before proceeding.
  5. ----------------
  6.  
  7. TbWeeder is a utility to weed out duplicate files.
  8.  
  9. Virus researchers and collectors often receive large virus collections which
  10. contain many duplicate files. Not all anti-virus vendors use the same virus
  11. naming conventions, and often a virus sample is renamed to match to the
  12. name printed by the scanner used to identify the virus. These renamed
  13. files are copied into other collections, causing many renamed but equal
  14. files floating around in all kind of virus collections.
  15.  
  16. TbWeeder can help to identify duplicate files, and automatically delete them.
  17.  
  18. Duplicate files are files with the same 32-bit CRC and length. To be
  19. absolutely sure, TbWeeder will perform a full match - byte by byte - of 
  20. the files if both files are available.
  21.  
  22. TbWeeder can also maintain a database so it is not necessary to rescan
  23. all files over and over again to search for duplicates. however it must be noted
  24. that the files dirs listed in the .lst files may not match. I recommend a batch
  25. file (more about that later) be run on each dir after placing the files in 
  26. their proper dirs (alpha or Family etc) (from the NEWVIRS dir indicated below)
  27.  
  28.  
  29. Interesting features
  30. --------------------
  31.  
  32. -   The amount of files TbWeeder can handle is 65534
  33.  
  34. -   TbWeeder can optionally delete duplicate files
  35.  
  36. -   TbWeeder can be used to compare and weed files from one path against
  37.     another path, but also to compare and weed within a single path.
  38.  
  39. -   TbWeeder accepts filename specifications, so it can be used to
  40.     check just one file against a huge collection.
  41.  
  42. -   TbWeeder can maintain two databases, one for the CRC and length
  43.     information, another one for the names of the files in the database.
  44.     To weed out remotely, the relatively small CRC database is sufficient.
  45.  
  46. -   TbWeeder is able to compare files byte for byte for additional security.
  47.  
  48. -   TbWeeder is able to output a report file with all duplicate files.
  49.  
  50. -   TbWeeder is very fast (due to a 128Kb hash table and nifty linked lists!).
  51.  
  52. -   TbWeeder however is not network aware, you must bring down a your network
  53.     if you are running one prior to execution.
  54.  
  55. Intended purpose
  56. ----------------
  57.  
  58. Example 1:
  59. Suppose you have a virus collection in directory C:\MYVIRS with viruses
  60. sorted out. In directory C:\NEWVIRUS you receive new virus samples.
  61. Enter:
  62.     TbWeeder c:\MyVirs /add
  63. This causes TbWeeder to generate a database with file information.
  64. To find out which viruses in directory C:\NEWVIRS are duplicates, execute:
  65.     TbWeeder c:\NewVirs
  66. You can optionally put all duplicate files in a log file by using option /log
  67. or automatically delete the duplicates by using option /del.
  68.  
  69. Example 2:
  70. Suppose you have a directory VIRUSES and you want to delete all duplicates.
  71. Enter:
  72.     TbWeeder Viruses /add /del
  73. This causes TbWeeder to build a database and delete duplicate files at the
  74. same time!
  75.  
  76. Example 3:
  77. Suppose you want to know whether viruses from someone else's collection
  78. are the same ones you have or rather if he s got any you dont have. Run 
  79. TbWeeder on your own collection (see below for examples).
  80. and distribute TbWeeder.exe and your TbWeeder.Dat file and these docs to the
  81. owmer of the other collection. TbWeeder can now be used to see if they have
  82. any files you don't have. mabey they'd exchange some of them for some you
  83. have that they don't have.
  84.  
  85.  
  86. The database (tbweeder.lst)
  87. ------------
  88.  
  89. TbWeeder can only be used with an external database, due to the excessive
  90. amount of data it has to handle when comparing a file against 65000 others!
  91.  
  92. TbWeeder.Dat will contain the 32-bit CRC and length of all files. This
  93. information is usually sufficient to find out whether a file is a duplicate
  94. or not. To become completely sure, TbWeeder can also perform a byte for byte
  95. comparison after it thinks that two files are identical. However, in this
  96. case TbWeeder needs the name of the original file and of course the original
  97. file itself. Therefore TbWeeder will also maintain a name reference, named
  98. TbWeeder.Lst. This file can become quite large, several megabytes is not
  99. unusual. If you don't want these extended features, you can save disk
  100. space by specifying option /noname.
  101.  
  102. Since TbWeeder.Lst will become very large and will only be necessary to
  103. list the name of the first - original - file and to perform a byte by byte
  104. match,(assuming you have the other parties files you may choose not to
  105. distribute this file to others. It can however be useful to distribute the
  106. other file, TbWeeder.Dat, to others, to weed out file remotely 
  107. to avoid that people send you files you already have). The maximum size 
  108. of TbWeeder.Dat is 512Kb (with over 65000 files!).
  109.  
  110.  
  111. Usage
  112. -----
  113.  
  114. Usage:
  115.         TbWeeder [<path>][<filename>] [<options>...]
  116.  
  117. If no options are specified, the specified path will be scanned for
  118. duplicate files. TbWeeder will compare these files against the files
  119. in the TbWeeder.Dat database, and against the files in the specified
  120. path itself.
  121.  
  122. #-> IF THERE IS NOT ALREADY A DATABASE YOU NEED TO SPECIFY OPTION /ADD
  123.  
  124. Command line options (abbreviations between brackets).
  125.     help    (h)     displays a help file.
  126.  
  127.     nosub   (s)     do not process sub directories.
  128.  
  129.     add     (a)     The files which have been found to be unique will
  130.                     be stored in the database files.
  131.  
  132.     del     (d)     delete duplicate files.
  133.  
  134.     noname  (n)     do not create or consult the large name reference
  135.                     database. This will disable the full byte by byte
  136.                     comparison as well.
  137.  
  138.     log     (l)     log duplicate files
  139.  
  140. To use tbweeder to check for files that you have your friend might be
  141. interested in  using your collection of files against another
  142. collection's tbweeder.dat, you can follow the following example, Please do
  143. the following:
  144.  
  145. In this section copy means to create an additional complete copy of your files.
  146. This program is going to delete files in the dirs specified.
  147.  
  148. 1. -Copy- or unzip All of your .EXE and .COM virus files into a 
  149.     directory. (or you can have them in separate dirs if you like)
  150.    (Lets say you copy them into a directory called c:\virus
  151.     (or live123,livea-b,livec-d,livee-f,liveg-h etc). leaving your files 
  152.     intact. Use these backup dir(S) for your proccessing.
  153.     (for an example see the 1st batch file below if you have separate dirs)
  154.  
  155.  2. Copy the TBWEEDER.EXE and the OTHER persons TBWEEDER.DAT file into A
  156.    directory  (lets say c:\tbweeder) (making sure your tbweeder.dat if you have one already 
  157.    file is safely moved to a backup dir).
  158.  
  159. 3. Go to the TBWEEDER directory and type  TBWEEDER c:\virus(or filenames) /del
  160.  
  161. This could delete the bulk of the files  (if its a large .dat
  162. collection) these deleted files represent the files the other collection
  163. all ready has. Leaving the files that the other collection does not have in it.
  164. Now you can zip these files that are left  and send them to that person
  165. if you desire to upgrade his collection with all the files you have that
  166. he doe's not have . In the case of multiple dirs just repeat steps for each dir
  167. Example
  168.  
  169. c:\tbweeder
  170. tbweeder d:\live123 /del
  171. tbweeder d:\livea-b /del
  172. tbweeder d:\livec-d /del
  173. tbweeder d:\livee-f /del
  174. tbweeder d:\liveg-h /del
  175. tbweeder d:\livei-j /del
  176. tbweeder d:\livek-l /del
  177. tbweeder d:\livem-n /del
  178. tbweeder d:\liveo-p /del
  179. tbweeder d:\liveq-s /del
  180. tbweeder d:\livet-u /del
  181. tbweeder d:\livev /del
  182. tbweeder d:\livew-x /del
  183. tbweeder d:\livey-z /del
  184. tbweeder d:\unscans /del
  185.  
  186. If you do this Its possible that he would do the same for you.
  187.  
  188. Now destroy his tbweeder.dat file and recopy your backup .dat file into 
  189. the tbweeder dir. 
  190.  
  191. If you want to clean your files from dupes just run it on all of your
  192. directorys TBWEEDER d:\yourvirusdir#1 /add /delete
  193. Example batch (if in seperate dirs)
  194. d:\
  195. del tbweeder.dat               :   The following is in this batch file because
  196. del tbweeder.lst               :   you absolutely do not want to run the
  197. cd tbweeder                    :   the tbweeder program twice on the same dirs
  198. copy tbweeder.dat d:\          :   without having first deleted the .dat file 
  199. copy tbweeder.lst d:\          :   WHY?    IT'LL DELETE ALL OF YOUR FILES!!!
  200. del tbweeder.dat               :   I put in a backup .dat just in case it
  201. del tbweeder.lst               :   were to get corupted.
  202. tbweeder d:\live123 /add /del
  203. tbweeder d:\livea-b /add /del
  204. tbweeder d:\livec-d /add /del
  205. tbweeder d:\livee-f /add /del
  206. tbweeder d:\liveg-h /add /del
  207. tbweeder d:\livei-j /add /del
  208. tbweeder d:\livek-l /add /del
  209. tbweeder d:\livem-n /add /del
  210. tbweeder d:\liveo-p /add /del
  211. tbweeder d:\liveq-s /add /del
  212. tbweeder d:\livet-u /add /del
  213. tbweeder d:\livev /add /del
  214. tbweeder d:\livew-x /add /del
  215. tbweeder d:\livey-z /add /del
  216. tbweeder d:\unscans /add /del
  217.  
  218. This will create a clean dat file and .lst file showing exactly where your 
  219. files are located.
  220.  
  221. OR after you have your .DAT file made you can clean dupes in your directorys
  222. by The same process and the batch as shown will delete the old .dat file
  223. prior to running and save a backup copy of the .dat file and then run the dupe
  224. check process.
  225.  
  226. IF you get a collection in from someone else you can unzip them into a
  227. directory called c:\newvirus  and type TBWEEDER c:\newvirus /DEL
  228. (using your current .dat file). This will delete all of the newfiles
  229. that you already have.  Leaving only the files that you do not have in your 
  230. collection. You can then run your scanners on them and move them to the 
  231. proper dirs where they are to reside and then you type the above batch file
  232. again. (it only takes a few minutes mabey 5 or 10 at the most.) .As stated in 
  233. the last paragraph you may omit the /del switch at this point. To creat
  234. a clean .dat file and .lst file.
  235.  
  236. This program does not support NETWORKS so bring your net down before
  237. executing this program. also it doesn't work if you put the other collections
  238. .lst file in your tbweeder dir. You can use the /noname option and generate
  239. a simple .dat file to deliver to you r friends, but some have reported error
  240. using this method.
  241.  
  242. The Original Docs in the program suck. So I wrote this to help you understand
  243. this little known program better, it is a VERY powerful program and we 
  244. encourage its use and distribution. We use it regularly. 
  245.  
  246. WE ALso encourage the exchange of virus and are here to exchange with you
  247. if you desire. We will also give you better access on our research
  248. bbs as a major contributor. You know were we can be contacted. (anywhere
  249. critters can be found)  ttyl