Skip to content

Commit

Permalink
Merge branch 'smb1_dialect_fix' of https://github.com/rmaksimov/impacket
Browse files Browse the repository at this point in the history
 into rmaksimov-smb1_dialect_fix
  • Loading branch information
asolino committed Jan 27, 2020
2 parents 2aefcc5 + d49cc05 commit 9ce62d7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions examples/samrdump.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
from impacket.nt_errors import STATUS_MORE_ENTRIES
from impacket.dcerpc.v5 import transport, samr
from impacket.dcerpc.v5.rpcrt import DCERPCException
from impacket.smb import SMB_DIALECT
#from impacket.smb import SMB_DIALECT

class ListUsersException(Exception):
pass
Expand Down Expand Up @@ -70,8 +70,8 @@ def dump(self, remoteName, remoteHost):
rpctransport.set_dport(self.__port)
rpctransport.setRemoteHost(remoteHost)

if hasattr(rpctransport,'preferred_dialect'):
rpctransport.preferred_dialect(SMB_DIALECT)
# if hasattr(rpctransport,'preferred_dialect'):
# rpctransport.preferred_dialect(SMB_DIALECT)
if hasattr(rpctransport, 'set_credentials'):
# This method exists only for selected protocol sequences.
rpctransport.set_credentials(self.__username, self.__password, self.__domain, self.__lmhash,
Expand Down
6 changes: 3 additions & 3 deletions examples/smbexec.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

from impacket.examples import logger
from impacket import version, smbserver
from impacket.smbconnection import SMB_DIALECT
#from impacket.smbconnection import SMB_DIALECT
from impacket.dcerpc.v5 import transport, scmr

OUTPUT_FILENAME = '__output'
Expand Down Expand Up @@ -136,8 +136,8 @@ def run(self, remoteName, remoteHost):
rpctransport = transport.DCERPCTransportFactory(stringbinding)
rpctransport.set_dport(self.__port)
rpctransport.setRemoteHost(remoteHost)
if hasattr(rpctransport,'preferred_dialect'):
rpctransport.preferred_dialect(SMB_DIALECT)
# if hasattr(rpctransport,'preferred_dialect'):
# rpctransport.preferred_dialect(SMB_DIALECT)
if hasattr(rpctransport, 'set_credentials'):
# This method exists only for selected protocol sequences.
rpctransport.set_credentials(self.__username, self.__password, self.__domain, self.__lmhash,
Expand Down

0 comments on commit 9ce62d7

Please sign in to comment.