diff options
| author | Ângelo Andrade Cirino <[email protected]> | 2021-07-15 23:23:48 -0300 |
|---|---|---|
| committer | Ângelo Andrade Cirino <[email protected]> | 2021-07-15 23:23:48 -0300 |
| commit | 81ad292ea67f82d88d785a37d23b1f1603996da1 (patch) | |
| tree | 817b50173948547f7e4b491da271918c67b8a5ff /xmake/modules/net/ping.lua | |
| parent | 942c32f448d9b8a850438aa2af1de2415b7ae872 (diff) | |
| parent | 8c1141aba414c07554179cb28687124514f6e770 (diff) | |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'xmake/modules/net/ping.lua')
| -rw-r--r-- | xmake/modules/net/ping.lua | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/xmake/modules/net/ping.lua b/xmake/modules/net/ping.lua index 1f361a5d6..5f555cccd 100644 --- a/xmake/modules/net/ping.lua +++ b/xmake/modules/net/ping.lua @@ -21,7 +21,6 @@ -- imports import("core.cache.detectcache") import("detect.tools.find_ping") -import("detect.tools.find_nmap") import("private.async.runjobs") -- send ping to hosts @@ -78,21 +77,6 @@ function main(hosts, opt) if data then timeval = data:match("time=([%d%s%.]-)ms", 1, true) or data:match("=([%d%s%.]-)ms TTL", 1, true) or "65535" end - if timeval == "65535" then - local nmap = find_nmap() - if nmap then - data = try { function() return os.iorun("%s -T5 --max-retries 1 -p 80 --max-rtt-timeout 1 %s", nmap, host) end } - if data then - local timeval_s = data:match("in ([%d%.]-) seconds") - if timeval_s then - timeval_s = tonumber(timeval_s:trim()) * 1000 - if timeval_s > 0 then - timeval = tostring(timeval_s) - end - end - end - end - end -- save results if timeval then @@ -114,8 +98,6 @@ function main(hosts, opt) detectcache:set("net.ping", cacheinfo) detectcache:save() end - - -- ok? return results end |
