Skip to content

Instantly share code, notes, and snippets.

#!/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)
@SoftPoison
SoftPoison / wc.rs
Created June 10, 2024 09:14
Fun little poking round with Rust SIMD and mmapping to make a silly little wordcount clone
#![feature(portable_simd)]
#![feature(slice_as_chunks)]
use std::{
ops::Neg,
simd::{cmp::SimdPartialEq, num::SimdInt},
};
use memmap2::Mmap;
@SoftPoison
SoftPoison / ime.ps1
Created May 23, 2024 23:50
Runs an executable in-memory
$source = @"
using System;
using System.Runtime.InteropServices;
public class InMemoryExecutable : IDisposable
{
public class DllException : Exception
{
public DllException() : base() { }
public DllException(string message) : base(message) { }
@SoftPoison
SoftPoison / crackproof_name_decode.rs
Created February 21, 2024 22:00
Decode the device name for a crackproof driver
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];
@SoftPoison
SoftPoison / download_cloudshell_images.ps1
Created November 14, 2022 03:31
quick hacky script to download all cloudshell image files for cred hunting purposes
# 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
@SoftPoison
SoftPoison / cfe_serial_dump.py
Created December 21, 2021 01:34
Dumps a router's flash via the CFE serial console
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')
@SoftPoison
SoftPoison / map_hashes.py
Last active February 3, 2023 02:29
Maps cracked hashes with a dcsync log to create a handy readout of compromised accounts + stats
#!/usr/bin/env python3
from collections import Counter
from functools import reduce
import sys
from typing import List
class LoginCreds:
name: str
username: str
@SoftPoison
SoftPoison / poly_modulo_multip.py
Created September 26, 2020 06:07
Computes the product of two polynomials (modulo another polynomial) in a given finite field
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)