Kali · Network Recon

Termux Hub · Kali Linux

Kali Network Reconnaissance Scripts — Ping Sweeps, Port Scans & Web Recon

Reconnaissance scripts — ping sweeps, port scans, banner grabbing, DNS enumeration, HTTP header analysis, subdomain testing and SSL certificate checks. Use them only against networks you own or have explicit written permission to test.

Kali · Network Recon — script list

ScriptCategoryWhat it does
nmap_subprocess_wrapper.pyNetwork ReconRuns and parses basic Nmap scans via `subprocess`.
socket_banner_grabber.pyNetwork ReconLow-level socket connection to grab service banners.
ping_sweep_threaded.pyNetwork ReconMulti-threaded ping sweep for subnet host discovery.
mac_address_vendor.pyNetwork ReconOUI-based MAC address vendor lookup (mock dataset).
local_network_mapper.pyNetwork ReconSimulates mapping the devices on a local subnet.
ping_sweeper.pyNetwork ReconUses `subprocess` to find live hosts across a /24 subnet.
basic_port_scanner.pyNetwork ReconSocket-based TCP scan of common ports.
banner_grabber.pyNetwork ReconConnects to ports and retrieves service banners.
nmap_xml_parser.pyNetwork ReconExtracts open ports and services from Nmap XML output.
mac_address_vendor_lookup.pyNetwork ReconResolves device vendors from MAC addresses via lookup APIs.
requests_fuzzer.pyWeb ReconBasic directory fuzzing with the `requests` library.
subdomain_bruteforce.pyWeb ReconTests a subdomain wordlist against a target domain.
http_header_analyzer.pyWeb ReconExtracts server info and security headers.
robots_txt_parser.pyWeb ReconFetches and parses disallowed paths from `robots.txt`.
web_crawler_basic.pyWeb ReconExtracts all `href` links from a webpage.
http_header_inspector.pyWeb ReconPulls HTTP headers to fingerprint server versions.
robots_txt_scraper.pyWeb ReconDownloads and parses `robots.txt` to surface hidden paths.
subdomain_bruteforcer_mock.pyWeb ReconWordlist-driven subdomain testing (mock resolver).
ssl_cert_checker.pyWeb ReconReads an SSL/TLS certificate's details and expiry date.
directory_fuzzer_lite.pyWeb ReconProbes common admin/login paths for `200 OK` responses.
netstat_active_ports.shNetwork ReconFilters `netstat` output for `LISTEN`-state services.
ss_monitor.shNetwork ReconSocket statistics via the `ss` command.
nmap_fast_scan.shNetwork ReconAutomates a fast-mode Nmap scan against a target.
route_tracer.shNetwork ReconPath discovery using `traceroute`.
arp_table_reader.shNetwork ReconFormats and displays the local ARP cache.
quick_nmap_scan.shNetwork ReconFast scan of the top 100 common ports.
full_tcp_syn_scan.shNetwork ReconStealthy SYN scan across all 65,535 ports.
dns_enumeration.shNetwork ReconForward and reverse DNS lookup automation.
arp_discovery.shNetwork ReconIdentifies local devices using ARP requests.
ssl_cert_checker.shNetwork ReconChecks SSL certificate expiry and details.
nmap_quick_scan_wrapper.shEnumerationAutomates an Nmap fast scan and writes clean results to a file.
dns_enum_tool.shEnumerationExtracts A, MX, and TXT records with `host` and `dig`.
whois_ip_lookup.shEnumerationRuns `whois` across a list of IPs for organisational data.
ping_sweep_subnet.shEnumerationSimple loop to ping every host in a /24 subnet.
banner_grabber_netcat.shEnumerationUses `nc` to connect to a port and grab its banner.
curl_header_grabber.shWeb ReconFast `curl` one-liner to inspect response headers.
gobuster_automator.shWeb ReconAutomates a `gobuster` dir scan with standard wordlists.
nikto_fast_scan.shWeb ReconWrapper to run the Nikto web scanner.
wget_mirror.shWeb ReconDownloads and mirrors a basic website.
whois_dns_lookup.shWeb ReconCombines `whois`, `dig`, and `nslookup` for full target info.

Code samples

nmap_fast_scan.sh — automate a fast Nmap scan

#!/bin/bash

# nmap_fast_scan.sh
# Concept: Automating a fast Nmap scan via Bash

TARGET=$1

if [ -z "$TARGET" ]; then
    echo "Usage: $0 <target_ip>"
    exit 0
fi

echo "[*] Initializing fast scan on $TARGET..."
echo "[*] Command: nmap -F $TARGET"

# -F scans top 100 ports
nmap -F "$TARGET"

echo "[+] Fast scan finalized."

ping_sweep_threaded.py — threaded ping sweep

#!/usr/bin/env python3
import subprocess
import threading
from queue import Queue

# ping_sweep_threaded.py
# Concept: Using Multi-threading to speed up network reconnaissance

# Thread-safe queue to hold IP addresses
queue = Queue()

def pinger():
    while True:
        # Get an IP from the queue
        ip = queue.get()
        if ip is None:
            break
        
        # Run ping command (1 packet, 1 second timeout)
        # On Windows it's 'ping -n 1', on Linux it's 'ping -c 1'
        # We assume a Linux environment (Kali)
        try:
            res = subprocess.run(['ping', '-c', '1', '-W', '1', ip], 
                                 stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
            if res.returncode == 0:
                print(f"[+] {ip} is UP")
        except Exception:
            pass
            
        queue.task_done()

def start_sweep(subnet):
    print(f"[*] Starting threaded ping sweep on {subnet}.0/24...")
    
    # Spawn 50 worker threads
    for _ in range(50):
        t = threading.Thread(target=pinger)
        t.daemon = True
        t.start()

    # Add IPs 1-254 to the queue
    for i in range(1, 255):
        queue.put(f"{subnet}.{i}")

    queue.join()
    print("[*] Sweep complete.")

if __name__ == "__main__":
    import sys
    if "-h" in sys.argv or "--help" in sys.argv:
        print("Usage: python3 ping_sweep_threaded.py")
        print("Threaded ping sweep of a /24 subnet (interactive prompt).")
        sys.exit(0)
    base_ip = input("Enter first three octets (e.g., 192.168.1): ") or "192.168.1"
    start_sweep(base_ip)
    # Stop the threads
    for _ in range(50):
        queue.put(None)

Related pages

View the full toolkit on GitHub

Explore Termux Hub

Kali Toolkit

Toolkit home (145 scripts) Foundations Network recon Defensive monitoring Vulnerability scanning Enumeration System hardening

Termux tool guides

Apache Brutus Cloudflare Cool Commands Cpp Findomain Fsociety Geo Recon Ghost Eye Hacktronian Ipicker Javascript John Local Server Manjaro Naabu Ncat Nmap Nordvpn Onex Pydictor Python Quasar Recondog Subfinder Termux Banner Ubuntu Gui Wafw00F Web Recon

Learn

Home Termux cheatsheet Python JavaScript C++ Cool Termux commands About Termux Hub