- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshellcodegenerator.sh
More file actions
Latest commit
21 lines (20 loc) · 515 Bytes
/
Copy pathshellcodegenerator.sh
File metadata and controls
21 lines (20 loc) · 515 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# generate an shellcodes from an assembled file will echo some cool info
CODESLEN=0
FAULT=false
SHELLCODE=""
foriin$(objdump -d $1|grep "^ "|cut -f2);
doecho -n '\\x'$i;
CODESLEN=$((CODESLEN+1));
SHELLCODE="$SHELLCODE\\x$i"
if [ "$i"="00" ]
then
FAULT=true
fi
done;echo
echo"[+] Shellcode length : "$CODESLEN
if [ "$FAULT"=true ]
then
echo"[-] \\x00 hexadecimal code detected, segmentation fault will occur!"
fi
echo$SHELLCODE> shellcode.txt
echo"[+] Wrote Shellcode to shellcode.txt"