Attempting to automatically monitor a network device using an old W7 box (no monitor or keyboard) with the intent to send an email using smtpMail if a connection goes MIA
Using a variant of NetCat in Linux returns Zero with a connection and non-Zero when not connected ... attempting this in W7 with Ncat 7.4 always returns 0 ... attempts to install the latest versions of NMAP/NCAT in W7 (7.92 and 7.93) fail ... ping is too wordy and arp -a 192.168.0.100 appears to always show a value (cached ? )
Are there other ways to programmatically determine if a device has disappeared from a network?
Thanks in advance for any help you can provide
from Linux 10 buster (pi 4b) this shell script works
if nc -zw1 192.168.0.100 80; then
echo "connected"
else
echo "not connected"
fi
from W7pro 64b with ncat 7.4 the following vbs script always returns 0 (ExitCode)
DIM wshShell, oExec
Set wshShell = CreateObject ("WScript.Shell")
Set oExec = wshShell.exec("c:\temp\nmap\ncat.exe -zw1 192.168.0.100 80;")
Wscript.echo(oExec.ExitCode)
Using a variant of NetCat in Linux returns Zero with a connection and non-Zero when not connected ... attempting this in W7 with Ncat 7.4 always returns 0 ... attempts to install the latest versions of NMAP/NCAT in W7 (7.92 and 7.93) fail ... ping is too wordy and arp -a 192.168.0.100 appears to always show a value (cached ? )
Are there other ways to programmatically determine if a device has disappeared from a network?
Thanks in advance for any help you can provide
from Linux 10 buster (pi 4b) this shell script works
if nc -zw1 192.168.0.100 80; then
echo "connected"
else
echo "not connected"
fi
from W7pro 64b with ncat 7.4 the following vbs script always returns 0 (ExitCode)
DIM wshShell, oExec
Set wshShell = CreateObject ("WScript.Shell")
Set oExec = wshShell.exec("c:\temp\nmap\ncat.exe -zw1 192.168.0.100 80;")
Wscript.echo(oExec.ExitCode)