Awesome Open Source
Awesome Open Source



sharesniffer is a network analysis tool for finding open and closed file shares on your local network. It includes auto-network discovery and auto-mounting of any open cifs and nfs shares.

How to use

Example to find all hosts on any local network with open/closed nfs/smb shares:


Example to find all hosts in network, excluding possible router/firewalls, and auto-mount any open nfs/smb shares at /mnt:

python -l 4 --hosts -e, -a -m /mnt


  • Python 2.7. or 3.5/3.6 (tested on 2.7.15 and 3.6.5)
  • Linux or macOS
  • Nmap 7. in PATH (tested on 7.70)
  • Nmap scripts (.nse) (on Linux/macOS they are usually in /usr/local/share/nmap/scripts/ or /usr/share/nmap/scripts/)
  • python-nmap (pip install python-nmap)
  • netifaces (pip install netifaces)


$ git clone
$ cd sharesniffer

Download latest version

CLI Options

usage: [-h] [--hosts HOSTS] [-e EXCLUDEHOSTS] [-l SPEEDLEVEL]
                       [-n] [--nfsmntopt NFSMNTOPT] [-s]
                       [--smbmntopt SMBMNTOPT] [--smbtype SMBTYPE]
                       [--smbuser SMBUSER] [--smbpass SMBPASS] [-a]
                       [-m MOUNTPOINT] [-p MOUNTPREFIX] [-v] [--debug] [-q]

optional arguments:
  -h, --help            show this help message and exit
  --hosts HOSTS         Hosts to scan, example: or
                        (default: scan all hosts)
                        Hosts to exclude from scan, example:
  -l SPEEDLEVEL, --speedlevel SPEEDLEVEL
                        Scan speed aggressiveness level from 3-5, lower for
                        more accuracy (default: 4)
  -n, --nfs             Scan network for nfs shares
  --nfsmntopt NFSMNTOPT
                        nfs mount options (default: ro,nosuid,nodev,noexec,udp
  -s, --smb             Scan network for smb shares
  --smbmntopt SMBMNTOPT
                        smb mount options (default: ro,nosuid,nodev,noexec,udp
  --smbtype SMBTYPE     Can be smbfs (default) or cifs
  --smbuser SMBUSER     smb username (default: guest)
  --smbpass SMBPASS     smb password (default: none)
  -a, --automount       Auto-mount any open nfs/smb shares
  -m MOUNTPOINT, --mountpoint MOUNTPOINT
                        Mountpoint to mount shares (default: ./)
                        Prefix for mountpoint directory name (default:
  -v, --verbose         Increase output verbosity
  --debug               Debug message output
  -q, --quiet           Run quiet and just print out any possible mount points
                        for crawling
  -V, --version         Prints version and exits

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Python (1,122,675
Filesystem (1,882
Storage (1,657
Network Analysis (729
File Sharing (551
Nmap (374
Sniffer (221
Nfs (156
Related Projects