git clone https://github.com/certbot/certbot /opt/letsencrypt
ln -s /opt/letsencrypt/certbot-auto /usr/bin/certbot
certbot certonly --expand --agree-tos --text --non-interactive \
--standalone \
| https://devjlanza.wordpress.com/2012/05/11/recover-data-after-running-dd-ifdevzero-for-a-few-seconds/ | |
| Friday morning working on installing OpenWrt pivot overlay on an USB pendrive. I need to format the USB and as I was doing it quite so many times I wasn’t paying too much attention. Don’t do that at home ;) | |
| The USB was recognized as /dev/sdb1 on my laptop but on the router it was on /dev/sda1. As you have probably already guessed my main laptop hardrive was /dev/sda1. | |
| I didn’t notice I wasn’t in the router console (f….. tabs) and after having successfully formatted the USB I decided to make it zero: | |
| # dd if=/dev/zero of=/dev/sda1 | |
| I continue working on the laptop but when in typed ‘ls’ nothing is shown and even I got unknown command. Uppps… something is going wrong. I just realized I was formatting my hard drive in stead of the USB. |
| #!/bin/sh | |
| # save dog.sh in /root/dog.sh. | |
| # You can use winscp with scp protocol to do this. | |
| # Using ssh set executation permission and replace the crontab: | |
| # chmod +x /root/dog.sh | |
| # echo "* * * * * /root/dog.sh" | crontab - | |
| # fix wpad / wpad-mini / hostapd stop working bug | |
| logread -l 100 | grep -n "IEEE 802.11: did not acknowledge authentication response" |
| #!/bin/bash | |
| # Author: Gustavo Lichti | |
| # Email: gustavo.lichti@gmail.com | |
| # Usage: ./scan_hosts.sh --hosts <hosts_file> --host xpto.xxx --host xpto2.xxx --threads <number_of_threads> --output <output_directory> | |
| SCRIPT_STARTED=$(date +"%Y%m%d_%H%M") | |
| # Function do add log Line |
| :global lastTimeLogingFailure; | |
| :local varEmail "my@email.com"; | |
| :local varEmailSubj "failure login"; | |
| :local Hostname [/system identity get name]; | |
| :local filter "login failure"; | |
| :local varDate [/system clock get date]; | |
| :local varMonth [:pick $varDate 0 3]; | |
| :local varDay [:pick $varDate 4 6]; |
git clone https://github.com/certbot/certbot /opt/letsencrypt
ln -s /opt/letsencrypt/certbot-auto /usr/bin/certbot
certbot certonly --expand --agree-tos --text --non-interactive \
--standalone \
| # Using yubikey to unlock LUKS partitions | |
| # My SDB3 is a partitions with luks, with lvm and ma root fs (/) | |
| # My SDA1 ia my data partition with luks mounted at /data | |
| # I will use yubikey as 2FA to unlock the SDB3 and the SDA1 will be unlocked by a key file | |
| ## On SDB3 | |
| # Configure the slot two of yubikey to challenge mode |
| ### | |
| # Explain | |
| # RG Number -> AB.CDE.FGH-V | |
| # X=(Hx9)+(Gx8)+(Fx7)+(Ex6)+(Dx5)+(Cx4)+(Bx3)+(Ax2)+(100xV) | |
| # Y= X%11 | |
| # If Y (rest of division) is 0 the RG is Valid | |
| ### | |
| # Function to validate Brazilian "RG" | |
| def isValidRG(number,dv): |
| #!/bin/bash | |
| BYellow='\033[1;33m' | |
| BGreen='\033[1;32m' | |
| Color_Off='\033[0m' | |
| LOCALPATH=$PWD | |
| OUTPUT=$LOCALPATH/OUTPUT | |
| if [ ! -d $OUTPUT ]; then |
| Imagem Docker para rodar um firefox com o warsaw configurado para acesso a bancos brasileiros. | |
| É uma boa opção para acessar bancos através de GNU/Linux. | |
| Have a nice day. | |
| More Info: | |
| https://hub.docker.com/r/lichti/warsaw-browser/ | |
| https://github.com/lichti/containers4docker/tree/master/warsaw-browser |
| #!/bin/bash | |
| MYSQL_LOGIN='-uroot --password=neOfByon' | |
| while read line | |
| do | |
| # SIZE | DATABASE | TABLE | FLAG | |
| SIZE=$( echo "$line" | cut -d\| -f 1) | |
| DATABASE=$( echo "$line" | cut -d\| -f 2) | |
| TABLE=$( echo "$line" | cut -d\| -f 3) |