Skip to content

Instantly share code, notes, and snippets.

.ssh

Security Consideration

About SSH Agent Forwarding :

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).

@frntn
frntn / keyservers.md
Created October 14, 2020 06:46 — forked from rjhansen/keyservers.md
SKS Keyserver Network Under Attack

SKS Keyserver Network Under Attack

This work is released under a Creative Commons Attribution-NoDerivatives 4.0 International License.

Terminological Note

"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.

Who am I?

@frntn
frntn / clean-up-boot-partition-ubuntu.md
Created October 24, 2018 19:49 — forked from ipbastola/clean-up-boot-partition-ubuntu.md
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
@frntn
frntn / broadcast_calc.sh
Created May 23, 2018 21:13 — forked from cskeeters/broadcast_calc.sh
Bash script for calculating network and broadcast addresses from ip and netmask or CIDR Notation
#!/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
@frntn
frntn / qubes-secpack-signature-check
Created April 3, 2018 14:56
Missing Pubkey in QubesOS secpack
$ 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
@frntn
frntn / keybase.md
Last active March 26, 2018 23:46
Misc

Uploading private keys

https://github.com/keybase/keybase-issues/issues/160#issuecomment-37070418
@frntn
frntn / gopass_binary_test.sh
Created September 18, 2017 20:58
Gopass Binary Test
#!/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
@frntn
frntn / genpass.sh
Created August 2, 2017 22:57
GenPass function to your bashrc
# 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
}
@frntn
frntn / fd-setcolor.sh
Last active August 21, 2017 09:31
Colored File Descriptor
#!/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)
@frntn
frntn / gpg-key-validity.sh
Created June 21, 2017 01:59
GnuPG web of trust : automate multiple scenarii to help the understanding of https://www.gnupg.org/gph/en/manual/x334.html
#!/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)"