-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
23 lines (22 loc) · 869 Bytes
/
setup.sh
File metadata and controls
23 lines (22 loc) · 869 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
directory=$(pwd)
gcc testMyShellcode.c -o testMyShellcode
gcc testMyShellcode.c -fno-stack-protector -o testMyShellcode_noNX
echo "Do you want to include the debugMyShellcode directory to your path?"
echo -e "\tWARNING!: This will change the PATH environment variable using the ~/.bashrc file so"
echo -en "\tthat you can use the tools included in the directory from anywhere in your system. [Y/n]: "
read option
if [[ $option = [yY] ]]; then
echo -ne "\nIs $directory the correct debugMyShellcode directory? [Y/n]: "
read correct
if ! [[ $correct = [yY] ]]; then
echo -n "Input the correct directory: "
read directory
if ! [ -d "$directory" ]; then
echo "[ERROR]: \"$directory\" is not a directory"
exit
fi
fi
echo -ne "\nexport PATH=\$PATH:$directory # So that you can use the debugMyShellcode tools from anywhere" >> ~/.bashrc
fi
bash