Package org.parosproxy.paros.model

Examples of org.parosproxy.paros.model.Session


        SiteNode node = ref.getSiteNode();
        if (node == null) {
            return;
        }

        Session session = Model.getSingleton().getSession();
        SiteMap map = session.getSiteTree();

        if (node.getHistoryReference() == ref) {
            // same active Node
            PopupDeleteMenu.delete(map, node);
        } else {
View Full Code Here


      }
      return historyList;
  }
 
  private void searchHistory(String filter, boolean isRequest) {
      Session session = getModel().getSession();
       
      synchronized (historyList) {
          try {
              List list = getModel().getDb().getTableHistory().getHistoryList(session.getSessionId(), HistoryReference.TYPE_MANUAL, filter, isRequest);
             
              buildHistory(getHistoryList(), list);
          } catch (SQLException e) {}
      }
View Full Code Here

  protected void performAction() throws SQLException {
    WebSocketMessageDTO message = wsPopupHelper.getSelectedMessage();
    if (message != null) {
      String url = Pattern.quote(message.channel.getContextUrl());
         
          Session session = Model.getSingleton().getSession();
            context.addExcludeFromContextRegex(url);
            session.saveContext(context);

            View.getSingleton().showSessionDialog(session, ContextExcludePanel.getPanelName(context.getIndex()));
    }
  }
View Full Code Here

  }
 
  @SuppressWarnings("unchecked")
  public String search(String filter, Type reqType){
      String result="";
      Session session = getModel().getSession();
        Pattern pattern = Pattern.compile(filter, Pattern.MULTILINE| Pattern.CASE_INSENSITIVE);
    Matcher matcher = null;
   
    this.searchPanel.resetSearchResults();
   
      synchronized (this) {
          try {
              List list = getModel().getDb().getTableHistory().getHistoryList(session.getSessionId(), HistoryReference.TYPE_MANUAL);
              int last = list.size();
              for (int index=0;index < last;index++){
                  int v = ((Integer)(list.get(index))).intValue();
                  try {
                        HttpMessage message = getModel().getDb().getTableHistory().read(v).getHttpMessage();
View Full Code Here

          file = chooser.getSelectedFile();
          if (file == null) {
            return;
          }
          Model cmpModel = new Model();
          Session session = cmpModel.getSession();

            //log.info("opening session file " + file.getAbsolutePath());
            //WaitMessageDialog waitMessageDialog = View.getSingleton().getWaitMessageDialog("Loading session file.  Please wait ...");
          session.open(file, this);

        Database db = new Database();
        db.open(file.getAbsolutePath());
       
        Map <String, String> curMap = new HashMap<String,String>();
        Map <String, String> cmpMap = new HashMap<String,String>();
       
        // Load the 2 sessions into 2 maps
        this.buildHistoryMap(Database.getSingleton().getTableHistory(), curMap);
        this.buildHistoryMap(db.getTableHistory(), cmpMap);

          File outputFile = this.getOutputFile();

          if (outputFile != null) {
            // Write the result to the specified file
            try {
                TreeSet<String> sset = new TreeSet<String>();
                // Combine the keys for both maps
                sset.addAll(curMap.keySet());
                sset.addAll(cmpMap.keySet());
               
              StringBuffer sb = new StringBuffer(500);
              sb.append("<?xml version=\"1.0\"?>");
              sb.append(CRLF);
              sb.append("<report>");
              sb.append(CRLF);
              sb.append("<session-names>");
              sb.append(CRLF);
              sb.append("<session1>");
              sb.append(Model.getSingleton().getSession().getSessionName());
              sb.append("</session1>");
              sb.append(CRLF);
              sb.append("<session2>");
              sb.append(session.getSessionName());
              sb.append("</session2>");
              sb.append(CRLF);
              sb.append("</session-names>");
              sb.append(CRLF);
View Full Code Here

    }
    return txtDescription;
  }

  public void initParam(Object obj) {
    Session session = (Session) obj;
    getTxtSessionName().setText(session.getSessionName());
    getTxtDescription().setText(session.getSessionDesc());
  }
View Full Code Here

  public void validateParam(Object obj) {
    // no validation needed
  }

  public void saveParam(Object obj) throws Exception {
    Session session = (Session) obj;
    session.setSessionName(getTxtSessionName().getText());
    session.setSessionDesc(getTxtDescription().getText());
    // ZAP Save session details
      if (!session.isNewState()) {
        session.save(session.getFileName());
      }

  }
View Full Code Here

    }
    return historyList;
  }

  private void searchHistory(String filter, boolean isRequest) {
    Session session = getModel().getSession();

    synchronized (historyList) {
      try {
        List<Integer> list = getModel().getDb().getTableHistory().getHistoryList(session.getSessionId(), HistoryReference.TYPE_MANUAL, filter, isRequest);
        buildHistory(getHistoryList(), list);
      } catch (SQLException e) {
        e.printStackTrace();
      }
    }
View Full Code Here

    }

  }
 
  private void searchHistory(HistoryFilter historyFilter) {
      Session session = getModel().getSession();
       
      synchronized (historyList) {
          try {
              List<Integer> list = getModel().getDb().getTableHistory().getHistoryList(session.getSessionId(), HistoryReference.TYPE_MANUAL);
             
              buildHistory(getHistoryList(), list, historyFilter);
          } catch (SQLException e) {
            e.printStackTrace();
          }
View Full Code Here

          }
      }
  }

  public void searchHistoryByURI(String[] filter, boolean uriFilterInverse) {
    Session session = getModel().getSession();
   
    String methodFilter = filter[0];
    String uriFilter = filter[1];

    synchronized (historyList) {
      try {
        List<Integer> list = getModel().getDb().getTableHistory().getFilteredHistoryList(session.getSessionId(), HistoryReference.TYPE_MANUAL, methodFilter, uriFilter, uriFilterInverse);
        buildHistory(getHistoryList(), list);
      } catch (SQLException e) {
      }
    }
View Full Code Here

TOP

Related Classes of org.parosproxy.paros.model.Session

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.