i am running on fedora 15 ( python 2.7 )
i've tried the imapcket.smb against win开发者_C百科dows 2000 sp4 (frensh) , windows xp sp2 (frensh) , windows xp sp3 (frensh) and it worked perfectly , but when i use it against windows 7 (frensh) x64 it didn't work .
from my python :
>>> import impacket.smb as smb
>>> session = smb.SMB ( '*SMBSERVER' , '192.168.56.103' )
and i always get the following line :
>>> NetBIOSError ( 'Cannot request session', 240, 130 )
i can't understand why this is happening
*SMBSERVER
is a NetBios alias that would allow to establish a SMB over NetBIOS (port 139) connection against a target Windows machine without knowing the real NetBIOS server name of the target. Since Vista on, that alias has been deprecated.
So you have two choices:
session = smb.SMB ( '<TARGET NETBIOS NAME>' , '192.168.56.103' )
. You will need to know in advance the target's NetBIOS namesession = smb.SMB ( '192.168.56.103' , '192.168.56.103', sess_port = 445 )
. This will connect to target port 445 where you don't need to know the target's NetBIOS server name.
精彩评论