Framework: Use -c instead of -C to execute payload

-C will execute the file when it doesn't have the executable bit set, however, it will also set the noclobber option and prevent overwriting files. To use -c instead, we must set the executable bit for the user in case they haven't done it themselves.
orig
Marc 2020-05-26 19:50:25 +01:00 committed by GitHub
parent 0ff12c2267
commit 0ae5e95b05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -128,7 +128,8 @@ function execute_payload() {
;;
"payload" | "payload.sh" | "payload.txt")
sed -i 's/\r//g' $payload
echo "bash -C '$payload'" | at now
chmod +x $payload
echo "bash -c '$payload'" | at now
;;
*)
/usr/bin/LED FAIL