1) What Is a CVE

Total Page:16

File Type:pdf, Size:1020Kb

1) What Is a CVE

COMP075 Operating Systems 2 Lab 4

Due: The day of the next lab. October 19

Resources:

Power Shell examples from the lecture.

Activities:

Students are to duplicate lab 3, but this time using powershell.

The entire lab can be accomplished in a pipeline, without writing a script, but the command line will be very long. In my tests I broke the task into three stages. For yur final test, run the entire pipeline in one piece.

The first stage used gc and sls to get the records from the log containing Inext-DROP- DEFLT. I stored this result in a variable ($logs).

The second stage used ForEach-Object and match to extract just the IP addresses and ports, which I stored in another variable ($probes).

The last stage took this result, sorted it and piped the result to another ForEach-Object loop where the functionality of the lab3 awk script is implemented. Use the -begin keyword to introduce a scriptblock that initializes variables. Use a -process block to process the records, and a -end block to print the totals. Use write-host to write the output using -NoNewLine where appropriate. You can use essentially the same code that you used in the awk script. In the powershell version you need to separate the ip from the port in the input, and this can be done using the split method of the input string object.

Deliverables:

Screen shots showing the code in use. Provide some documentation of the development process and describe the commands and other techniques used in the pipeline.

Due the day of the next lab. You should email a Word, PDF or ODT document file along with any other required deliverables to [email protected] or cmb- [email protected] .

Recommended publications