SSH Agent forwarding exposes your authentication to the server you're connecting to. By default, an attacker with control of the server (i.e. root access) can communicate with your agent and use your key to authenticate to other servers without any notification (i.e. impersonate you).
This work is released under a Creative Commons Attribution-NoDerivatives 4.0 International License.
"OpenPGP" refers to the OpenPGP protocol, in much the same way that HTML refers to the protocol that specifies how to write a web page. "GnuPG", "SequoiaPGP", "OpenPGP.js", and others are implementations of the OpenPGP protocol in the same way that Mozilla Firefox, Google Chromium, and Microsoft Edge refer to software packages that process HTML data.
$ uname -r
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Calculates network and broadcast based on supplied ip address and netmask | |
# Usage: broadcast_calc.sh 192.168.0.1 255.255.255.0 | |
# Usage: broadcast_calc.sh 192.168.0.1/24 | |
tonum() { | |
if [[ $1 =~ ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+) ]]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git clone https://github.com/QubesOS/qubes-secpack.git | |
$ cd qubes-secpack | |
$ gpg --import keys/*/* | |
gpg: key C37BB66B: public key "Joanna Rutkowska (Qubes OS signing key) <[email protected]>" imported | |
gpg: key 1E30A75D: public key "Joanna Rutkowska (Qubes OS signing key) <[email protected]>" imported | |
gpg: key 74EADABC: public key "Joanna Rutkowska (Qubes OS signing key) <[email protected]>" imported | |
gpg: key 65EF29CA: public key "Joanna Rutkowska (Qubes OS Signing Key) <[email protected]>" imported | |
gpg: key 34898310: public key "Joanna Rutkowska (Qubes OS Signing Key) <[email protected]>" imported |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo -n $'\x63\x61\x74' > before.txt | |
echo -n $'\x63\n\x61\n\x74\n' > before_lf.txt | |
echo -n $'\x63\r\n\x61\r\n\x74\r\n' > before_crlf.txt | |
echo -n $'\x63\r\x61\r\x74\r' > before_cr.txt | |
echo -n $'\x01\x63\x61\x74' > before.bin | |
echo -n $'\x01\x63\n\x61\n\x74\n' > before_lf.bin | |
echo -n $'\x01\x63\r\n\x61\r\n\x74\r\n' > before_crlf.bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# add this to your .bashrc | |
function genpass { | |
isint='^[1-9][0-9]*$' | |
[[ $1 =~ $isint ]] && count=$1 || count=1 | |
[[ $2 =~ $isint ]] && len=$2 || len=10 | |
for i in $(seq 1 $count); do </dev/urandom tr -dc A-Za-z0-9 | head -c$len ; echo ; done | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# just put this at the beginning of your scripts | |
trap "{ sleep 1; }" EXIT | |
red="" ; [ -t 1 ] && [ -t 2 ] && red="$(tput setaf 1)" | |
rst="" ; [ -t 1 ] && [ -t 2 ] && rst="$(tput sgr0)" | |
logdir="/tmp" | |
exec 3> "$logdir/raw.log" | |
exec 2> >( awk '{print strftime("%Y%m%dT%H:%M:%S%z")" - STDERR - "$0 ; fflush(stdout)}' | tee -a $logdir/${0%.*}.err > >( awk '{print "'$red'"$0"'$rst'" ; fflush(stdout)}' )) | |
exec 1> >( awk '{print strftime("%Y%m%dT%H:%M:%S%z")" - STDOUT - "$0 ; fflush(stdout)}' | tee -a $logdir/${0%.*}.out) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Author: Matthieu Fronton <[email protected]> | |
# Profile: github.com/frntn | |
# Description: GnuPG web of trust : automate multiple scenarii to help the understanding of https://www.gnupg.org/gph/en/manual/x334.html | |
WAIT=4 | |
if [ -t 1 ]; then | |
cya="$(tput setaf 6)" |
NewerOlder