From 0cff8351ac5ba9f9a237b67725bab828e7b26bee Mon Sep 17 00:00:00 2001 From: shadow1ng Date: Tue, 17 Nov 2020 15:48:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9mac=E4=B8=8Bping=E6=89=80?= =?UTF-8?q?=E9=9C=80=E7=9A=84bash=E8=B7=AF=E5=BE=84,=E6=94=B9=E4=B8=BA/bin?= =?UTF-8?q?/bash=E3=80=82(=E5=8E=9F=E4=B8=BA/usr/local/bin/bash)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Plugins/icmp.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Plugins/icmp.go b/Plugins/icmp.go index d8842cd..bb9c75d 100644 --- a/Plugins/icmp.go +++ b/Plugins/icmp.go @@ -198,6 +198,8 @@ func ICMPRun(hostslist []string, IcmpThreads int, Ping bool) []string { PingCMDcheck(hostslist, "/bin/bash") } } else { + fmt.Println("The current user permissions unable to send icmp packets") + fmt.Println("start ping") PingCMDcheck(hostslist, "/bin/bash") } } else if SysInfo.OS == "darwin" { @@ -205,10 +207,12 @@ func ICMPRun(hostslist []string, IcmpThreads int, Ping bool) []string { if Ping == false { IcmpCheck(hostslist, IcmpThreads) } else { - PingCMDcheck(hostslist, "/usr/local/bin/bash") + PingCMDcheck(hostslist, "/bin/bash") } } else { - PingCMDcheck(hostslist, "/usr/local/bin/bash") + fmt.Println("The current user permissions unable to send icmp packets") + fmt.Println("start ping") + PingCMDcheck(hostslist, "/bin/bash") } } return AliveHosts