Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
iface="wlan0"
wpacfg="/tmp/wifizwpasup"
wpapid="/tmp/wifizwpapid"
dhcpid="/tmp/wifizdhcpid"
stop() {
if [ -e "$wpapid" ]; then
@netman69
netman69 / gist:43d89ae42333f91c01e938e6e6d1371b
Created March 25, 2018 22:23
show what processes launched the shell with sh oneliner
sh -c "cur=\$\$; while true; do cur=\"`ps -o ppid= -p \$cur | sed -e 's/^ *//g'`\"; exe=\"`readlink /proc/\$cur/exe`\"; echo \$exe; test -z \"\$exe\" && break; done" | awk '{ a[i++] = $0 } END { for (j = i - 2; j >= 0;) print a[j--] }'
@netman69
netman69 / crc32c_32bit_nolib.asm
Last active October 15, 2017 07:00
32bit matsum with direct syscalls
;
; Command line CRC32C calculation utility for Linux using SSE4.2 CRC32C instruction.
;
; TODO
; - Probably fails quite miserably if cpu does not have crc32c instruction.
; - Fails miserably if attempting to hash a folder.
;
%define BUFSIZE 4096 ; Must be not TOO tiny cause output string is also written there.
@netman69
netman69 / crc32c_32bit.asm
Created October 15, 2017 03:38
CRC32C calculation utility (standalone x86 32bit nasm version).
%define BUFSIZE 4096
bits 32
section .text
extern fdopen
extern fprintf
extern printf