Commit graph

11 commits

Author SHA1 Message Date
Meitar M
af5b75b2a0
Make seautomate functional with Python 3.
Per Debian policy, Python versions 3 and greater must be called from the
`python3` executable, not the `python` executable. This means
Debian-based systems with Python 3 installed but not Python 2 will fail
to launch SET through `seautomate` because the `python` executable is
hard-coded into the call to `pexpect.spawn()`.

This commit uses the standard library's
`distutils.spawn.find_executable()` method to locate the correct path to
`python3` or, failing that, the correct path to the `python` executable
and uses the result of that call as the first command line word with
which to invoke `setoolkit`.

The `distutils.spawn.find_executable()` method is available at that
exact name in both Python 2 and 3, so this should be portable across all
Python versions.

Note that the shebang line references `python`, and so Python 3-only
systems such as newer Debian-based builds may need to invoke
`seautomate` using an explicit interpreter for it to work:

```sh
sudo python3 ./seautomate /path/to/script/file.txt
```
2020-03-10 14:33:22 -04:00
TrustedSec
e436f21dba fix issue with wget not installed and fallback to urllib or urllib2 2016-09-27 11:49:48 -04:00
TrustedSec
e26622c95a fix path issue for local setoolkit 2016-09-27 11:15:03 -04:00
Ryan Jarvis
6315fbc1b7 Updated {} to {0} 2016-07-28 16:16:24 -07:00
Ryan Jarvis
7f1bba07b9 PEP8 and python3 changes for root files 2016-07-28 13:19:04 -07:00
Ryan Jarvis
1e4b95f102 PEP8 and python3 changes 2016-07-22 09:52:36 -07:00
TrustedSec
cc1e2a4295 pep8 and python3 refactoring 2016-01-14 15:50:06 -05:00
TrustedSec
df37fd6f2e Multiple bug fixes 2015-07-13 17:29:42 -04:00
Sol Roberts
2fd03958c6 minor refactors, PEP8 and readability. Converted readme.txt to readme.md markdown format 2013-12-17 23:06:29 -07:00
TrustedSec
87a235b3a5 Multiple bug fixes and additions for 5.4.2 release. 2013-12-03 21:12:11 -05:00
TrustedSec
91c7bcf740 Updated launchers to stay consistent with names 2013-11-21 14:05:20 -05:00
Renamed from set-automate (Browse further)