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/sh | |
test -n "$SSH_CONNECTION" || { | |
echo "No SSH_CONNECTION defined." >&2 | |
echo "Example usage: ssh host dumpcap -P -i eth0 -f '\"not \$(${0##*/})\"' -w - | wireshark -k -i -" >&2 | |
exit 1 | |
} | |
read h1 p1 h2 p2 <<EOF | |
$SSH_CONNECTION |
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
package main | |
import ( | |
"crypto/tls" | |
"flag" | |
"fmt" | |
"io" | |
"log" | |
"net" | |
"net/textproto" |
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
#!/usr/bin/env python3 | |
import subprocess, sys, re | |
from urllib.parse import quote, unquote | |
proc = subprocess.Popen( | |
["pinentry"], stdout=subprocess.PIPE, stdin=subprocess.PIPE, text=True, bufsize=1 | |
) | |
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
#!/usr/bin/python | |
import socket, os, select, struct | |
import errno | |
import logging | |
from logging import info, warn, error | |
logging.root.setLevel(logging.INFO) |
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
#!/usr/bin/python | |
import Crypto.Hash.SHA, Crypto.Hash.HMAC | |
import sys, re, os | |
import getopt | |
import time | |
kh_re=re.compile(r'^\|1\|(?P<salt>[a-zA-Z0-9/+]+=*)\|(?P<hash>[a-zA-Z0-9/+]+=*) (?P<keytype>\S+) (?P<hostkey>[a-zA-Z0-9/+]+=*)$') | |
def read_kh(fname): | |
ret=[] |
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
#!/usr/bin/env python3 | |
import sys | |
import os | |
import json | |
args = sys.argv[1:] | |
if not args: | |
print( |
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/sh | |
# colorize hardware temperatures for i3status (more red as temp gets closer to crit) | |
# (shell internal commands only) | |
## this script expects i3status to give output in the format of "i3bar", | |
## and having a placeholder with string "TEMPERATURE" | |
## .config/i3status/config should contain something like this: | |
# general { | |
# output_format = "i3bar" |
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/sh | |
remote="$1" | |
test -d "$2" || { | |
echo "Usage: ${0##*/} <host:port> <cert_dirs..>" >&2 | |
exit 1 | |
} | |
shift |
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
package main | |
import ( | |
"bytes" | |
"encoding/binary" | |
"encoding/hex" | |
"errors" | |
"flag" | |
"fmt" | |
"image" |
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
package main | |
import ( | |
"database/sql" | |
"encoding/csv" | |
"fmt" | |
"github.com/lib/pq" | |
"io" | |
"log" | |
"os" |
NewerOlder