Field Manual for Hackers

https://www.hackonly.com

Ethical Hacking Training Online | LearnSkill.Today

Ethical Hacking Training Online | LearnSkill.Today

Search

Labels

Labs Java PHP Python Network Security Quiz Android AWS C++ Web Application Security Exploit Writing Linux C Language Kali Linux Commands django Shell Script :Labs Cheatsheet How to Install MySql OWASP Penetration Testing Post Exploitation fix Android Pentesting Capture the Flag Case Study Hack the box SEO Sniffing TCPDUMP Tools Wireshark

Python Script to Know Range of IP up or down

Python Script to Know Range of  IP  up or down
This python script is to check , A specific range of  ip  for  example here 10.10.10.3 to 10.10.10.60 in a network  up or down.


#!/usr/bin/python
import os

for ip in range(3,60):
        hostname="ping -c 1 10.10.10."+str(ip)
        response= os.system(hostname)

#and then check the response...
        if response == 0:
                print hostname, 'is up!'
        else:
                  print hostname, 'is down!'





Email ThisBlogThis!Share to TwitterShare to Facebook
Reactions:

  Python

Newer Post Older Post Home

Ethical Hacking Training Online | LearnSkill.Today

Ethical Hacking Training Online | LearnSkill.Today

Translate

Follow by Email

Copyright © Field Manual for Hackers | Designed by V2Geeks

TOP