View Javadoc
1   /*******************************************************************************
2    * Copyhacked (H) 2012-2025.
3    * This program and the accompanying materials
4    * are made available under no term at all, use it like
5    * you want, but share and discuss it
6    * every time possible with every body.
7    * 
8    * Contributors:
9    *      ron190 at ymail dot com - initial implementation
10   ******************************************************************************/
11  package com.jsql.view.scan.interaction;
12  
13  import com.jsql.model.bean.util.Header;
14  import com.jsql.model.injection.vendor.model.Vendor;
15  import com.jsql.view.interaction.InteractionCommand;
16  import com.jsql.view.swing.util.MediatorHelper;
17  
18  import java.util.Map;
19  
20  /**
21   * Mark the injection as vulnerable to a blind injection.
22   */
23  public class SetVendor implements InteractionCommand {
24  
25      private final String url;
26      private final Vendor vendor;
27  
28      @SuppressWarnings("unchecked")
29      public SetVendor(Object[] interactionParams) {
30          Map<Header, Object> params = (Map<Header, Object>) interactionParams[0];
31          this.url = (String) params.get(Header.URL);
32          this.vendor = (Vendor) params.get(Header.VENDOR);
33      }
34  
35      @Override
36      public void execute() {
37          MediatorHelper.managerScan().highlight(this.url, this.vendor.toString());
38      }
39  }