From c3f37d9e0964c68a63bbb08c5fbbd3e569078f07 Mon Sep 17 00:00:00 2001 From: Andrea Cardaci Date: Tue, 6 Apr 2021 09:42:52 +0200 Subject: [PATCH] Fix and simplify gcc file delete --- _gtfobins/gcc.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/_gtfobins/gcc.md b/_gtfobins/gcc.md index acea39a..21c7012 100644 --- a/_gtfobins/gcc.md +++ b/_gtfobins/gcc.md @@ -4,11 +4,12 @@ functions: - code: | LFILE=file_to_read gcc -x c -E "$LFILE" + file-write: # XXX this should be file-delete + - code: | + LFILE=file_to_delete + gcc -xc /dev/null -o $LFILE shell: - code: gcc -wrapper /bin/sh,-s . sudo: - code: sudo gcc -wrapper /bin/sh,-s . - file-delete: - - code: | - echo "int main(){printf(\" Hello \");return 0;}" > /tmp/oye.c ; gcc -nostdlib /tmp/oye.c -o [FILE-TO-DELETE] . ---