Conduct a Range of ip Network Address Ping using Python

Intoduction

I would like to conduct a range of ip network address ping using python 3.5 script. It is easy. I will show you the python script and its screen dump result as below.

Python program script

# network ping program run for python3
# Import modules
import subprocess
import ipaddress

# Prompt the user to input a network address
net_addr = input(“Enter a network address in CIDR format(ex.192.168.1.0/24): “)

# Create the network
ip_net = ipaddress.ip_network(net_addr)

# Get all hosts on that network
all_hosts = list(ip_net.hosts())

# Configure subprocess to hide the console window
info = subprocess.STARTUPINFO()
info.dwFlags |= subprocess.STARTF_USESHOWWINDOW
info.wShowWindow = subprocess.SW_HIDE

# For each IP address in the subnet,
# run the ping command with subprocess.popen interface
for i in range(len(all_hosts)):
    output = subprocess.Popen([‘ping’, ‘-n’, ‘1’, ‘-w’, ‘500’, str(all_hosts[i])], stdout=subprocess.PIPE, startupinfo=info).communicate()[0]
    
    if “Destination host unreachable” in output.decode(‘utf-8’):
        print(str(all_hosts[i]), “is Offline”)
    elif “Request timed out” in output.decode(‘utf-8’):
        print(str(all_hosts[i]), “is Offline”)
    else:
        print(str(all_hosts[i]), “is Online”)

Screen dump result as below:

network-ping

Network Monitoring Software Review

Networks are becoming critical components of business success – irrespective of
whether you are small or BIG. When network fails, customers and employees cannot
communicate, employees cannot access critical information or use basic print or email
services, resulting in productivity loss and revenue loss. Network monitoring software
tools reduce network outages and allow businesses to operate more fluently, cut costs,
and prevent revenue loss. And for those who are small and are not allowed to think of a
budget for network monitoring software, a better alternative is to start with open source
and freeware network monitoring software that reduce the time and money spent on
network administration and management. This paper talks about the top freeware and
open source network monitoring software available today.

[spiderpowa-pdf src=”https://infotechmanagefactory.com/wp-content/uploads/2015/03/Network-Monitoring-Software.pdf”]Network-Monitoring-Software

Vulnerability Scanning and Correction Procedure

1.        Purpose

The development of Internet technology has originated a surge of new application solutions to improve business practices in corporations. This technology has allowed companies to be more competitive on a global scale and changed the way people do business.However, as businesses worldwide place increasing reliance on interconnected systems and electronic data, the risks of fraud, inappropriate disclosure of sensitive data, and disruption of critical operations and services increase. The same factors that benefit business operations also make it possible for individuals and organizations to inexpensively interfere with or eavesdrop on these operations from remote locations for purposes of fraud or sabotage, or other mischievous or malicious purposes.

Evidently, security and privacy protection are key issues for companies nowadays. Maintaining security and privacy requires corporate planning, training, implementing controls properly, monitoring the effectiveness of controls and taking necessary corrective action. Read More

NETWORK DEVICE CONFIGURATION PROCEDURE

1.        Purpose

The company Network Device Configuration Procedure aims at establishing a standard guideline for network administrators in managing network devices. More specifically, this procedure provides a step-by-step guide to (1) configuring a network device, (2) Installing a new security patch (i.e. firmware upgrade) on a network device, and (3) monitoring (malicious) network activity. Read More

Guideline for use of IT infrastructure

Security

  • Never give your password to anyone else.
  • Lock desktop or log out of network if leaving your desk for longer periods (e.g. meetings, lunch).
  • Do not leave your notebook unattended, particularly after office hours.
  • Never connect a third party to the network, do not dial in with a PC connected to the Company network.
  • Do not use your company notebook at home for dialing into a local Internet provider.
  • Restrict use of local administrator rights on desktops/notebooks.
  • Confidential or secret information must be sent in messages specifically marked as “confidential” or “secret” Notes feature.

Read More