Skip to content

Commit d0f5888

Browse files
authored
Merge pull request #4 from pyneda/master
v0.1-b.8 - Fix errors
2 parents efdbf83 + 847806e commit d0f5888

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

sharesniffer.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,11 @@ def get_nfs_shares(self, hostlist):
109109
continue
110110
else:
111111
openshares.append(sharedict)
112-
for share in openshares:
113-
shares['openshares'].append(share['sharename'])
114-
for share in closedshares:
115-
shares['closedshares'].append(share['sharename'])
116-
nfsshares.append(shares)
112+
for share in openshares:
113+
shares['openshares'].append(share['sharename'])
114+
for share in closedshares:
115+
shares['closedshares'].append(share['sharename'])
116+
nfsshares.append(shares)
117117
return nfsshares
118118

119119
def get_smb_shares(self, hostlist):
@@ -333,7 +333,7 @@ def sniff_network():
333333
if len(hostlist_nfs) > 0 or len(hostlist_smb) > 0:
334334
if len(hostlist_nfs) > 0:
335335
shares['nfsshares'] = sniff.get_nfs_shares(hostlist_nfs)
336-
if len(shares['nfsshares']) > 0 and not args.quiet:
336+
if isinstance(shares['nfsshares'], list) and len(shares['nfsshares']) > 0 and not args.quiet:
337337
print('\n******************************* NFS SHARES ********************************\n')
338338
for host in shares['nfsshares']:
339339
print('host: %s open: %s closed: %s' % (host['host'],

0 commit comments

Comments
 (0)