Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions NetSpray
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ show_usage() {
echo "Usage: $0 <protocols|all> <targets> -u <username> [-p <password> | -H <hash>] [OPTIONS]"
echo ""
echo "Required:"
echo " protocols Protocols to test: smb,ldap,winrm,rdp,mssql,ssh or 'all'"
echo " protocols Protocols to test: smb,ldap,winrm,rdp,mssql,ssh,ftp,nfs,vnc,wmi or 'all'"
echo " targets IP address, IP range, or file with targets (one per line)"
echo " -u USERNAME Username to spray"
echo ""
Expand Down Expand Up @@ -117,9 +117,9 @@ fi
#-------- PROTOCOL SETUP

# Handle 'all' protocols or parse comma-separated list
# Order: smb → winrm → rdp → mssql → ssh → ldap
# Order: smb → winrm → rdp → mssql → ssh → ldap → ftp → nfs → vnc → wmi
if [ "$PROTOCOLS_INPUT" = "all" ]; then
PROTOCOL_LIST=(smb winrm rdp mssql ssh ldap)
PROTOCOL_LIST=(smb winrm rdp mssql ssh ldap ftp nfs vnc wmi)
else
IFS=',' read -ra PROTOCOL_LIST <<< "$PROTOCOLS_INPUT"
fi
Expand Down Expand Up @@ -179,4 +179,4 @@ for PROTOCOL in "${PROTOCOL_LIST[@]}"; do
done

# FINAL
echo "[+] Spray Complete!"
echo "[+] Spray Complete!"
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ sudo chmod +x /usr/local/bin/NetSpray
Usage: NetSpray <protocols|all> <targets> -u <username> [-p <password> | -H <hash>] [OPTIONS]

Required:
protocols Protocols to test: smb,ldap,winrm,rdp,mssql,ssh or 'all'
protocols Protocols to test: smb,ldap,winrm,rdp,mssql,ssh,ftp,nfs,vnc,wmi or 'all'
targets IP address, IP range, or file with targets (one per line)
-u USERNAME Username to spray

Expand All @@ -47,11 +47,16 @@ NetSpray smb,winrm,rdp,ldap,ssh,mssql target -u '' -p ''

# Available Protocals
smb
ldap
winrm
ssh
rdp
mssql
ssh
ldap
ftp
nfs
vnc
wmi
```
# Proof

<img width="1199" height="512" alt="image" src="https://github.com/0xmrsecurity/NetExec-Stuff/blob/main/NetSpray.png" />
<img width="1199" height="512" alt="image" src="https://github.com/0xmrsecurity/NetExec-Stuff/blob/main/NetSpray.png" />