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.swing.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 Vendor vendor;
26      
27      @SuppressWarnings("unchecked")
28      public SetVendor(Object[] interactionParams) {
29          Map<Header, Object> params = (Map<Header, Object>) interactionParams[0];
30          this.vendor = (Vendor) params.get(Header.VENDOR);
31      }
32  
33      @Override
34      public void execute() {
35          MediatorHelper.panelAddressBar().getPanelTrailingAddress().setVendor(this.vendor);
36      }
37  }