Skip to content

Instantly share code, notes, and snippets.

View Cdaprod's full-sized avatar
🫠
Learn something new everyday!

David Cdaprod

🫠
Learn something new everyday!
View GitHub Profile
@Cdaprod
Cdaprod / Video_HUD_Overlay.py
Created April 9, 2025 22:22
Blender & Python HUD after effects template.
import bpy
# Clear default scene
bpy.ops.object.select_all(action='SELECT')
bpy.ops.object.delete()
# -------------------------------
# Load Background CapCut Export
# -------------------------------
bg = bpy.ops.import_image.to_plane(files=[{"name":"capcut_bg.mp4"}])
@Cdaprod
Cdaprod / 00-custom-motd.sh
Last active March 31, 2025 18:29
Dynamic “Cdaprod” ascii + MOTD
# Sudo tee and EOF removed for scriptable runs.
#sudo tee /etc/update-motd.d/00-custom > /dev/null <<'EOF'
#!/usr/bin/env bash
# Colors
GREEN="\e[32m"
YELLOW="\e[33m"
CYAN="\e[36m"
MAGENTA="\e[35m"
RED="\e[31m"
@Cdaprod
Cdaprod / create-bubble-cli.sh
Created March 30, 2025 22:31
A bash wrapper for Golang’s Bubbletea, Glamor, Lipgloss; to build and make command line tools from the console.
#!/bin/bash
# go-cli-wrapper.sh - A wrapper for running Go-based CLI tools
# Colors for terminal output
GREEN='\033[0;32m'
YELLOW='\033[0;33m'
RED='\033[0;31m'
NC='\033[0m' # No Color
# Check if Go is installed
@Cdaprod
Cdaprod / streamctl.sh
Last active April 3, 2025 21:57
My Linux live-streaming command—“Secret-Weapon Grade” Alias
#!/usr/bin/env bash
# sudo tee /dev/null <<'EOF'
# ==============================================================================
# Streamctl - Wayland/Wlroots Display Streaming Tool (Hardened, Parallel-Enabled)
#
# A versatile, fault-tolerant streaming control utility with support for:
# • HLS, MJPEG, RTSP streaming modes with graceful fallback
# • Custom streaming profiles (e.g. YouTube with your stream key)
# • OBS WebSocket configuration (port 4455) for eventual integration
# • Desktop recording mode
@Cdaprod
Cdaprod / f
Last active April 3, 2025 14:43
My personal “find” command—“Secret-Weapon Grade” Alias
#!/bin/bash
# =========================================================================
# Enhanced File Finder Script with FZF Integration
#
# Created by: David Cannan
# Email: [email protected]
# GitHub: https://github.com/Cdaprod
# YouTube: https://youtube.com/@Cdaprod
#
# Save to /usr/local/bin/f and make executable with: chmod +x /usr/local/bin/f
@Cdaprod
Cdaprod / enable-ssh-over-serial.sh
Created March 26, 2025 16:30
Enable SSH and Add Wi-Fi Config via Serial
sudo tee /etc/wpa_supplicant/wpa_supplicant.conf > /dev/null <<EOF
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=US
network={
ssid="YourWiFiSSID"
psk="YourWiFiPassword"
key_mgmt=WPA-PSK
}
@Cdaprod
Cdaprod / stream.sh
Last active April 2, 2025 21:10
Run `streamctl [start, stop, status, attach]` to stream desktop display over RTSP via ffmpeg & Wayland recorder.
#!/bin/bash
# Self-install if not already in /usr/local/bin
INSTALL_PATH="/usr/local/bin/streamctl"
if [[ "$0" != "$INSTALL_PATH" ]]; then
echo "[+] Installing streamctl to $INSTALL_PATH..."
mkdir -p "$(dirname "$INSTALL_PATH")"
cp "$0" "$INSTALL_PATH" 2>/dev/null || cat > "$INSTALL_PATH"
chmod +x "$INSTALL_PATH"
@Cdaprod
Cdaprod / auto-terminal-desktop-setup.sh
Last active March 23, 2025 18:14
Pi loads tmux terminal to desktop on boot for mirroring shellfish iOS sessions from iPhone.
#!/usr/bin/env bash
set -euo pipefail
echo "===> Setting up auto desktop terminal for shellfish-* tmux sessions..."
# Determine user and home directory
USER_NAME="${SUDO_USER:-$USER}"
USER_HOME=$(eval echo "~$USER_NAME")
AUTOSTART_DIR="$USER_HOME/.config/autostart"
BIN_DIR="$USER_HOME/bin"
@Cdaprod
Cdaprod / stream_shellfish_session.sh
Created March 23, 2025 17:56
Zero-state streaming: no saved files, pure pipeline: Stateless architecture, Portable: works from any Shellfish SSH session, OBS-ready: via browser source or v4l2 loopback (if needed)
#!/bin/bash
# === CONFIG ===
SESSION_NAME="shellfish"
DISPLAY_NAME=":0"
STREAM_PORT="8090"
FFMPEG_PATH=$(which ffmpeg)
WFREC_PATH=$(which wf-recorder)
GNOME_TERM=$(which gnome-terminal)
@Cdaprod
Cdaprod / tarpit.py
Created February 15, 2025 21:59
HoneyPot TarPit Python script
import socket
import time
import threading
from collections import defaultdict
# Settings
HOST = '0.0.0.0' # Listen on all interfaces
PORT = 22 # SSH default port
LOG_FILE = "attackers.log"
BLOCK_THRESHOLD = 5 # Number of attempts before blocking