This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
OUT_FILE="wifi_testing_$(date '+%Y-%m-%d_%H-%M-%S').pcap" | |
DWELL_TIME="1" | |
set -e | |
echo "[*] Enumerating devices" | |
readarray -t devices < <(iw dev | grep 'Interface' | awk '{print $2}' | sort) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![feature(portable_simd)] | |
#![feature(slice_as_chunks)] | |
use std::{ | |
ops::Neg, | |
simd::{cmp::SimdPartialEq, num::SimdInt}, | |
}; | |
use memmap2::Mmap; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$source = @" | |
using System; | |
using System.Runtime.InteropServices; | |
public class InMemoryExecutable : IDisposable | |
{ | |
public class DllException : Exception | |
{ | |
public DllException() : base() { } | |
public DllException(string message) : base(message) { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn main() { | |
// get this from within the driver (sometimes at 0x15000) | |
let mut data: [u16; 11] = [ | |
0x0087, 0x0068, 0x00bc, 0x005b, 0x008c, 0x0073, 0x0094, 0x00f7, 0x00d7, 0x00c1, 0x0000, | |
]; | |
let mut key: u16 = 0x5555; | |
for i in 0..data.len() { | |
let mut name_char = data[i]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Download all available Cloud Shell image files | |
$subscriptions=az account list --query "[].name" -o tsv | |
foreach ($sub in $subscriptions) { | |
$accounts=az storage account list --subscription "$sub" --query "[].name" -o tsv | |
foreach ($acc in $accounts) { | |
$shares=az storage share list --subscription "$sub" --account-name "$acc" --query "[].name" -o tsv 2>$null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import serial | |
OFFSET = 0 | |
NUM_PAGES = 64 * 2048 | |
f = open('serial_dump.bin', 'wb') | |
io = serial.Serial('/dev/ttyUSB0', baudrate=115200) | |
io.read_until(b'Auto run second count down: 1') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from collections import Counter | |
from functools import reduce | |
import sys | |
from typing import List | |
class LoginCreds: | |
name: str | |
username: str |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mod = lambda x, n: x % n if x >= 0 else mod(x+n, n) | |
vmod = lambda v, n: [mod(e, n) for e in v] | |
def multip(u, v, p): | |
w = [0] * (len(u)+len(v)-1) | |
for i, x in enumerate(u): | |
for j, y in enumerate(v): | |
w[i+j] += x*y | |
return vmod(w, p) |