You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
9 lines
486 B
9 lines
486 B
#!/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
|
|
|