from smb.SMBConnection import SMBConnection
conn = SMBConnection(userid="", password="", client_machine_name="", servername="",
domain="",use_ntlm_v2=True, is_direct_tcp=True)
conn.connect(serverip = "", 445)
shares = conn.listShares()
for share in shares:
if not share.isSpecial and share.name not in ['NETLOGON', 'SYSVOL']:
print("share name :" + share.name)
sharedfiles = conn.listPath(share.name,'/')
for sharedfile in sharedfiles:
print(sharedfile.filename)
conn.close()
'Python' 카테고리의 다른 글
Getting snmp informations with python script (0) | 2020.04.22 |
---|---|
USING THREAD IN PYTHON (0) | 2020.04.07 |
CRAWLING WITH PYTHON (0) | 2020.04.07 |
TRY TO CONNECT VIA MYSQL (0) | 2020.04.07 |
TRY TO TEST FOR DEFAULT ACCOUNT VIA TELNET (0) | 2020.04.07 |