Skip to content

Instantly share code, notes, and snippets.

@aozq
aozq / initial_status.json
Created October 20, 2025 18:20
Instance Status Reporter - Auto-updates every 30 seconds
{
"timestamp": "2025-10-20T18:15:00.000000",
"instance_ip": "Starting up...",
"system_info": {
"uptime": "Unknown",
"disk": "Unknown",
"memory": "Unknown"
},
"services": {
"http_c2": "Starting",
@aozq
aozq / comprehensive_cf_onstart.sh
Last active October 20, 2025 18:48
Comprehensive onstart with HTTP C2 + WebSocket C2 + Cloudflare tunnels
#!/bin/bash
# COMPREHENSIVE working onstart with HTTP C2 server + WebSocket server + Cloudflare tunnel + Simple Status Server
echo "COMPREHENSIVE START: $(date)" > /tmp/comprehensive_start.log
# Install dependencies
echo "Installing dependencies..." >> /tmp/comprehensive_start.log
apt-get update -y >> /tmp/comprehensive_start.log 2>&1
apt-get install -y python3-pip curl >> /tmp/comprehensive_start.log 2>&1
pip3 install websockets >> /tmp/comprehensive_start.log 2>&1
@aozq
aozq / persistent_startup.sh
Last active October 20, 2025 18:49
Updated persistent startup with fixed gist URL
#!/bin/bash
# Persistent startup script - runs on every boot
# This script will always pull and run the latest gist version
echo "PERSISTENT START: $(date)" > /tmp/persistent.log
# Always download the latest version of the comprehensive script
echo "Downloading latest comprehensive script..." >> /tmp/persistent.log
wget -q https://gist.githubusercontent.com/aozq/2af59458bfaa9f9ec1c8b09aaa7ba161/raw/comprehensive_cf_onstart_fixed.sh -O /tmp/working_script.sh
@aozq
aozq / working_cf_onstart.sh
Created October 20, 2025 17:33
Fixed working onstart with HTTP C2 server + Cloudflare tunnel (0.0.0.0 bind fix)
#!/bin/bash
# Working onstart with HTTP server + Cloudflare tunnel
echo "WORKING START: $(date)" > /tmp/working_start.log
# Install pip3 and websockets
echo "Installing dependencies..." >> /tmp/working_start.log
apt-get update -y >> /tmp/working_start.log 2>&1
apt-get install -y python3-pip curl >> /tmp/working_start.log 2>&1
pip3 install websockets >> /tmp/working_start.log 2>&1
@aozq
aozq / setup_persistent.sh
Created October 20, 2025 17:25
Setup script for persistent startup installation
#!/bin/bash
# One-time setup script to install persistent startup
echo "SETUP START: $(date)" > /tmp/setup.log
# Install the persistent startup script to run on every boot
echo "Installing persistent startup script..." >> /tmp/setup.log
cp /tmp/persistent_startup.sh /root/persistent_startup.sh
chmod +x /root/persistent_startup.sh
@aozq
aozq / persistent_startup.sh
Created October 20, 2025 17:25
Persistent startup script - runs gist on every boot
#!/bin/bash
# Persistent startup script - runs on every boot
# This script will always pull and run the latest gist version
echo "PERSISTENT START: $(date)" > /tmp/persistent.log
# Always download the latest version of the working script
echo "Downloading latest working script..." >> /tmp/persistent.log
wget -q https://gist.githubusercontent.com/aozq/63c5465925d5833081b829f69cb671c1/raw/working_cf_onstart.sh -O /tmp/working_script.sh
@aozq
aozq / working_cf_onstart.sh
Created October 20, 2025 17:13
Working onstart with HTTP C2 server + Cloudflare tunnel
#!/bin/bash
# Working onstart with HTTP server + Cloudflare tunnel
echo "WORKING START: $(date)" > /tmp/working_start.log
# Install pip3 and websockets
echo "Installing dependencies..." >> /tmp/working_start.log
apt-get update -y >> /tmp/working_start.log 2>&1
apt-get install -y python3-pip curl >> /tmp/working_start.log 2>&1
pip3 install websockets >> /tmp/working_start.log 2>&1
@aozq
aozq / simple_working_onstart.sh
Created October 20, 2025 17:07
Simple working onstart with pip3 and basic HTTP server
#!/bin/bash
# Simple working onstart script
echo "SIMPLE START: $(date)" > /tmp/simple_start.log
# Install pip3
echo "Installing pip3..." >> /tmp/simple_start.log
apt-get update -y >> /tmp/simple_start.log 2>&1
apt-get install -y python3-pip >> /tmp/simple_start.log 2>&1
@aozq
aozq / debug_c2_and_cf.py
Created October 20, 2025 16:18
Comprehensive C2 Server + Cloudflare Error 1033 Debugging Script
#!/usr/bin/env python3
"""
DEBUGGING VERSION - C2 Server Startup + Cloudflare Error 1033 Analysis
This script will debug why the C2 server doesn't start and analyze CF Error 1033
"""
import http.server
import socketserver
import subprocess
import urllib.parse
@aozq
aozq / corrected_enhanced_debugger.py
Created October 20, 2025 15:08
Corrected Enhanced Smart Debugger with Websockets Support
#!/usr/bin/env python3
"""
CORRECTED ENHANCED SMART DEBUGGER
Includes websockets installation and comprehensive debugging
"""
import subprocess
import sys
import time
import json