Graded Lab 2- Shell Scripts and the WWW
This
Graded Lab is basically a large quiz or a mini-test. This exercise is open book, you may use your class
notes, any handouts I have provided and the textbook. You may not ask me
questions that will provide you with clues or answers to questions. You may ask me questions if you are having
troubles with your system (to include how to attach the file to the e-mail you
need to send me at the end of the lab). You may not talk with your neighbors. Remember the Department of Computer Science’s policy on Academic Dishonesty.
When
you are done with the lab, please e-mail your script to the instructor, cs1970a@classes.csc.lsu.edu.
This
lab is worth 50 points.
Good
luck!
You have been hired by Acme
Corporation as the security officer in charge of their UNIX based machines.
As you’ve been learning about Acme’s
technology, you found that they have a nice e-mail handler that can run any
script. Your security based mind immediately found a great use for such a tool.
You envision being able to e-mail to intruder@acme.com with the subject line
containing the login ID of a possible intruder.
Knowing how important it is to gather
data when an intrusion occurs, you will write a script that the e-mail handler
will call. Your script will take a single argument: a users login ID that will
automatically be pulled from the subject: line by the e-mail handler.
To provide a universal way of
documenting intrusions, your script will generate an HTML page that will show:
This file should be viewable from your
home URL as a file called: intruder_loginID.html (http://classes.csc.lsu.edu/~cs1970xx/intruder_loginID.html)
where loginID is the login ID you passed to the script.
Test your script by hand by calling it
from the command line with your login ID then open up a browser and check your
results.
NOTE: This is not
a CGI type script, you do not have to include the Content-Type: text/html line in your output.