Class Activity 3.1 Reflection - Foren-Ken/tech-journal GitHub Wiki

The item which I spent the most time in this lab was creating the portscannerV2. This is due to multiple factors with the requirement, and a personal challenge I placed upon myself. The challenges are the following:

  1. I wanted the script to be compatible with both A.B.C/24 and A.B.C.D inputs. This would mean it would be able to ports scan singular targets or whole swaths of targets deepening on the input. This problem was eventually resolved by moving the checking algorithm "checkvalid()" to a loop outside the "checkport()" function.

  2. Developing the octet loop was the second difficulty. This is due to the differences in how arrays work in Python and Bash, and this required me to learn a whole new syntax for seemingly simple things. This resulted in the following code being developed for the script:

superspecial=($odd.{1..254})

This would result in the creation of a list with the following values: (10.0.5.1 10.0.5.2 10.0.5.3...10.0.5.254) This is due to the value of $odd being the network prefix with the new value being appended to the end. portscannerV2.sh


DNS Resolver was a simple script to develop since a large amount is derived from the portscannerV2.sh script. This also called back to the original portscanner.sh for how the grep worked on the result from nslookup. dns-resolver.sh


For the rest of the deliverables, it highly focused on the use of grep. The guide is located at the link below: Grep Guide