This commit is contained in:
Jakub Stefko 2021-01-23 13:55:42 +01:00
parent c5d3446d5b
commit 6c55f100f0
2 changed files with 58 additions and 1 deletions

57
9/1.c Normal file
View File

@ -0,0 +1,57 @@
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;
}

View File

@ -1 +1 @@
M:office.com:ofice.com
M:83.23.224.229:st.amu.edu.pl