Added error handling when searching file contents
parent
39887088bf
commit
b2f0533ff3
|
@ -2630,6 +2630,7 @@ def dir_list(files, ip, path, pattern, share, smb):
|
|||
return
|
||||
|
||||
def search_content(smb, path, result, share, pattern, ip):
|
||||
try:
|
||||
rfile = RemoteFile(smb, path + '/' + result.get_longname(), share, access = FILE_READ_DATA)
|
||||
rfile.open()
|
||||
|
||||
|
@ -2647,6 +2648,8 @@ def search_content(smb, path, result, share, pattern, ip):
|
|||
print_att("//{}/{}/{} offset:{} pattern:{}".format(ip, path.replace("//",""), result.get_longname().encode('utf8'), rfile.tell(), pattern))
|
||||
rfile.close()
|
||||
return
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
def enum_shares(smb):
|
||||
permissions = {}
|
||||
|
|
Loading…
Reference in New Issue