#!/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) type notify-send > /dev/null 2>&1 && notify-send "Terminal dimensions" "Rows: $rows\nColumns: $columns\nstty command on clipboard" echo "stty rows $rows cols $columns" | xclip -i -selection clipboard