Hi,
I was asked to go over this block of code and explain what it does. Let me know if this is correct, thank you!
It selects a random EXE file and checks if the first line has the
1234567 signature. If it does it goes to the Subroutine I-executable
loop.
The count starts at 1000, it selects a random-exe file and every s gets changed to an a.
Now count is 999, it selects a random-exe file and deletes the ith line of the file is this case it would delete the 999th line in the file.
Count is decreased to 998 and it does the same things as the previous step and deletes the 998th line in the file.
The count is set to 997. In this step it selects a random-exe file and it executes 997 times. When it reaches zero it exits the loop.
This subroutine is trigger between 10pm to 11pm.
Program V:=
{
1234567;
Subroutine I-executable:=
{
loop: file = random-executable; // select a random executable file
if (first line of file = 1234567)
then goto loop;
else prepend V to file;
}
Sub-routine display-message:=
{
count = 1000;
if (count is 0)
then exit from sub-routine display-message;
else if(count is between 1 to 997)
{
file = random-executable;
execute simultaneously as many occurrences of the file as the value of count;
}
else if(count is 998 or 999)
{
file = random-executable;
delete ith line of file such that i = count;
}
else if(count is 1000)
{
file = random-executable;
change every occurrence of the character s with the character a;
}
count = count -1;
}
Subroutine trigger-pulled:=
{
if (time is between 10pm to 11pm)
then set trigger-pulled to true;
else
set trigger-pulled = false;
}
Main-program:=
{
I-executable;
if (trigger-pulled) then display-message;
goto next;
}
next:
}