Skip to content

Instantly share code, notes, and snippets.

View stokito's full-sized avatar
Self-hosting become easier 🤗

Sergey Ponomarev stokito

Self-hosting become easier 🤗
View GitHub Profile

Trying to deploy WPA3 on my home network

Introduction

Recently, news broke about a new possible offline attack on WPA2 using PMKID. To summarize the attack, WPA2 protected APs can end up broadcasting PMKID values which can then be used to offline-brute-force the password.

These PMKID values are computed this way:

PMKID = HMAC-SHA1-128(PMK, "PMK Name" | MAC_AP | MAC_STA)
@jayluxferro
jayluxferro / OpenWrt_Virtualbox.md
Created June 13, 2018 12:45
OpenWrt Virtualbox
  1. Download and install VirtualBox
  2. Get an OpenWrt image:
  3. Either use an existing image,
  4. Download the generic combined image for x86 (32-bit), e.g. chaos_calmer/15.05.1/x86/) LEDE 17.01.1 x86
  5. Download the generic combined image for x86_x64 (64-bit), e.g. chaos_calmer/15.05.1/x86/64) LEDE 17.01.1 x86_x64
  6. Uncompress the image if needed: gunzip openwrt.img.gz
  7. Convert it to native VirtualBox format:
VBoxManage convertfromraw --format VDI openwrt.img openwrt.vdi (in virtualbox version 5.0.12 the "--format VDI" is at the end of command)
@samyranavela
samyranavela / Example health-check script with systemd socket activation
Created April 18, 2018 12:56 — forked from kouk/Example health-check script with systemd socket activation
Simple HTTP health-check by abusing systemd socket activation with shell scripts
$ curl --dump-header - localhost:12345
HTTP/1.0 404 Not Found
Content-Type: text/html
Content-Length: 43
Date: Fri, 05 Dec 2014 17:48:56 +0000
<html>
<body>
<h1>WUT</h1>
</html>
@shafik
shafik / WhatIsStrictAliasingAndWhyDoWeCare.md
Last active April 26, 2025 00:19
What is Strict Aliasing and Why do we Care?

What is the Strict Aliasing Rule and Why do we care?

(OR Type Punning, Undefined Behavior and Alignment, Oh My!)

What is strict aliasing? First we will describe what is aliasing and then we can learn what being strict about it means.

In C and C++ aliasing has to do with what expression types we are allowed to access stored values through. In both C and C++ the standard specifies which expression types are allowed to alias which types. The compiler and optimizer are allowed to assume we follow the aliasing rules strictly, hence the term strict aliasing rule. If we attempt to access a value using a type not allowed it is classified as undefined behavior(UB). Once we have undefined behavior all bets are off, the results of our program are no longer reliable.

Unfortunately with strict aliasing violations, we will often obtain the results we expect, leaving the possibility the a future version of a compiler with a new optimization will break code we th

@sandeeprenjith
sandeeprenjith / DNSSEC-Signing.md
Last active November 29, 2024 08:38
DNSSEC Keys and Signing Process Simplified

cyber-security-2296269_1920

DNSSEC Keys and Signing Process Simplified

This article describes what happens when a zone is signed with DNSSEC. This document helps to understand the concept of zone signing and does not detail the actual steps for signing a zone.

@JacobFierro
JacobFierro / docker.md
Last active April 24, 2025 15:20
Docker Cheatsheet

Docker Cheatsheet

Docker info:

docker info

Containers

List Images:

@jchandra74
jchandra74 / openssl.MD
Last active March 17, 2025 15:25
HOWTO: Create Your Own Self-Signed Certificate with Subject Alternative Names Using OpenSSL in Ubuntu Bash for Window

HOWTO: Create Your Own Self-Signed Certificate with Subject Alternative Names Using OpenSSL in Ubuntu Bash for Window

Overview

My main development workstation is a Windows 10 machine, so we'll approach this from that viewpoint.

Recently, Google Chrome started giving me a warning when I open a site that uses https and self-signed certificate on my local development machine due to some SSL certificate issues like the one below:

Self-Signed SSL Issue in Chrome

@lukas2511
lukas2511 / sbin_dehydrated-run.sh
Created April 17, 2017 17:41
openwrt dehydrated stuff
#!/bin/bash
hostname="$(uci get "system.@system[0].hostname")"
if [ -n "${1:-}" ]; then
if [ "${1}" = "serve" ]; then
printf "HTTP/1.1 200 OK\r\n"
printf "Server: Socken Katze\r\n"
printf "X-Powered-By: Pink Fluffy Unicorns Dancing On Rainbows\r\n"
printf "Connection: close\r\n"
@jow-
jow- / dir-index.cgi
Created April 11, 2017 11:54
Directory listing script
#!/usr/bin/perl
use strict;
use warnings;
use Fcntl ':mode';
my $phys = $ENV{'DOCUMENT_ROOT'};
my $virt = '/'.$ENV{'PATH_INFO'};
@staaldraad
staaldraad / webdavserv.go
Last active June 18, 2024 14:34
A small webdav server in go
package main
import (
"flag"
"fmt"
"log"
"net/http"
"os"
"golang.org/x/net/webdav"