From dd4d02f1af41793978f17de2ce816dc2bd688de0 Mon Sep 17 00:00:00 2001 From: Elisha Hollander Date: Wed, 19 Jan 2022 20:19:21 +0200 Subject: [PATCH] remove nested statement with the same condition --- src/html/spawn.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/html/spawn.py b/src/html/spawn.py index 956bf71d6..28d917264 100644 --- a/src/html/spawn.py +++ b/src/html/spawn.py @@ -294,13 +294,12 @@ def web_server_start(): thread.start_new_thread(webserver.start_server, (web_port, path)) - if apache == 0: - if os.path.isfile(userconfigpath + "meta_config"): - msf_path = meta_path() - #print("You will need to launch the listener on your own, execute in a different shell the following command if using Metasploit:") - child = pexpect.spawn("%smsfconsole -r %s/meta_config" % (msf_path, userconfigpath)) - child.interact() - pause=raw_input("Press when you want to shut down the web server. It is currently listening.") + if os.path.isfile(userconfigpath + "meta_config"): + msf_path = meta_path() + #print("You will need to launch the listener on your own, execute in a different shell the following command if using Metasploit:") + child = pexpect.spawn("%smsfconsole -r %s/meta_config" % (msf_path, userconfigpath)) + child.interact() + pause=raw_input("Press when you want to shut down the web server. It is currently listening.") # Handle KeyboardInterrupt except KeyboardInterrupt: