Merge pull request #472 from knweiss/referenced_but_not_assigned3

run_rp_banner(), run_application_banner(): Three issues
This commit is contained in:
Dirk Wetter 2016-09-14 16:33:47 +02:00 committed by GitHub
commit 05fe064763

View File

@ -1147,7 +1147,7 @@ run_rp_banner() {
if [[ $? -ne 0 ]]; then if [[ $? -ne 0 ]]; then
outln "--" outln "--"
fileout "rp_header" "INFO" "No reverse proxy banner found" fileout "rp_header" "INFO" "No reverse proxy banner found"
else else
while read line; do while read line; do
line=$(strip_lf "$line") line=$(strip_lf "$line")
if ! $first; then if ! $first; then
@ -1156,7 +1156,7 @@ run_rp_banner() {
first=false first=false
fi fi
emphasize_stuff_in_headers "$line" emphasize_stuff_in_headers "$line"
rp_banners="$rp_bannersline" rp_banners="${rp_banners}${line}"
done < $TMPFILE done < $TMPFILE
fileout "rp_header" "INFO" "Reverse proxy banner(s) found: $rp_banners" fileout "rp_header" "INFO" "Reverse proxy banner(s) found: $rp_banners"
fi fi
@ -1182,7 +1182,7 @@ run_application_banner() {
outln "--" outln "--"
fileout "app_banner" "INFO" "No Application Banners found" fileout "app_banner" "INFO" "No Application Banners found"
else else
cat $TMPFILE | while read line; do while IFS='' read -r line; do
line=$(strip_lf "$line") line=$(strip_lf "$line")
if ! $first; then if ! $first; then
out "$spaces" out "$spaces"
@ -1190,8 +1190,8 @@ run_application_banner() {
first=false first=false
fi fi
emphasize_stuff_in_headers "$line" emphasize_stuff_in_headers "$line"
app_banners="$app_bannersline" app_banners="${app_banners}${line}"
done done < "$TMPFILE"
fileout "app_banner" "WARN" "Application Banners found: $app_banners" fileout "app_banner" "WARN" "Application Banners found: $app_banners"
fi fi
tmpfile_handle $FUNCNAME.txt tmpfile_handle $FUNCNAME.txt