Question: required to solve this task in python the required task...
Required to solve this task in Python.
The required task mainly to write the script to solve this problem,please provide me with the python script.
As the problem identified by the client requires the creation of a script in Python programming language that generates all IP addresses and adheres to the following requirements:
· all IP addresses generated must fall within the subnet input by the end-user
o the end-user will be prompted to provide the subnet and subnet mask when the script first starts
o for example: subnet 192.168.x with subnet mask of 255.255.255.0
· the script must skip every IP address that is evenly numbered (divisible by 2)
o for example: 192.168.0.12, 192.168.0.14, … , 192.168.0.252, 192.168.0.254
· reserves the top 10 IP addresses for printers and servers
· scan all ports for each of the IP addresses in the subnet
o the ports are defined a file (ports.txt) that is imported when the script starts
o outputs the status of each port (open or closed)
· the script must output the IP address and port status to:
o log file (ip_port_log.txt)
o Windows Event Viewer (IP Addresses Only)