Skip to content

Instantly share code, notes, and snippets.

@teraflik
Created November 21, 2022 06:28
Show Gist options
  • Save teraflik/edf86b714e0cf38734b8f3fe00b515ef to your computer and use it in GitHub Desktop.
Save teraflik/edf86b714e0cf38734b8f3fe00b515ef to your computer and use it in GitHub Desktop.
Some useful commands and queries

Socat to listen to UDP Traffic:

socat - UDP4-LISTEN:8125,reuseaddr,fork

Share an encrypted message:

echo -n "secret" | openssl enc -aes-256-cbc -a -k "password"
echo "encryptedOutput" | openssl enc -d -aes-256-cbc -a

MySQL find number of connections for each host:

select host, count(*) from (SELECT left(host,char_length(host)-6) as host FROM information_schema.processlist) as a group by host;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment