@@ -38,6 +38,7 @@ type MainConfig struct {
3838 Ports []string `yaml:"ports,flow"`
3939 Users []string `yaml:"users,flow"`
4040 Passwords []string `yaml:"passwords,flow"`
41+ Keys []string `yaml:"keys,flow"`
4142 } `yaml:"main"`
4243 ServerLists []ServerListConfig `yaml:"serverList"`
4344}
@@ -48,6 +49,7 @@ type ServerListConfig struct {
4849 Port string `yaml:"port"`
4950 User string `yaml:"user"`
5051 Password string `yaml:"password"`
52+ Key string `yaml:"key"`
5153 Alias string `yaml:"alias"`
5254}
5355
@@ -122,7 +124,8 @@ func GenerateCombination(ip string, user string, conf *MainConfig) (combinations
122124 users = utils .InterfaceSlice (conf .Main .Users )
123125 }
124126 passwords := utils .InterfaceSlice (conf .Main .Passwords )
127+ keys := utils .InterfaceSlice (conf .Main .Keys )
125128 // Generate combinations with immutable parameter order
126- combinations = cartesian .Iter (ips , ports , users , passwords )
129+ combinations = cartesian .Iter (ips , ports , users , passwords , keys )
127130 return
128131}
0 commit comments