For Programming Assignment #1 you will be writing your own port scanner. You can use any programming language you choose. The TAs and I have used Python. Your requirements are: 1. Your program must take an input of a target host. It must accept both an IP address or domain name. 2. Your program must take an input of a range of ports. 3. Your program must have a connection timeout so that it will stop trying to connect to a target that is not responding. 4. Your program must print the scan start time. 5. Your code must be commented. Please submit a copy of your code and a screenshot of it working as a PDF file. Then submit your source code (.py, java, etc.) as a second file. Your screenshot should be similar to the one provided below and it should show at least one open and one closed port. Happy coding! :-/Desktop$ python portscan.py Enter a target to scan: 10.1.123.158 Please enter the range of ports you would like to scan on the target Enter a start port: 20 Enter a end port: 30 Scanning started at: 2022-09-25 23:43:26.226827 Port 20 is closed Port 21 is closed Port 22 is open Port 23 is closed Port 24 is closed Port 25 is closed Port 26 is closed Port 27 is closed Port 28 is closed Port 29 is closed Port Scanning Completed

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

I need the code to display one open and one closed port.

For Programming Assignment #1 you will be writing your own port scanner. You can use any programming language you choose. The TAs and I have used
Python. Your requirements are:
1. Your program must take an input of a target host. It must accept both an IP address or domain name.
2. Your program must take an input of a range of ports.
3. Your program must have a connection timeout so that it will stop trying to connect to a target that is not responding.
4. Your program must print the scan start time.
5. Your code must be commented.
Please submit a copy of your code and a screenshot of it working as a PDF file. Then submit your source code (.py, .java, etc.) as a second file. Your
screenshot should be similar to the one provided below and it should show at least one open and one closed port. Happy coding!
student@kali:-/Desktop$ python portscan.py
Enter a target to scan: 10.1.123.158
Please enter the range of ports you would like to scan on the target
Enter a start port: 20
Enter a end port: 30
Scanning started at: 2022-09-25 23:43:26.226827
Port 20 is closed
Port 21 is closed
Port 22 is open
Port 23 is closed
Port 24 is closed
Port 25 is closed
Port 26 is closed
Port 27 is closed
Port 28 is closed
Port 29 is closed
Port Scanning Completed
akali:~/Desktops
Transcribed Image Text:For Programming Assignment #1 you will be writing your own port scanner. You can use any programming language you choose. The TAs and I have used Python. Your requirements are: 1. Your program must take an input of a target host. It must accept both an IP address or domain name. 2. Your program must take an input of a range of ports. 3. Your program must have a connection timeout so that it will stop trying to connect to a target that is not responding. 4. Your program must print the scan start time. 5. Your code must be commented. Please submit a copy of your code and a screenshot of it working as a PDF file. Then submit your source code (.py, .java, etc.) as a second file. Your screenshot should be similar to the one provided below and it should show at least one open and one closed port. Happy coding! student@kali:-/Desktop$ python portscan.py Enter a target to scan: 10.1.123.158 Please enter the range of ports you would like to scan on the target Enter a start port: 20 Enter a end port: 30 Scanning started at: 2022-09-25 23:43:26.226827 Port 20 is closed Port 21 is closed Port 22 is open Port 23 is closed Port 24 is closed Port 25 is closed Port 26 is closed Port 27 is closed Port 28 is closed Port 29 is closed Port Scanning Completed akali:~/Desktops
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Types of Protocols
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education