mirror of
https://github.com/cimryan/teslausb.git
synced 2026-03-01 04:30:33 +00:00
switch to using hping3 for connectivity testing/ip resolution
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
#!/bin/bash -eu
|
||||
|
||||
echo "$(ping -c 1 -w 1 $1 2>/dev/null | head -n 1 | grep -o -e "(\([[:digit:]]\{1,3\}\.\)\{3\}[[:digit:]]\{1,3\})" | tr -d '()')"
|
||||
echo "$(hping3 -c 1 -S -p 445 -n $1 2>/dev/null | head -n 1 | grep -o -e "\W\([[:digit:]]\{1,3\}\.\)\{3\}[[:digit:]]\{1,3\})" | tr -d ' )')"
|
||||
Reference in New Issue
Block a user