Some simple scripts. For fun / personal use.
Simple bash scripts for batch image format conversion:
jpg_png.sh
- Convert JPG files to PNG formatpng_jpg.sh
- Convert PNG files to JPG formatwebp_png.sh
- Convert WebP files to PNG format
Usage: ./script_name.sh file1.jpg file2.jpg file3.jpg
rename.sh
- Batch rename files with a common prefix- Prompts for prefix and renames all provided files
- Usage:
./rename.sh file1.txt file2.txt file3.txt
pcap_activity_analyser.py
- Analyse PCAP files for network activity patterns- Groups PCAP files by 24-hour periods based on timestamps in filenames
- Reports on network activity patterns and file sizes
- Can filter for files with unencrypted traffic (requires
tshark
) - Supports recursive directory scanning and ZIP creation
- Usage:
python3 pcap_activity_analyser.py [options]
upduck.sh
- Update Duck DNS domain IP addresses
A simple script to update the IP address that a Duck DNS domain name resolves to.
- $DUCKDNS_DOMAIN: The domain you want to update
- $DUCKDNS_TOKEN: The token to use to authenticate the request
- $DUCKDNS_IP: (Optional) The IP address that the provided domain should resolve to — Duck DNS will detect and use the source IP otherwise
*All other Duck DNS API options are optional; I'm aiming for feature parity in the future.
NOTE: command line options override environment variables.
- Invalid arguments
- Failure to find
wget
on the system - No domain provided, by command option or environment variable
- No token provided, by command option or environment variable
- Duck DNS returned a 'normal' bad response (check inputs)
- Duck DNS returned an unexpected error / response
Thanks to the folks at Duck DNS for offering such a great service!