From d9e4c48b717e9fe4f6e6979a7b4881014e0fa831 Mon Sep 17 00:00:00 2001 From: Matias Barcenas Date: Mon, 23 Apr 2018 04:38:00 -0500 Subject: [PATCH] Fixed bug with restoring self-gen-certs. --- attacks/Captive Portal/attack.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/attacks/Captive Portal/attack.sh b/attacks/Captive Portal/attack.sh index fda71f2..c4da766 100755 --- a/attacks/Captive Portal/attack.sh +++ b/attacks/Captive Portal/attack.sh @@ -321,6 +321,11 @@ captive_portal_set_certificate() { return 0 fi + # TODO: This is temporary solution, refactor this. + if [ "$CaptivePortalSSL" = "enabled" ]; then + local -r restoring=true + fi + captive_portal_unset_certificate # Check existance of ssl certificate within fluxion with file size > 0 @@ -341,7 +346,7 @@ captive_portal_set_certificate() { # Check if we're restoring and we need to re-create certificate. - if [ "$CaptivePortalSSL" = "enabled" ]; then + if [ "$restoring" ]; then if ! captive_portal_run_certificate_generator; then fluxion_conditional_bail "cert-gen failed!" return 2