Skip to content

Instantly share code, notes, and snippets.

View yunginnanet's full-sized avatar
👋
looking for work

kayos yunginnanet

👋
looking for work
View GitHub Profile
@yunginnanet
yunginnanet / iwreset.sh
Created September 10, 2024 04:40
reset wireless interface for packet injection purposes to reset queues
#!/bin/bash
_target="$1"
if ! ip link show dev "$_target" >> /dev/null; then
echo "device $_target does not exist"; exit 1
fi
echo "resetting $_target"
import sqlite3
import os
import shutil
def merge_databases(db1, db2):
if not os.path.exists(db1):
print(db1 + " does not exist, copying " + db2 + "...")
try:
shutil.copyfile(db2, db1)
package main
import (
"io"
"os"
"strings"
)
// pathdedupe
// - kayos
#!/usr/bin/env bash
function newFile() {
_resfile="dns_results.$(date +%s).csv"
echo "hostname,ips" >>"$_resfile"
echo "$_resfile"
}
resfile="$(newFile)"
export resfile
package main
import (
"database/sql"
"flag"
"os"
"regexp"
"runtime"
"strings"
@yunginnanet
yunginnanet / dump_inline_from_eml.go
Created April 22, 2024 19:24
used to extract corrupt/broken base64 encoded attachments from .eml message files
package main
import (
"bufio"
"bytes"
"encoding/base64"
"encoding/hex"
"io"
"os"
"path/filepath"
#!/usr/bin/env bash
function _getExt() {
echo "$@" | awk -F '.' '{print $NF}'
}
function _getArchiveName() {
_ext="$(_getExt "$@")"
_name="${*/.$_ext//}"
_name="${_name//\//}"
#!/usr/bin/env bash
# snag: colorize, bat, apt-file, apt-fast, toilet
alias aget='sudo apt-get install'
alias qaget='sudo apt-fast -y install'
alias aremove='sudo apt-get remove'
alias apurge='sudo apt-get purge'
alias ashow="_ashow"
#!/usr/bin/env bash
# example output:
# cleaning duplicate netfilter rules...
# updating netfilter rules...
# updating iptables...
# latest: SHA256 (-) = e32144dcf88d333d2ecfbce61fc2392045c462b3370093b70bd5429c3ae9e922
# current: SHA256 (-) = e32144dcf88d333d2ecfbce61fc2392045c462b3370093b70bd5429c3ae9e922
# backing up old rules...
@yunginnanet
yunginnanet / fwd55.go
Last active January 6, 2024 03:56
fwd55.go
package main
// ▄─▄ ▄ ▄ ▄ ──▄ ▄─▄ ▄─▄
// ▓─ ▓ ▓ ▓ ▓ ▓ ▀─▄ ▀─▄
// ▀ ▀─▀─▀ ──▀ ▀─▀ ▀─▀
// f w d --> 5 5
//
// simple rfc1928 proxy server
//
//