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:
I hereby claim:
To claim this, I am signing this object:
#!/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}|' |
#!/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 |
#!/usr/bin/env python3 | |
# https://gist.github.com/EONRaider/3b7a8ca433538dc52b09099c0ea92745 | |
__author__ = 'EONRaider, keybase.io/eonraider' | |
import fcntl | |
import socket | |
import struct | |
try: | |
from netifaces import AF_INET, ifaddresses |
#!/usr/bin/env python3 | |
# https://gist.github.com/EONRaider/f2284ccf75613c8751e20062b9e750f3 | |
__author__ = 'EONRaider, keybase.io/eonraider' | |
try: | |
import netifaces | |
except ModuleNotFoundError as e: | |
raise SystemExit(f"Requires {e.name} module. Run 'pip install {e.name}' " | |
f"and try again.") |
#!/usr/bin/env python3 | |
# https://gist.github.com/EONRaider/a59d6c4636c1211c7a854c384ddf19a0 | |
__author__ = 'EONRaider, keybase.io/eonraider' | |
import argparse | |
import ipaddress | |
try: | |
from scapy.all import * | |
from scapy.layers.inet import ICMP, IP |
#!/usr/bin/env python3 | |
# https://gist.github.com/EONRaider/32c5dbf467c786f393bd0e7601246ddf | |
__author__ = 'EONRaider @ keybase.io/eonraider' | |
""" | |
A low-level network sniffer for TCP/IP packets. | |
""" | |
import struct | |
from binascii import hexlify |
Just follow the guide at https://linuxconfig.org/ubuntu-20-04-system-monitoring-with-conky-widgets
#!/usr/bin/env python3 | |
# https://gist.github.com/EONRaider/35484fc55c643ddbdac7ae55f919419d | |
__author__ = 'EONRaider, keybase.io/eonraider' | |
def translate_tcp_flags(flag_code: str, *, base: int): | |
flag_names = 'NS', 'CWR', 'ECE', 'URG', 'ACK', 'PSH', 'RST', 'SYN', 'FIN' | |
flag_bits = format(int(flag_code, base=base), '09b') | |
yield from (flag_name for flag_name, flag_bit in zip(flag_names, flag_bits) | |
if flag_bit == '1') |
#!/bin/env/python3 | |
# https://gist.github.com/EONRaider/d6041f6c5845f9b8e726bed33d09c6c6 | |
__author__ = 'EONRaider, keybase.io/eonraider' | |
from socket import socket | |
def get_request(hostname: str, path: str = None, port: int = 80, | |
encoding: str = 'utf_8'): | |
path = path if path is not None else '/' |