Giter Site home page Giter Site logo

arkregiel / network-scanner Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 382 KB

Live host (in LAN) discovery, their IPv4 and MAC addresses and open TCP ports

License: MIT License

Python 100.00%
network network-programming network-scanner python python3 scapy

network-scanner's Introduction

Python Network Scanner

Live host (in LAN) discovery, their IPv4 and MAC addresses and open TCP ports

This is proof of concept, it's not optimized

Install requirements

$ pip install -r requirements.txt

Usage

usage: netscan.py [-h] [-p PORT1,PORT2,...] [-r] [-s] [--noverbose] IP/PREFIX_LENGTH

Network Scanner - discovering live hosts and their open ports

positional arguments:
  IP/PREFIX_LENGTH      Network to scan in CIDR format (or single IPv4 address)

optional arguments:
  -h, --help            show this help message and exit
  -p PORT1,PORT2,..., --ports PORT1,PORT2,...
                        Port numbers (comma separated). If you want to scan range, use -r/--range
  -r, --range           Scan port range. If enabled, -p/--ports option should take arguments like this: FIRST-LAST
  -s, --syn             Use SYN scan
  --noverbose           Disable verbosing

examples:
$ python netscan.py -p 22,53,80,443 --syn 192.168.1.0/24
$ python netscan.py -p 1-1000 --range --syn 192.168.1.0/24

Remember to have the oui.txt file in the same directory as the script.

Example output

Scanning...
(It may take some time)
.............................................................................................
<output omitted>
.................................................
--------
Results:

Scanned IP: 192.168.1.1
MAC: aa:bb:cc:dd:ee:ff (Organization X)
Open TCP ports:
(80, 443)
-------------------------
Scanned IP: 192.168.1.19
MAC: 11:22:33:44:55:66 (Organization Y)
Open TCP ports:
(80,)
-------------------------
Scanned IP: 192.168.1.22
MAC: ff:ee:dd:cc:bb:aa (Organization Z)
Open TCP ports:
()
-------------------------

network-scanner's People

Contributors

arkregiel avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.