@@ -168,13 +168,20 @@ 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
+
172
+ joinedProducts := strings .Join (product , "/" )
173
+ if joinedProducts == vendor {
174
+ newConf .Product = vendor // prevents awkward duplicate word output such as "Validating Product Product"
175
+ } else {
176
+ newConf .Product = fmt .Sprintf ("%s %s" , vendor , joinedProducts )
177
+ }
178
+
171
179
newConf .InitFlagsStructs ()
172
180
newConf .Impl = implemented
173
181
newConf .ExType = extype
174
182
newConf .SupportedC2 = supportedC2
175
183
newConf .Vendor = vendor
176
184
newConf .Products = product
177
- newConf .Product = fmt .Sprintf ("%s %s" , vendor , strings .Join (product , "/" ))
178
185
newConf .C2AutoStart = true
179
186
newConf .CPE = cpe
180
187
newConf .CVE = cve
@@ -189,13 +196,20 @@ func NewLocalExploit(implemented ImplementedFeatures, extype ExploitType, suppor
189
196
product []string , cpe []string , cve string ,
190
197
) * Config {
191
198
newConf := new (Config )
199
+
200
+ joinedProducts := strings .Join (product , "/" )
201
+ if joinedProducts == vendor {
202
+ newConf .Product = vendor // prevents awkward duplicate word output such as "Validating Product Product"
203
+ } else {
204
+ newConf .Product = fmt .Sprintf ("%s %s" , vendor , joinedProducts )
205
+ }
206
+
192
207
newConf .InitFlagsStructs ()
193
208
newConf .Impl = implemented
194
209
newConf .ExType = extype
195
210
newConf .SupportedC2 = supportedC2
196
211
newConf .Vendor = vendor
197
212
newConf .Products = product
198
- newConf .Product = fmt .Sprintf ("%s %s" , vendor , strings .Join (product , "/" ))
199
213
newConf .C2AutoStart = true
200
214
newConf .CPE = cpe
201
215
newConf .CVE = cve
0 commit comments