A m y C R C S A F E T Y I N N U M B E R S --------------------------------- With all the publicity being given to computer "viruses" these days, it is no wonder that a flurry of new, innovative monitor and cure programs have hit both the public domain and commercial markets. Fortunately most, if not all, of these viruses are fairly recognizable and treatable. Most Amiga viruses have been delegated to so-called boot-block viruses which infect and propagate through floppy disk exchanges. But, there is another type of virus which hasn't hit the Amiga community very hard [yet]. This is the Trojan Horse type virus which can conceal itself inside other presumably innocent software. This type of virus can be easily passed along by physical exchange of media, transfer of individual files by either direct copying or modem transfer and by direct contact with other files on a disk or in memory. The potential for infection is high amongst frequent BBS or network information service users who may quite inadvertantly download an infected file. The program may operate exactly as designed or expected, but hidden amongst the code lurks a demon waiting to emerge or replicate. To prevent the spread of Trojan Horse viruses to other files, I have adopted an idea used extensively since the early days of computing. Cyclic Redundancy Checks (CRC) are nothing new. The code has been used in telecommunications software, archiving software and just about anywhere else that data integrity is at risk. Similar programs are available on practically all computer systems. A CRC value is simply a computed number unique to a character, block of data or an entire file. Once the CRC value of a file is known, it is highly unlikely that any change (intentional or otherwise) to that file could go undetected. Even adding or removing a single space (ASCII $20) character anywhere in the file will dramatically alter the CRC value of that file. I do not profess that CRC checks are perfect, only that it is highly unlikely that a virus could go in and alter your files without changing the CRC value and/or the file size. There are several algorithms for computing CRC values and each produces a different, unique number, hence the results of this program may not be the same as that of another CRC program using a different algorithm. AmyCRC uses the popular CRC-CCITT (also known as CRC-16) polynomial x^16+x^12+x^5+x^0, used in programs such as CRCK.COM, yam8, and in typical XModem-CRC functions. AmyCRC is specifically designed to catalog the file sizes and CRC values of individual files, directories or entire devices. AmyCRC has the following syntax: AmyCRC FROM The FROM argument takes a file or directory name using both AmigaDOS (#?) and MS-DOS (*?) style wildcards. If you are cataloging an entire disk you can specify a device name and the program will recursively step through all lower directory levels on the device. The default output goes to the console. You can redirect the output to your printer or to a file for a more permanent CRC record. ex. AmyCRC >prt: FROM AmyCRC >CRC.dat FROM Dumping the data to a file is beneficial when you have a disk that is not expected to change. If you suspect a problem later, run the AmyCRC program again and compare the new CRC data file with the original using a DIFF (difference) type program. When used with multiple files or directories, AmyCRC catalogs the information in ascending alphabetical order (both files and directories), so AmyCRC doubles as an excellent file cataloging program for archival purposes. AmyCRC was written in assembler and should be exactly 1716 bytes long with a CRC value of 920E. It runs extremely fast, clocking in at around 12-13K+ bytes per second (running from ram on my stock Amiga). The ARP library (version 34 or higher) is required for this program to operate. I most certainly hope AmyCRC proves useful to you. Please Note: AmyCRC will break on a CTRL C. However, to speed up the program, it will only break between directories. If you are cataloging a disk: AmyCRC df0:#? and are in the middle of a directory with a lot of entries, it may appear that CTRL C did not work. You just have to wait until that entire directory has finished processing and then the program will break cleanly. By David Czaya contact: PeopleLink -Dave- 3045 South Park Avenue Lackawanna, New York 14218