Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
19 lines (18 sloc) 443 Bytes
#!/bin/bash
echo '[-] 32-Bit Assembly to Shellcode converter '
echo ''
echo ''
echo '[+] Assembling with Nasm ... '
nasm -f elf32 -o $1.o $1
echo '[+] Linking ...'
ld -m elf_i386 -o $1.bin $1.o
echo ''
echo '[+] Generating shellcode ...'
for i in $(objdump -d ./$1.bin |grep "^ " |cut -f2); do echo -n '\x'$i >> sc.txt; done; echo
cat sc.txt
echo''
echo '[+] Checking for null bytes ...'
cat sc.txt |grep 00
rm sc.txt
echo ''
echo '[+] Done.'
You can’t perform that action at this time.