Skip to content

Instantly share code, notes, and snippets.

View fuzzbuster's full-sized avatar
:octocat:
Studying Ninjutsu hard

N1nJi4.X fuzzbuster

:octocat:
Studying Ninjutsu hard
  • Pentest Ninja Dojo
  • 木ノ葉の里
View GitHub Profile
@fuzzbuster
fuzzbuster / update-node-20-lts.sh
Created September 9, 2025 02:58
This script will ensure all your global CLI tools are updated alongside Node.js and npm, minimizing compatibility issues after the version upgrade.
#!/bin/bash
set -e
# Color output functions
info() { echo -e "\033[1;34m$1\033[0m"; }
success() { echo -e "\033[1;32m$1\033[0m"; }
error() { echo -e "\033[1;31m$1\033[0m"; exit 1; }
# --------------------------
# Detect nvm installation (optimized for oh-my-zsh)
#!/bin/bash
set -e # Exit immediately if any command fails
# 1. Update system package index
echo "=== Updating system package index ==="
sudo apt-get update -y
# 2. Install basic compilation tools and dependencies (via system repositories)
echo -e "\n=== Installing basic compilation tools ==="
sudo apt install -y build-essential clang llvm libc6-dev linux-libc-dev git
#!/bin/bash
# Purpose: Send port knocking sequences to open/close SSH access (with pre-checks)
# Usage: ./knock_ssh_client.sh <server_ip> <action>
# Actions: "open" (allow SSH), "close" (block SSH after use)
# Match these with the server's OPEN_PORTS and CLOSE_PORTS
OPEN_SEQ="10001 10002 10003"
CLOSE_SEQ="10003 10002 10001"
# Check arguments
#!/bin/bash
# Ensure the script is executed with root privileges
if [ "$(id -u)" -ne 0 ]; then
echo "Error: Please run with root privileges (sudo $0)" >&2
exit 1
fi
# Configuration variables
IP_FILE="ips.txt"
#!/bin/bash
# Check if running as root
if [ "$(id -u)" -ne 0 ]; then
echo "This script must be run as root" >&2
exit 1
fi
# Prompt for custom workflow
echo "Do you want to customize user creation and SSH key setup? (y/n)"
@fuzzbuster
fuzzbuster / console_print.js
Last active February 14, 2025 02:17
dev console arts
// <script>
// 消除控制台打印
var HoldLog = console.log;
console.log = function () {};
let now1 = new Date();
queueMicrotask(() => {
const Log = function () {
HoldLog.apply(console, arguments);
};
//在恢复前输出日志
#!/bin/bash
code --list-extensions > extensions_list.txt
echo "#!/bin/bash" > install_vscode_extensions.sh
echo "" >> install_vscode_extensions.sh
while IFS= read -r extension
do
echo "code --install-extension $extension" >> install_vscode_extensions.sh
done < extensions_list.txt