mirror of
https://github.com/sairson/Yasso.git
synced 2026-02-11 14:25:00 +08:00
优化代码结构
This commit is contained in:
@@ -10,7 +10,7 @@ import (
|
||||
|
||||
var allCmd = &cobra.Command{
|
||||
Use: "all",
|
||||
Short: "Use all scanner module (.attention)\nSome service not support proxy,You might lose it [*]",
|
||||
Short: "Use all scanner module (.attention) Some service not support proxy,You might lose it [*]",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
if Hosts == "" {
|
||||
_ = cmd.Help()
|
||||
|
||||
@@ -52,13 +52,13 @@ func resolveIP(ip string) ([]string, error) {
|
||||
var err error
|
||||
switch footmark {
|
||||
case "24":
|
||||
var ip3 = strings.Join(strings.Split(ip[:len(ip)], ".")[0:3], ".")
|
||||
var ip3 = strings.Join(strings.Split(ip[:], ".")[0:3], ".")
|
||||
for i := 0; i <= 255; i++ {
|
||||
temp = append(temp, ip3+"."+strconv.Itoa(i))
|
||||
}
|
||||
err = nil
|
||||
case "16":
|
||||
var ip2 = strings.Join(strings.Split(ip[:len(ip)], ".")[0:2], ".")
|
||||
var ip2 = strings.Join(strings.Split(ip[:], ".")[0:2], ".")
|
||||
for i := 0; i <= 255; i++ {
|
||||
for j := 0; j <= 255; j++ {
|
||||
temp = append(temp, ip2+"."+strconv.Itoa(i)+"."+strconv.Itoa(j))
|
||||
|
||||
Reference in New Issue
Block a user