Moves binaries for use with gnu stow
This commit is contained in:
parent
f528ba793c
commit
4fd9f4809b
89 changed files with 0 additions and 0 deletions
49
bin/.bin/dmenu/rofi-reverse-shells
Executable file
49
bin/.bin/dmenu/rofi-reverse-shells
Executable file
|
@ -0,0 +1,49 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# Use dmenu to pick a reverse shell
|
||||
#
|
||||
# Requirements:
|
||||
# dmenu, xsel
|
||||
#
|
||||
|
||||
SHELLS="$(dirname $0)/shells.txt"
|
||||
|
||||
function notify() {
|
||||
if [ "$(command -v notify-send)" ]; then
|
||||
notify-send "$1" "$2"
|
||||
fi
|
||||
}
|
||||
|
||||
function getIP(){
|
||||
ip route |
|
||||
grep -oe 'src [^ ]* ' | # Get in the form 'src ipaddress'
|
||||
awk '{print $2}' | # Get the ip
|
||||
sort -u | # Get the unique ones
|
||||
rofi -dmenu -i -p "IP Address"
|
||||
}
|
||||
|
||||
function getPort() {
|
||||
rofi -dmenu -p "Port"
|
||||
}
|
||||
|
||||
function getReverseShell() {
|
||||
ip="$1"
|
||||
port="$2"
|
||||
cat "$SHELLS" |
|
||||
sed "s/\[IPADDR\]/$ip/g" |
|
||||
sed "s/\[PORT\]/$port/g" |
|
||||
rofi -dmenu -i -p "Reverse Shell" |
|
||||
cut -d'|' -f2-
|
||||
}
|
||||
|
||||
function display() {
|
||||
ip=$(getIP)
|
||||
port=$(getPort)
|
||||
reverseShell=$(getReverseShell $ip $port)
|
||||
|
||||
echo -n "$reverseShell" | /usr/bin/xclip -i -selection clipboard
|
||||
}
|
||||
|
||||
|
||||
# display displays :)
|
||||
display
|
Loading…
Add table
Add a link
Reference in a new issue