Skip to content

Instantly share code, notes, and snippets.

View EONRaider's full-sized avatar
💀
Start The World

EONRaider

💀
Start The World
  • Curitiba, Brazil
View GitHub Profile
@EONRaider
EONRaider / randomize_mac.py
Last active October 23, 2020 18:50
Generate a random MAC address in Python 3
#!/usr/bin/env python3
# https://gist.github.com/EONRaider/ebda160f27ce0a09f1ab1c7733ba0e8c
__author__ = 'EONRaider, keybase.io/eonraider'
import random
def randomize_mac(*, sep: str = ':') -> str:
"""
Generates random MAC addresses in the format XX:XX:XX:XX:XX:XX by
@EONRaider
EONRaider / validate_mac.py
Last active August 19, 2024 23:43
Validate a MAC address using REGEX in Python 3
#!/usr/bin/env python3
# https://gist.github.com/EONRaider/c34f6799b9cf2259e90fce54a39d693c
__author__ = 'EONRaider, keybase.io/eonraider'
import re
def validate_mac(mac_address: str) -> bool:
is_valid_mac = re.match(r'([0-9A-F]{2}[:]){5}[0-9A-F]{2}|'
@EONRaider
EONRaider / keybase.md
Created June 11, 2020 14:43
keybase.md

Keybase proof

I hereby claim:

  • I am eonraider on github.
  • I am eonraider (https://keybase.io/eonraider) on keybase.
  • I have a public key ASCJEi_PalH4GZmzMPxDozNkedPapTiJpKrgegb2A6e1SAo

To claim this, I am signing this object: