forked from gwen001/pentest-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtestrce.sh
More file actions
executable file
·33 lines (26 loc) · 722 Bytes
/
testrce.sh
File metadata and controls
executable file
·33 lines (26 loc) · 722 Bytes
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
#!/bin/bash
f_payload=$1
f_url=$2
rand1=$(tr -dc 'A-HJ-NP-Za-km-z2-9' < /dev/urandom | dd bs=12 count=1 status=none)
rand2=$(tr -dc 'A-HJ-NP-Za-km-z2-9' < /dev/urandom | dd bs=12 count=1 status=none)
tmpfile="/tmp/$rand1"
echo "tmpfile: $tmpfile"
subdomain=$rand2
echo "subdomain: $subdomain"
if [ $# -gt 2 ] ; then
verbose=$3
else
verbose=0
fi
if [ $# -gt 3 ] ; then
cookies=$4
else
cookies=''
fi
cp $f_payload $tmpfile
sed -i "s/__RANDOM_STR__/$subdomain/g" $tmpfile
cmd='testxss --cookies "'$cookies'" --no-color --threads 5 --payload $tmpfile --prefix --suffix --single "'$f_url'" --inject GP --gpg --encode --wish "QSDFGHJKLMNBVCXWAZERTYPOIU" --verbose '$verbose
echo $cmd
eval $cmd
sleep 5s
#rm $tmpfile