Skip to content

Instantly share code, notes, and snippets.

@dsecuma
dsecuma / pdfcrypt.sh
Last active February 4, 2021 06:16
Poor script to encrypt all pdf in specific folder with AES256 (qpdf)
#!/bin/sh
stty -echo
while true; do
read -s -p "Password: " password
echo
read -s -p "Password (again): " password2
echo
[ "$password" = "$password2" ] && break
echo "Please try again"
@dsecuma
dsecuma / luksvol.sh
Created January 5, 2021 10:26
LUKS portable vol
#!/bin/bash
FILENAME="private.img";
FILESIZE="100M";
# Create encrypted volume if it doesn't exist
if [ ! -f $FILENAME ]; then
echo "Creating image file...";
dd if=/dev/zero of=$FILENAME bs=$FILESIZE count=0 seek=1
@dsecuma
dsecuma / adblock
Created March 25, 2020 18:43
OpenWRT adblock snippet to block COVID-19 bad domains by CCN-CERT
config source 'ccncovid'
option adb_src 'https://loreto.ccn-cert.cni.es/index.php/s/oDcNr5Jqqpd5cjn/download?path=%2F&files=IOC_dominios.txt'
option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
option adb_src_desc 'Lista de dominios IOC sobre COVID-19'
option enabled '1'