优化核心逻辑

This commit is contained in:
2025-01-08 16:01:08 +08:00
parent b51d64644f
commit 18ab5ae4ef
4 changed files with 14 additions and 12 deletions

View File

@@ -81,7 +81,7 @@ func Is_Name_Ipset(setName string) int {
}
func Is_Ip_Ipset(ip string) int {
cmd := exec.Command("sh", "-c", fmt.Sprintf("ipset list | grep \"%s\" | cut -d ':' -f 2 | sed 's/ //g'", ip))
cmd := exec.Command("sh", "-c", fmt.Sprintf("ipset list | grep \"%s\"", ip))
err := cmd.Run()
if err != nil {