Skip to content

Instantly share code, notes, and snippets.

@vnea
Last active January 25, 2022 17:20
Show Gist options
  • Save vnea/c29bef185fe961dd8011a147be89df94 to your computer and use it in GitHub Desktop.
Save vnea/c29bef185fe961dd8011a147be89df94 to your computer and use it in GitHub Desktop.
Bash commands
# Cat all files in current directory
find . -type f -exec cat {} +
# Sniff network
sudo tcpdump -Aq > logs.txt
tcpdump -i any -nn -s0 -A tcp port 80 | grep ...
# Sniff SMTP
tcpdump -i any -nn -s0 -A tcp port 25
# Find PID which uses port and kill it
sudo lsof -i :5432
kill -9 5432
# Send mail with Telnet
telnet server.smtp.fr 25
EHLO plop
mail from: toto@email.fr
rcpt to: titi@email.fr
data
Subject: plop
coucou
.
CTRL + D
CTRL + ALT GR + ] -> quit
# Zip folder with password
zip -e -r dest_zip_file.zip source_folder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment