home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware 1 2 the Maxx
/
sw_1.zip
/
sw_1
/
VIRUS
/
VIRLIST1.ZIP
/
VIRLIST.H
< prev
next >
Wrap
Text File
|
1992-04-30
|
3KB
|
86 lines
/************************************************
* Virlist Header File with program definitions *
* Required with VIRLIST.C V1.0 source code. */
************************************************/
char buffer[1024]; /* input buffer */
#define bool unsigned char
/* include complete directory for location of text file */
#define VIRLIST_FILE "virlist.txt"
/* program option flags */
bool boot, data, format, links, ops, program;
bool variable;
bool flags[10] = {0,0,0,0,0,0,0,0,0,0};
/* Record storing virus list entry */
struct virEntry
{
char name[27]; /* Virus name */
char disinfector[10]; /* Disinfecting program */
bool codes[10]; /* Characteristic codes */
long size; /* Size of virus if appropriate */
/* Damage codes */
bool boot, /* Corrupts or overwrites the boot sector */
data, /* Corrupts data files */
format, /* Formats or overwrites all/part of disk */
links, /* Directly or indirectly corrupts file linkage */
ops, /* Affects system run-time operation */
program; /* Corrupts program or overlay files */
} virus;
#define MSG_NUM 18 /* Number of messages */
char *messages [MSG_NUM] = {
"-------------------------------------------------------------------------",
"B - Corrupts or overwrites the boot sector",
"C - Corrupts program or overlay files",
"D - Corrupts data files",
"F - Formats or overwrites all/part of disk",
"L - Directly or indirectly corrupts file linkage",
"O - Affects system run-time operation",
"P - Infects Fixed Disk Partition Table (MBR)",
"V - Variable sized file infections",
"1 - Virus Uses STEALTH Techniques",
"2 - Virus Uses Self-Encryption",
"3 - Virus Installs Self in Memory",
"4 - Infects COMMAND.COM",
"5 - Infects COM files",
"6 - Infects EXE Files",
"7 - Infects Overlay Files",
"8 - Infects Floppy Diskette Boot",
"9 - Infects Fixed Disk Boot Sector"
};
/* Function prototypes */
void CheckArgs(), Help(), Legend(), SkipHeader(), PrintRecord();
int GetRecord();
/* Initialization Macros for CheckArgs() */
#define SetField(FIELD, MSG_N) FIELD = 1;\
printf("\t%s\n", messages[MSG_N]); break
#define SetFlag(FIELD, MSG_N) flags[FIELD-1] = 1;\
printf("\t%s\n", messages[MSG_N]); break
/* Macros for GetRecord function */
#define Copy(FIELD, LEN) strncpy(virus.FIELD, buf, LEN);\
virus.FIELD[LEN] = 0
#define Damage(FIELD) if (FIELD) match++;\
virus.FIELD = 1; break