You are on page 1of 1

CIT 383 Scripting 1

Fall 2021

Final

Project

Instructions:
You are required to complete the following task within two days of its release. The instructions
for submission, etc. are provided towards the end of this.

Question:
You are the systems’ administrator for a company and have been informed of several security
concerns about some Python scripts that the company uses for user management, etc. The files
have been infected by a virus. Each of the files infected contains at least one function. The virus
has modified the files by 1) inserting a Python function named “def kill_the_processor()” just
after the imports section of each file and 2) moving them to a subdirectory of the current
user’s home directory. The actual subdirectory name was chosen at random. You may assume
that there are no other subdirectories that contain Python scripts.

Your task is to write a Python script that performs the following tasks:
a. Identify the subdirectory of the current user’s home directory to which the files have
been moved by the virus 20 marks
b. Determine the names of the infected files 20 marks
c. Transfer the infected files back to the home directory of the current user, limiting access
to these files to only users with sudo privileges. 20 marks
d. Send an email containing the list of files to your direct supervisor, assuming that your
supervisor’s email address is sebklearning@gmail.com. The information about the files
should be presented as an HTML table containing the following columns: file name, file
size (in bytes), the previous file location (from a). Remember to cc yourself when you
send the email. 40 marks
e. Save the same information required for question d. to a CSV file named
your_nku_username_infected.csv 15 marks
f. Print the names of the files infected to the console. 10 marks

Make sure to use at least 4 functions for this task. (15 marks) Also make sure to comment your
code (10 marks) Your script should not request any inputs from the user. You may use any of
the libraries discussed/used during the semester for this assignment.

What to submit: A python script that contains she solution to the problem. The script should be
labelled your_nku_username_CIT383_final.py

You might also like