Project 5x: Simple Programming (15 pts. extra credit)
What You Need
- A Kali Linux 2.0 machine, real or virtual (any other Linux version should work, too)
- You will find it helpful to refer to the
Chapter
3 notes
- I put some example programs
here.
Bash Script for IP Address (5 pts.)
Make a Bash script that prints out your
machine's IPv4 addresses only, with no other
information, as shown below.
Capturing a Screen Image
Make sure these required items are visible:
- A cat of your program, with a filename
containing "Your Name", not the literal text
YOURNAME, and beginning with /bin/bash
- A sample run of your program, showing IPv4
addresses only, as shown above.
Capture a whole-desktop image and save it as
"Proj 5xa".
YOU MUST SEND IN A WHOLE-DESKTOP IMAGE FOR FULL CREDIT
Python Script for Port Scanning (5 pts.)
Make a Python script that
scans these three ports: 22, 80, and 443
as shown below.
Hints:
1. The port-scanning script in the textbook
works for URLs as well as IP addresses.
2. The script in the textbook has an error,
as discussed in class--the port must be
an integer, not a string. A working script
is in the Chapter
3 notes.
Capturing a Screen Image
Make sure these required items are visible:
- A cat of your program, with a filename
containing "Your Name", not the literal text
YOURNAME, and beginning with /usr/bin/python
- A sample run of your program on the URL
scanme.nmap.org, showing
which ports are open, as shown above.
Capture a whole-desktop image and save it as
"Proj 5xb".
YOU MUST SEND IN A WHOLE-DESKTOP IMAGE FOR FULL CREDIT
C Program for First and Last Name (5 pts.)
Make a C program that takes two command-line
arguments: firstname and lastname, and then says
hello. If it does not get both arguments, it should
print a usage message,
as shown below.
Capturing a Screen Image
Make sure these required items are visible:
- A cat of your program, with a filename
containing "Your Name", not the literal text
YOURNAME, and beginning with int main(int argc, char *argv[])
- A run of your program with only one argument, showing the usage message, as shown above.
- A run of your program with two arguments, showing the hello message, as shown above.
Capture a whole-desktop image and save it as
"Proj 5xc".
YOU MUST SEND IN A WHOLE-DESKTOP IMAGE FOR FULL CREDIT
Turning in Your Project
Email the images to cnit.124@gmail.com with a subject line of "Proj 5x From YOUR NAME", replacing "YOUR NAME" with your real name.
Send a Cc to yourself.
Last Modified: 9-15-15