@@ -168,13 +168,13 @@ func NewRemoteExploit(implemented ImplementedFeatures, extype ExploitType, suppo
168
168
product []string , cpe []string , cve string , protocol string , defaultPort int ,
169
169
) * Config {
170
170
newConf := new (Config )
171
+ newConf .Product = deDupeProductName (product , vendor )
171
172
newConf .InitFlagsStructs ()
172
173
newConf .Impl = implemented
173
174
newConf .ExType = extype
174
175
newConf .SupportedC2 = supportedC2
175
176
newConf .Vendor = vendor
176
177
newConf .Products = product
177
- newConf .Product = fmt .Sprintf ("%s %s" , vendor , strings .Join (product , "/" ))
178
178
newConf .C2AutoStart = true
179
179
newConf .CPE = cpe
180
180
newConf .CVE = cve
@@ -184,18 +184,27 @@ func NewRemoteExploit(implemented ImplementedFeatures, extype ExploitType, suppo
184
184
return newConf
185
185
}
186
186
187
+ func deDupeProductName (product []string , vendor string ) string {
188
+ joinedProducts := strings .Join (product , "/" )
189
+ if joinedProducts == vendor {
190
+ return vendor
191
+ }
192
+
193
+ return fmt .Sprintf ("%s %s" , vendor , joinedProducts )
194
+ }
195
+
187
196
// Defines a new remote exploit and associates with CVE/Product/Protocol metadata. Usage example:.
188
197
func NewLocalExploit (implemented ImplementedFeatures , extype ExploitType , supportedC2 []c2.Impl , vendor string ,
189
198
product []string , cpe []string , cve string ,
190
199
) * Config {
191
200
newConf := new (Config )
201
+ newConf .Product = deDupeProductName (product , vendor )
192
202
newConf .InitFlagsStructs ()
193
203
newConf .Impl = implemented
194
204
newConf .ExType = extype
195
205
newConf .SupportedC2 = supportedC2
196
206
newConf .Vendor = vendor
197
207
newConf .Products = product
198
- newConf .Product = fmt .Sprintf ("%s %s" , vendor , strings .Join (product , "/" ))
199
208
newConf .C2AutoStart = true
200
209
newConf .CPE = cpe
201
210
newConf .CVE = cve
0 commit comments