shirosaidev / sharesniffer

Network share sniffer and auto-mounter for crawling remote file systems
Apache License 2.0
202 stars 42 forks source link

v0.1-b.8 - Fix errors #4

Closed pyneda closed 6 years ago

pyneda commented 6 years ago

The following errors have been detected and fixed:

Traceback (most recent call last):
  File "sharesniffer.py", line 514, in <module>
    shares = sniff_network()
  File "sharesniffer.py", line 335, in sniff_network
    shares['nfsshares'] = sniff.get_nfs_shares(hostlist_nfs)
  File "sharesniffer.py", line 112, in get_nfs_shares
    for share in openshares:
UnboundLocalError: local variable 'openshares' referenced before assignment
Traceback (most recent call last):
  File "sharesniffer.py", line 514, in <module>
    shares = sniff_network()
  File "sharesniffer.py", line 336, in sniff_network
    if len(shares['nfsshares']) > 0 and not args.quiet:
TypeError: object of type 'NoneType' has no len()
shirosaidev commented 6 years ago

thanks for the patch