Skip to content

rhjddjdbc/LocalNetScan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

LocalNetScan

A comprehensive Bash-based network reconnaissance tool for security audits and penetration testing. It can scan IP ranges or individual hosts, identify open ports, detect services, and retrieve device information with optional MAC address spoofing capabilities.

Table of Contents

Features

  • Parallel scanning – scan up to 8 hosts simultaneously for speed
  • CIDR support – automatically expands network ranges (e.g., 192.168.1.0/24)
  • Port detection – identifies open ports using native Bash TCP probes or nmap
  • Service identification – grabs banners and extracts service versions
  • Device fingerprinting – resolves MAC addresses to vendors via IEEE OUI database
  • MAC spoofing – change or randomize MAC address for anonymous scanning
  • Structured reports – generates both text and JSON output for easy parsing
  • State management – automatically backs up and restores original MAC address
  • Flexible targeting – scan all hosts from scope file or single IP addresses

Requirements

Dependencies

The script requires the following tools:

# Core utilities
curl
jq
nc (netcat)
ipcalc
ip (iproute2)
ping
flock
openssl

# Optional (for enhanced scanning)
nmap
sudo or doas (for MAC spoofing)

System Requirements

  • Linux (Debian/Ubuntu or Arch Linux)
  • Bash 4.0+
  • Root or sudo privileges (for MAC address changes)
  • Network connectivity to target hosts

Installation

  1. Clone the repository:
git clone https://github.com/rhjddjdbc/LocalNetScan.git
cd LocalNetScan
  1. Install dependencies:

Ubuntu/Debian:

sudo apt-get install curl jq netcat-openbsd ipcalc iputils-ping util-linux openssl nmap

Arch Linux:

sudo pacman -S curl jq openbsd-netcat ipcalc iproute2 iputils util-linux openssl nmap
  1. Download the OUI database (optional but recommended):
curl -o oui.txt https://standards-oui.ieee.org/oui/oui.txt
  1. Make the script executable:
chmod +x LocalNetScan.sh

Usage

Basic Syntax

./LocalNetScan.sh [MODE] [OPTIONS]

Modes

Mode Description
--all Scan all entries from scope.txt
--host <IP> Scan a single host

Options

Option Description
--interface <iface> Specify network interface (required for MAC spoofing)
--mac <MAC> Set a specific MAC address (format: 00:1A:2B:3C:4D:5E)
--random Generate and use a random locally-administered MAC address
--restore Restore original MAC address and exit
--nmap Use nmap for port scanning instead of Bash TCP probes
--full Enable full port scanning (equivalent to --ports)
--ports Scan only ports
--help Display help message

License

This project is licensed under the GNU General Public License v3.0. See the LICENSE file for details.

Disclaimer

This tool is for educational and authorized security testing purposes only. Only scan networks you own or have explicit written authorization to test. Unauthorized network scanning is illegal in most jurisdictions. The authors are not responsible for misuse, damage, or legal consequences.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages