This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """ | |
| Bulk-update A records in FreeIPA DNS, driven by a CSV file. | |
| CSV format (no header): | |
| fqdn,new_ip | |
| Example: | |
| host1.example.com,10.200.1.50 | |
| host2.example.com,10.200.0.75 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -euo pipefail | |
| if [[ $# -lt 1 ]]; then | |
| echo "Usage: $0 <file> [rndc_key]" | |
| echo " rndc_key defaults to /etc/rndc.key" | |
| exit 1 | |
| fi | |
| FILE="$1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -euo pipefail | |
| if [[ $# -lt 1 ]]; then | |
| echo "Usage: $0 <file>" | |
| exit 1 | |
| fi | |
| FILE="$1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| param( | |
| [Parameter(Mandatory=$true)] | |
| [string]$File | |
| ) | |
| if (-not (Test-Path $File)) { | |
| Write-Host "File not found: $File" | |
| exit 1 | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """ | |
| Bulk-delete PTR records from FreeIPA DNS, driven by a CSV file. | |
| CSV format (no header): | |
| fqdn,ip | |
| Example: | |
| host1.example.com,192.168.1.50 | |
| host2.example.com,10.0.0.75 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """ | |
| Bulk-add PTR records to FreeIPA DNS, driven by a CSV file. | |
| CSV format (no header): | |
| fqdn,ip | |
| Example: | |
| host1.example.com,192.168.1.50 | |
| host2.example.com,10.0.0.75 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # --- CONFIGURATION --- | |
| FORWARD_ZONES=("example.com" "internal.lan") | |
| # --------------------- | |
| if ! klist -s; then | |
| echo "❌ Error: No valid Kerberos ticket found. Please run 'kinit admin' first." | |
| exit 1 | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # Exit immediately if any command fails | |
| set -e | |
| # --- CONFIGURATION --- | |
| FAILED_LIST="failed_servers.txt" | |
| ENV_DIR="./environments" | |
| OUTPUT_FILE="classified_failed_servers.txt" | |
| TEMP_FILE="matched_raw.tmp" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Check if a file path was provided | |
| if [ -z "$1" ]; then | |
| echo "Usage: $0 /path/to/your/logfile.log" | |
| exit 1 | |
| fi | |
| FILE=$1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # | |
| # networkmonitor.sh - Per-process network bandwidth monitor (nethogs alternative) | |
| # | |
| # Samples 'ss -tupni' byte counters (bytes_acked / bytes_received) per connection, | |
| # maps them to PIDs, and computes upload/download rates. | |
| # | |
| # Usage: ./networkmonitor.sh [interval_seconds] | |
| # Run as root (sudo) for full visibility of all processes. |
NewerOlder