From 6bf809731abfd1893e73f6c6b35d0a22dacd6fb2 Mon Sep 17 00:00:00 2001 From: Orfeas <38209077+0xfea5@users.noreply.github.com> Date: Tue, 23 Apr 2024 19:38:50 +0300 Subject: Small changes to the Makefile and the scripts --- run.sh | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'run.sh') diff --git a/run.sh b/run.sh index 6de5897..c0d4886 100755 --- a/run.sh +++ b/run.sh @@ -6,5 +6,18 @@ then exit 1 fi -gnome-terminal -- bash ./scripts/scan.sh "$1" -gnome-terminal -- bash ./scripts/read.sh "$1" +if [ ! $(cat /proc/sys/kernel/yama/ptrace_scope) -eq 0 ] +then + echo "ptrace_scope is not set to 0 and ptrace attach will subsequently fail + To solve this issue you can run the following command: + + echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope" + exit 1 +fi + +TERM_EMU=gnome-terminal + +# The syntax for the startup command may differ per terminal emulator. +make && \ +${TERM_EMU} -- bash ./scripts/scan.sh "$1" && \ +${TERM_EMU} -- bash ./scripts/read.sh "$1" -- cgit v1.2.3