Skip to main content

A command-line tool to spoof your network interface's MAC address on Linux systems.

Project description

MAC Address Spoofer

CI (master) PyPI Version PyPI Downloads

A command-line tool to spoof your network interface's MAC address on Linux systems.

MacSpoofer Demo

What is a MAC Address?

A Media Access Control (MAC) address is a unique identifier assigned to a network interface controller (NIC) for use as a network address in communications within a network segment. This identifier is used in most IEEE 802 networking technologies, including Ethernet, Wi-Fi, and Bluetooth.

Changing your MAC address can be useful for:

  • Privacy - Prevent tracking across networks
  • Testing - Simulate different network devices
  • Bypassing restrictions - Some networks filter by MAC address

MAC Address Structure

A MAC address is a 12-digit hexadecimal number (6 bytes), typically represented in colon-hexadecimal notation (e.g., 00:1A:2B:3C:4D:5E).

Bytes Name Description
First 3 bytes OUI (Organizationally Unique Identifier) Identifies the manufacturer
Last 3 bytes NIC (Network Interface Controller) Device-specific identifier

Features

  • 🎲 Random MAC generation - Generate safe, locally-administered unicast addresses
  • 🏭 Vendor spoofing - Mimic devices from Samsung, Apple, Intel, Microsoft, Huawei, Google, or Cisco
  • 🖥️ Interactive TUI - Easy to use text interface
  • Auto mode - Non-interactive operation for scripts
  • 🔧 CI mode - Designed for automated testing pipelines

Compatibility

The tool is compatible with Linux distributions only.

Tested on:

  • Ubuntu - 16.04.7, 18.04.6, 20.04.6, 22.04.5, 24.04.2
  • Debian - 8, 9, 10, 11, 12
  • Kali - 2021.4a, 2022.4, 2023.4, 2024.4, 2025.1
  • Raspbian - 8, 9, 10, 11, 12

Installation

Via pip (recommended)

sudo pip install macspoofer

From source

chmod +x setup.sh
sudo ./setup.sh

Usage

Find Your Interface Name

ifconfig -a
# or
ip link show

Interactive Mode (TUI)

sudo macspoofer -i <interface>
# or
sudo python3 main.py -i <interface>

Auto Mode (Non-Interactive)

sudo macspoofer -i <interface> --auto
# or
sudo python3 main.py -i <interface> --auto

Command Line Options

Option Description
-i <interface> Network interface name (e.g., wlan0, eth0) [Required]
--auto Non-interactive mode: generate and apply a random unicast MAC
--ci CI mode: for automated testing
--help Show help message and usage examples
--version Show version information

Resources

💡 Want more vendors? Feel free to open a PR to add more vendor OUIs!

License

MIT License


© 2022-2026 Daniel Kirshner. All rights reserved.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

macspoofer-1.0.1.tar.gz (1.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

macspoofer-1.0.1-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

Details for the file macspoofer-1.0.1.tar.gz.

File metadata

  • Download URL: macspoofer-1.0.1.tar.gz
  • Upload date:
  • Size: 1.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for macspoofer-1.0.1.tar.gz
Algorithm Hash digest
SHA256 2f798bc32ccf6c70adcbaad77ba3904d0b83e2f6f5a5bcfb180e305c0f1f5fb6
MD5 54c564898c49f01c8a33ef97cd927198
BLAKE2b-256 41480415d2333e9b0774ea01c20944895c654fe16cd2c70bb92433e8b84fe06d

See more details on using hashes here.

Provenance

The following attestation bundles were made for macspoofer-1.0.1.tar.gz:

Publisher: publish.yml on DanielKirshner/MacSpoofer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file macspoofer-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: macspoofer-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 14.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for macspoofer-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 01c95c96a3c86b6528376b3bb45d791864d7d89cab53692eef4a5c7945b1a0b7
MD5 e787499e2136d19d9d7145e9dd8655e9
BLAKE2b-256 6fdbb25e9a12002a333265ee49b5ff1aa8be3643ec2e554af302442bd259fd74

See more details on using hashes here.

Provenance

The following attestation bundles were made for macspoofer-1.0.1-py3-none-any.whl:

Publisher: publish.yml on DanielKirshner/MacSpoofer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page