This file contains 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
use Net::DNS; | |
# GetHostAddresses(resolver,hostname) | |
# returns list of IP addresses for hostname | |
sub GetHostAddresses ($$) { | |
my ($resolver,$hostname) = @_; | |
my @addresses; | |
my $received = $resolver->search($hostname); | |
if ($received) { |
This file contains 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
# commands used to encrypt a filesystem image | |
# create the encryption key (256 bits in hex) | |
openssl rand -hex 32 > /root/aes_key.txt | |
# move to top of desired filesystem to backup and encrypt | |
cd /mnt/root-to-back-up | |
# Tar using xz compression and pipe to AES256 encryption | |
tar cvfJ - . | openssl enc -aes-256-cbc -e -pass file:/root/aes_key.txt -out /mnt/USB-thumb-drive/encrypted-backup.tar.xz |
OlderNewer