Skip to content

Commit 6dcbb75

Browse files
atucomEkultek
authored andcommitted
fixed check_for_msf() to check in $PATH (#108)
* fixed check_for_msf() to check in $PATH * check_msf_path() now checks both os.environ and PATH
1 parent 02aac59 commit 6dcbb75

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/settings.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import platform
77
import getpass
88
import tempfile
9+
import distutils.spawn
910
# import subprocess
1011

1112
import psutil
@@ -179,7 +180,7 @@ def check_for_msf():
179180
"""
180181
check the ENV PATH for msfconsole
181182
"""
182-
return os.getenv("msfconsole", False)
183+
return os.getenv("msfconsole", False) or distutils.spawn.find_executable("msfconsole")
183184

184185
def logo():
185186
"""

0 commit comments

Comments
 (0)