Question: In this question, you will be writing a simple virus. A virus is a program that can attach itself to other programs, so that when
In this question, you will be writing a simple virus. A virus is a program that can attach itself to
other programs, so that when the other program is run, the virus is also run.
Your simple virus will be a Python script that attaches itself to othersourcecode Python scripts
py files in the same folder. Typically, this is done by searching for other py files on the same
folder, opening each such file, and attaching the virus code to the script if it does not already
contain the virus code As a note, practical viruses often attach to machinecode programs, and
many attach to different macroscript files eg MS Office files
Note: your virus should not reattach itself to a program which already contains the virus!
This question has three parts. During the first two parts well learn how to implement an aspect
of our virus functionality. Then, in part well be ready to construct the entire virus codebase.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
