Skip to content

Instantly share code, notes, and snippets.

View lrnselfreliance's full-sized avatar

lrnselfreliance

View GitHub Profile
#!/usr/bin/env python3
"""
Searches through stdin/file for HTML elements matching the class/attribute filters.
# echo "<html>
<body>
<p>Some links</p>
<a href="https://example.com/1" class="video">Click me</a>
<a href="https://example.com/2" class="video">Click me</a>
<a href="https://example.com/2" class="video">Click me</a>
@nstarke
nstarke / netgear-private-key-disclosure.md
Last active October 8, 2025 20:07
Netgear TLS Private Key Disclosure through Device Firmware Images

Netgear Signed TLS Cert Private Key Disclosure

Overview

There are at least two valid, signed TLS certificates that are bundled with publicly available Netgear device firmware.

These certificates are trusted by browsers on all platforms, but will surely be added to revocation lists shortly.

The firmware images that contained these certificates along with their private keys were publicly available for download through Netgear's support website, without authentication; thus anyone in the world could have retrieved these keys.

@narate
narate / create-hotspot.md
Last active January 20, 2026 21:01
Create Wi-Fi Hotspot on Linux using nmcli

Create a Wi-Fi hotspot on Linux using nmcli

Original post : https://unix.stackexchange.com/a/310699

nmcli con add type wifi ifname wlan0 con-name Hostspot autoconnect yes ssid Hostspot
nmcli con modify Hostspot 802-11-wireless.mode ap 802-11-wireless.band bg ipv4.method shared
nmcli con modify Hostspot wifi-sec.key-mgmt wpa-psk
nmcli con modify Hostspot wifi-sec.psk "veryveryhardpassword1234"
@major
major / ca.py
Last active October 28, 2025 09:27
Making a certificate authority (CA) with python cryptography
from cryptography import x509
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import hashes, serialization
from cryptography.hazmat.primitives.asymmetric import rsa
from cryptography.x509.oid import NameOID
import datetime
import uuid
one_day = datetime.timedelta(1, 0, 0)
private_key = rsa.generate_private_key(
public_exponent=65537,