-
Notifications
You must be signed in to change notification settings - Fork 1
/
nasm-compiler-loader.sh
47 lines (45 loc) · 3.97 KB
/
nasm-compiler-loader.sh
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
#!/bin/bash
echo " ███▄ █ ▄▄▄ ██████ ███▄ ▄███▓ "
echo " ██ ▀█ █ ▒████▄ ▒██ ▒ ▓██▒▀█▀ ██▒ "
echo "▓██ ▀█ ██▒▒██ ▀█▄ ░ ▓██▄ ▓██ ▓██░ "
echo "▓██▒ ▐▌██▒░██▄▄▄▄██ ▒ ██▒▒██ ▒██ "
echo "▒██░ ▓██░ ▓█ ▓██▒▒██████▒▒▒██▒ ░██▒ "
echo "░ ▒░ ▒ ▒ ▒▒ ▓▒█░▒ ▒▓▒ ▒ ░░ ▒░ ░ ░ "
echo "░ ░░ ░ ▒░ ▒ ▒▒ ░░ ░▒ ░ ░░ ░ ░ "
echo " ░ ░ ░ ░ ▒ ░ ░ ░ ░ ░ "
echo " ░ ░ ░ ░ ░ "
echo " ▄████▄ ▒█████ ███▄ ▄███▓ ██▓███ ██▓ ██▓ ▓█████ ██▀███ "
echo "▒██▀ ▀█ ▒██▒ ██▒▓██▒▀█▀ ██▒▓██░ ██▒▓██▒▓██▒ ▓█ ▀ ▓██ ▒ ██▒ "
echo "▒▓█ ▄ ▒██░ ██▒▓██ ▓██░▓██░ ██▓▒▒██▒▒██░ ▒███ ▓██ ░▄█ ▒ "
echo "▒▓▓▄ ▄██▒▒██ ██░▒██ ▒██ ▒██▄█▓▒ ▒░██░▒██░ ▒▓█ ▄ ▒██▀▀█▄ "
echo "▒ ▓███▀ ░░ ████▓▒░▒██▒ ░██▒▒██▒ ░ ░░██░░██████▒░▒████▒░██▓ ▒██▒ "
echo "░ ░▒ ▒ ░░ ▒░▒░▒░ ░ ▒░ ░ ░▒▓▒░ ░ ░░▓ ░ ▒░▓ ░░░ ▒░ ░░ ▒▓ ░▒▓░ "
echo " ░ ▒ ░ ▒ ▒░ ░ ░ ░░▒ ░ ▒ ░░ ░ ▒ ░ ░ ░ ░ ░▒ ░ ▒░ "
echo "░ ░ ░ ░ ▒ ░ ░ ░░ ▒ ░ ░ ░ ░ ░░ ░ "
echo "░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ "
echo "░██▓ ▒█████ ▄▄▄ ▓█████▄ ▓█████ ██▀███ "
echo "▓██▒ ▒██▒ ██▒▒████▄ ▒██▀ ██▌▓█ ▀ ▓██ ▒ ██▒ "
echo "▒██░ ▒██░ ██▒▒██ ▀█▄ ░██ █▌▒███ ▓██ ░▄█ ▒ "
echo "▒██░ ▒██ ██░░██▄▄▄▄██ ░▓█▄ ▌▒▓█ ▄ ▒██▀▀█▄ "
echo "░██████▒░ ████▓▒░ ▓█ ▓██▒░▒████▓ ░▒████▒░██▓ ▒██▒ "
echo "░ ▒░▓ ░░ ▒░▒░▒░ ▒▒ ▓▒█░ ▒▒▓ ▒ ░░ ▒░ ░░ ▒▓ ░▒▓░ "
echo "░ ░ ▒ ░ ░ ▒ ▒░ ▒ ▒▒ ░ ░ ▒ ▒ ░ ░ ░ ░▒ ░ ▒░ "
echo " ░ ░ ░ ░ ░ ▒ ░ ▒ ░ ░ ░ ░ ░░ ░ "
echo " ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ "
echo " ░ "
if [ $# -ne 1 ]
then
echo "[+] Invalid paramters specified"
echo "[+] Usage: ./nasm-compiler-loader <filename>"
exit 1
fi
filename=$(basename $1)
nasm -f elf $1
if [ $? -eq 0 ];
then
ld -m elf_i386 -s -o $filename $filename.o
chmod +x $filename
rm $filename.o
./$filename
rm $filename
fi