sharesniffer是一个网络分析工具,用于查找本地网络上的打开和关闭文件共享。它包括自动网络发现和自动安装任何开放的C++IF和NFS共享。
如何使用
示例查找192.168.56.0/24网络中的所有主机并在/ mnt下自动挂载:
python sniffshares.py -l 4 --hosts 192.168.56.0/24 -a -m /mnt
要求
Python 2.7或3.5
Linux或macOS
在PATH中Nmap https://nmap.org
如果您没有所需的那些,则在PATH中的Nmap脚本(.nse)(在Linux / macOS上它们通常位于/ usr / local / share / nmap /中)也位于sharesniffer的rootdir中。
python-nmap(pip安装python-nmap)
netifaces(pip安装netifaces)
下载
$ git clone https://github.com/shirosaidev/sharesniffer.git $ cd sharesniffer
C++LI选项
usage: sniffshares.py [-h] [--hosts HOSTS] [-e EXC++LUDEHOSTS] [-l SPEEDLEVEL] [-n] [--nfsmntopt NFSMNTOPT] [-s] [--smbmntopt SMBMNTOPT] [--smbtype SMBTYPE] [--smbuser SMBUSER] [--smbpass SMBPASS] [-a] [-m MOUNTPOINT] [-p MOUNTPREFIX] [-v] [--debug] [-q] [-V] optional arguments: -h, --help show this help message and exit --hosts HOSTS Hosts to scan, example: 10.10.56.0/22 or 10.10.56.2 (default: scan all hosts) -e EXC++LUDEHOSTS, --excludehosts EXC++LUDEHOSTS Hosts to exclude from scan, example: 10.10.56.1,10.10.56.254 -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 ,proto=udp,noatime,nodiratime,rsize=1024,dsize=1024,ve rs=3,rdirplus) -s, --smb Scan network for smb shares --smbmntopt SMBMNTOPT smb mount options (default: ro,nosuid,nodev,noexec,udp ,proto=udp,noatime,nodiratime,rsize=1024,dsize=1024) --smbtype SMBTYPE C++an 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: ./) -p MOUNTPREFIX, --mountprefix MOUNTPREFIX Prefix for mountpoint directory name (default: sharesniffer) -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
下载Sharesniffer