Code Monkey home page Code Monkey logo

network_device_discovery's Introduction

Network Device Discovery

A Python script for discovering devices on the local network using ARP, UPNP.

Currently this script works for Windows, WSL and Linux.

Code formatters: Black, isort

Example Output

screenshot

Passive Discovery Methods

Address Resolution Protocol (ARP)

  1. Retrieve the current ARP cache tables for all interfaces.
  2. Parse the ARP caches tables for individual device entries.
  3. Perform OUI lookup of device MAC address to obtain device vendor.

Active Discovery Methods

Universal Plug and Play (UPNP)

  1. Send M-SEARCH request via Multicast UDP.
  2. Receive Unicast UDP response from compatible devices.
  3. Retrieve and parse the XML description file from each device to obtain device attributes.

Dependencies

Requires Python 3.9+ installed. You can download the latest version of Python 3 via the official website

Once Python has been installed, ensure you have the Python library dependencies installed as well:

$ cd .\network_device_discovery\
$ python -m pip install -r requirements.txt

On Linux the ARP utility may need to be installed as part of the net-tools package:

sudo apt-get install net-tools

Usage

To run the script, you simply use the Python command:

$ python discover.py

Results will be displayed to the terminal in a color coded table with some nice ascii art.

Note:

Although this script can be used inside a VM, the results may be limited, depending on how your VM is networked. Try the VM network connection as Bridged (Connected directly to the physical network) and not NAT (Sharing the host's IP address). Otherwise some of the discovery methods relying on sockets may not work.

network_device_discovery's People

Contributors

computermadscientist avatar

Stargazers

Sayan Maity avatar  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.