Run apt-get update && apt-get install crackmapexec
OS
Kali 2020.1
Detailed issue explanation
When installing crackmapexec from apt, the following error occurs when setting up...
Setting up python3-terminaltables (3.1.0-3) ...
Setting up python3-xmltodict (0.12.0-1) ...
Setting up python3-pylnk (0.2.1+git20200104-0kali1) ...
Setting up python3-requests-ntlm (1.1.0-1) ...
Setting up python3-winrm (0.4.1-0kali1) ...
Setting up crackmapexec (4.0.1+git20200118-0kali1) ...
/usr/lib/python3/dist-packages/cme/protocols/mssql.py:71: SyntaxWarning: "is" with a literal. Did you mean "=="?
if self.args.auth_type is 'windows':
/usr/lib/python3/dist-packages/cme/protocols/mssql.py:143: SyntaxWarning: "is" with a literal. Did you mean "=="?
if self.args.auth_type is 'windows':
/usr/lib/python3/dist-packages/cme/protocols/mssql.py:159: SyntaxWarning: "is" with a literal. Did you mean "=="?
res = self.conn.login(None, username, password, domain, None, True if self.args.auth_type is 'windows' else False)
/usr/lib/python3/dist-packages/cme/protocols/mssql.py:173: SyntaxWarning: "is" with a literal. Did you mean "=="?
out = u'{}{}:{} {}'.format('{}\'.format(domain) if self.args.auth_type is 'windows' else '',
/usr/lib/python3/dist-packages/cme/protocols/smb.py:910: SyntaxWarning: "is" with a literal. Did you mean "=="?
if self.args.ntds is 'vss':
Processing triggers for kali-menu (2020.1.7) ...
When attempting to run crackmapexec after, the following error appears:
# crackmapexec
Traceback (most recent call last):
File "/usr/bin/crackmapexec", line 11, in
load_entry_point('crackmapexec==5.0.0.dev0', 'console_scripts', 'crackmapexec')()
File "/usr/lib/python3/dist-packages/cme/crackmapexec.py", line 36, in main
args = gen_cli_args()
File "/usr/lib/python3/dist-packages/cme/cli.py", line 67, in gen_cli_args
protocol_object = p_loader.load_protocol(protocols[protocol]['path'])
File "/usr/lib/python3/dist-packages/cme/loaders/protocol_loader.py", line 12, in load_protocol
protocol = imp.load_source('protocol', protocol_path)
File "/usr/lib/python3.7/imp.py", line 169, in load_source
module = _exec(spec, sys.modules[name])
File "", line 630, in _exec
File "", line 728, in exec_module
File "", line 219, in _call_with_frames_removed
File "/usr/lib/python3/dist-packages/cme/protocols/smb.py", line 7, in
from impacket.smbconnection import SMBConnection, SessionError
File "", line 983, in _find_and_load
File "", line 963, in _find_and_load_unlocked
File "", line 906, in _find_spec
File "", line 1280, in find_spec
File "", line 1254, in _get_spec
File "", line 1235, in _legacy_get_spec
File "", line 441, in spec_from_loader
File "", line 594, in spec_from_file_location
File "/usr/local/lib/python3.7/dist-packages/impacket-0.9.19.dev0-py3.7.egg/impacket/smbconnection.py", line 266
except (smb.SessionError, smb3.SessionError), e:
^
SyntaxError: invalid syntax
Steps to reproduce
OS
Kali 2020.1
Detailed issue explanation
When installing crackmapexec from apt, the following error occurs when setting up...
Setting up python3-terminaltables (3.1.0-3) ... Setting up python3-xmltodict (0.12.0-1) ... Setting up python3-pylnk (0.2.1+git20200104-0kali1) ... Setting up python3-requests-ntlm (1.1.0-1) ... Setting up python3-winrm (0.4.1-0kali1) ... Setting up crackmapexec (4.0.1+git20200118-0kali1) ... /usr/lib/python3/dist-packages/cme/protocols/mssql.py:71: SyntaxWarning: "is" with a literal. Did you mean "=="? if self.args.auth_type is 'windows': /usr/lib/python3/dist-packages/cme/protocols/mssql.py:143: SyntaxWarning: "is" with a literal. Did you mean "=="? if self.args.auth_type is 'windows': /usr/lib/python3/dist-packages/cme/protocols/mssql.py:159: SyntaxWarning: "is" with a literal. Did you mean "=="? res = self.conn.login(None, username, password, domain, None, True if self.args.auth_type is 'windows' else False) /usr/lib/python3/dist-packages/cme/protocols/mssql.py:173: SyntaxWarning: "is" with a literal. Did you mean "=="? out = u'{}{}:{} {}'.format('{}\'.format(domain) if self.args.auth_type is 'windows' else '', /usr/lib/python3/dist-packages/cme/protocols/smb.py:910: SyntaxWarning: "is" with a literal. Did you mean "=="? if self.args.ntds is 'vss': Processing triggers for kali-menu (2020.1.7) ...
When attempting to run crackmapexec after, the following error appears:
# crackmapexec Traceback (most recent call last): File "/usr/bin/crackmapexec", line 11, in
load_entry_point('crackmapexec==5.0.0.dev0', 'console_scripts', 'crackmapexec')()
File "/usr/lib/python3/dist-packages/cme/crackmapexec.py", line 36, in main
args = gen_cli_args()
File "/usr/lib/python3/dist-packages/cme/cli.py", line 67, in gen_cli_args
protocol_object = p_loader.load_protocol(protocols[protocol]['path'])
File "/usr/lib/python3/dist-packages/cme/loaders/protocol_loader.py", line 12, in load_protocol
protocol = imp.load_source('protocol', protocol_path)
File "/usr/lib/python3.7/imp.py", line 169, in load_source
module = _exec(spec, sys.modules[name])
File "", line 630, in _exec
File "", line 728, in exec_module
File "", line 219, in _call_with_frames_removed
File "/usr/lib/python3/dist-packages/cme/protocols/smb.py", line 7, in
from impacket.smbconnection import SMBConnection, SessionError
File "", line 983, in _find_and_load
File "", line 963, in _find_and_load_unlocked
File "", line 906, in _find_spec
File "", line 1280, in find_spec
File "", line 1254, in _get_spec
File "", line 1235, in _legacy_get_spec
File "", line 441, in spec_from_loader
File "", line 594, in spec_from_file_location
File "/usr/local/lib/python3.7/dist-packages/impacket-0.9.19.dev0-py3.7.egg/impacket/smbconnection.py", line 266
except (smb.SessionError, smb3.SessionError), e:
^
SyntaxError: invalid syntax