Project 4: Simple Programming (15 points)

What You Need

  1. A Kali Linux 2.0 machine, real or virtual (any other Linux version should work, too)
  2. You will find it helpful to refer to the Chapter 3 notes
  3. 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: Capture a whole-desktop image and save it as "Proj 4a".

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: Capture a whole-desktop image and save it as "Proj 4b".

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: Capture a whole-desktop image and save it as "Proj 4c".

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 4 From YOUR NAME", replacing "YOUR NAME" with your real name.

Send a Cc to yourself.

Last Modified: 9-15-15