58 lines
1023 B
C
58 lines
1023 B
C
![]() |
VIRUSNAME_PREFIX("ClamAV.BCC.SandBox")
|
||
|
VIRUSNAMES("DNWA")
|
||
|
TARGET(0)
|
||
|
PRECLASS_HOOK_DECLARE
|
||
|
FUNCTIONALITY_LEVEL_MIN(FUNC_LEVEL_098_7)
|
||
|
|
||
|
int entrypoint (void)
|
||
|
{
|
||
|
int beforeNumber = 0;
|
||
|
char line[256];
|
||
|
FILE *fp;
|
||
|
|
||
|
if ((fp = fopen("input.txt", "r")) == NULL) {
|
||
|
printf("ERROR - cannot open input file");
|
||
|
return 1;
|
||
|
}
|
||
|
|
||
|
while (ReadLine(line, 256, fp)) {
|
||
|
if (line == '5') {
|
||
|
beforeNumber = 5;
|
||
|
}
|
||
|
if (line == '8') {
|
||
|
if (beforeNumber == 5) {
|
||
|
beforeNumber = 8;
|
||
|
} else {
|
||
|
beforeNumber = 0;
|
||
|
}
|
||
|
}
|
||
|
if (line == '13') {
|
||
|
if (beforeNumber == 8) {
|
||
|
beforeNumber = 13;
|
||
|
} else {
|
||
|
beforeNumber = 0;
|
||
|
}
|
||
|
}
|
||
|
if (line == '21') {
|
||
|
if (beforeNumber == 13) {
|
||
|
beforeNumber = 21;
|
||
|
} else {
|
||
|
beforeNumber = 0;
|
||
|
}
|
||
|
}
|
||
|
if (line == '34') {
|
||
|
if (beforeNumber == 21) {
|
||
|
beforeNumber = 34;
|
||
|
break;
|
||
|
} else {
|
||
|
beforeNumber = 0;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
if (beforeNumber == 34) foundVirus("DNWA");
|
||
|
|
||
|
return 0;
|
||
|
}
|