Renames examples directory

This commit is contained in:
Jonathan Hodgson 2020-06-03 21:02:33 +01:00
parent 7347860e1e
commit 52795ad633

9
examples/stty-resize-copy Executable file
View file

@ -0,0 +1,9 @@
#!/usr/bin/env bash
#
# This gets the dimentions of the terminal and puts the approprate stty command on the clipboard for reverse shells
columns=$(stty -a < /dev/stdin | grep -oE 'columns [0-9]+' | cut -d' ' -f2)
rows=$(stty -a < /dev/stdin | grep -oE 'rows [0-9]+' | cut -d' ' -f2)
notify-send "Terminal dimensions" "Rows: $rows\nColumns: $columns\nstty command on clipboard"
echo "stty rows $rows cols $columns" | xclip -i -selection clipboard