Skip to content

Instantly share code, notes, and snippets.

@phpsyscoder
phpsyscoder / README.md
Last active July 29, 2019 00:33 — forked from cyrus-and/README.md
let-in - User-initiated reverse shell via OpenSSL

let-in

User-initiated reverse support shell via OpenSSL from a host user behind a firewall to the guest.

Usage

  1. Both parties run:
@phpsyscoder
phpsyscoder / asciinema-to-scriptreplay
Created July 28, 2019 10:14 — forked from izabera/asciinema-to-scriptreplay
convert between asciinema and scriptreplay
#!/bin/bash
exec {times}> times {typescript}> typescript < "${1-/dev/stdin}"
while read -r; do [[ $REPLY = ' "stdout": [' ]] && break; done # skip to this line
LANG=C
printf "Script started on %(%c)T\n" -1 >&"$typescript" # dummy
while read -r open; [[ $open = '[' ]]; do
read -r elapsed; read -r string; read -r close
eval printf %b%n "$string" characters >&"$typescript" # put count in $characters
printf "%s %s\n" "${elapsed%,}" "$characters" >&"$times"
done
@phpsyscoder
phpsyscoder / print256colours.sh
Created July 27, 2019 17:03 — forked from HaleTom/print256colours.sh
Print a 256-colour test pattern in the terminal
#!/bin/bash
# Tom Hale, 2016. MIT Licence.
# Print out 256 colours, with each number printed in its corresponding colour
# See http://askubuntu.com/questions/821157/print-a-256-color-test-pattern-in-the-terminal/821163#821163
set -eu # Fail on errors or undeclared variables
printable_colours=256