Skip to content

Instantly share code, notes, and snippets.

@abelboldu
Last active November 22, 2016 22:54
Show Gist options
  • Save abelboldu/ed3f7f5b6a7fae42a8da to your computer and use it in GitHub Desktop.
Save abelboldu/ed3f7f5b6a7fae42a8da to your computer and use it in GitHub Desktop.
Useful/fun/weird commands
#Find a (wired) Raspberry Pi on the network
nmap -sn 192.168.1.0/24 > /dev/null; cat /proc/net/arp | grep b8:27 | awk '{print $1}'
# Symmetric encrypt with Blowfish
openssl enc -bf-cbc -salt -in myfile.txt -out myfile.enc
# Symmetric decrypt with Blowfish
openssl enc -d -bf-cbc -in myfile.enc -out myfile.txt
# Almost invisible shell
ssh -o UserKnownHostsFile=/dev/null -T user@host /bin/bash -i
# Ask for coffee:
xxd /dev/urandom | grep --color 'cafe'
# Reverse SSH tunnel
ssh -o TCPKeepAlive=yes -o ServerAliveInterval=30 -fnNvvR 0.0.0.0:9000:10.60.1.250:80 root@www.wtf.com &> /var/log/tunnel
#Listen for passwords on sshd
$ strace -f -e "read" -p <pid_of_sshd> 2>log
... wait
# Where I am?
whois `curl -s icanhazip.com` | grep country | awk '{print $2}'
# Convert flac to mp3 with parallel
parallel ffmpeg -i {} -c:a libmp3lame {.}.mp3 ::: *.flac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment