Package org.parosproxy.paros.model

Examples of org.parosproxy.paros.model.SiteNode


         
          JTree tree = (JTree) invoker;
          TreePath[] paths = tree.getSelectionPaths();
          SiteMap map = (SiteMap) tree.getModel();
          for (int i = 0; i < paths.length; i++) {
            SiteNode node = (SiteNode) paths[i].getLastPathComponent();
           
            // Andiparos: Root should not be copied to Clipboard
            if (!node.isRoot()) {
              copyToClipboard(node);
            }
          }
        }
View Full Code Here


      return;
    }
    extension.getHistoryList().removeElement(ref);
    ref.delete();

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

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

    if (node.getHistoryReference() == ref) {
      // same active Node
      PopupPurgeMenu.purge(map, node);
    } else {
      node.getPastHistoryReference().remove(ref);
    }

  }
View Full Code Here

  private void initialize() {
        this.setText("Scan this site...");
        this.addActionListener(new ActionListener() {        
          public void actionPerformed(ActionEvent e) {   
            if (treeSite != null) {
                SiteNode node = (SiteNode) treeSite.getLastSelectedPathComponent();
                  if (node.isRoot()) {
                    // Placeholder for adding a warning
                    extension.startScan(node);
                  } else {
                extension.startScan(node);    
                  }
View Full Code Here

  }

  public boolean isEnableForComponent(Component invoker) {
    treeSite = getTree(invoker);
    if (treeSite != null) {
      SiteNode node = (SiteNode) treeSite.getLastSelectedPathComponent();
      if (node != null) {
        this.setEnabled(true);
      } else {
        this.setEnabled(false);
      }
View Full Code Here

   */
  private String getChildSuffix(SiteNode node, boolean performRecursiveCheck) {

    String resultSuffix = "";
    String suffix = null;
    SiteNode child = null;
    HistoryReference ref = null;
    HttpMessage msg = null;
    try {

      for (int i = 0; i < staticSuffixList.length; i++) {
        suffix = staticSuffixList[i];
        for (int j = 0; j < node.getChildCount(); j++) {
          child = (SiteNode) node.getChildAt(j);
          ref = child.getHistoryReference();
          try {
            msg = ref.getHttpMessage();
            if (msg.getRequestHeader().getURI().getPath().endsWith(suffix)) {
              return suffix;
            }
View Full Code Here

  /**
   * Analyse node (should be a folder unless it is host level) in-order.
   */
  private void inOrderAnalyse(SiteNode node) {

    SiteNode tmp = null;

    if (isSkipOrStop) {
      return;
    }
   
View Full Code Here

    if (ref == null) {
      return;
    }
    extension.getHistoryList().removeElement(ref);

    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 {
      node.getPastHistoryReference().remove(ref);
    }

  }
View Full Code Here

        report.append("</OWASPZAPReport>");
    }

    private static void siteXML(StringBuilder report) {
        SiteMap siteMap = Model.getSingleton().getSession().getSiteTree();
        SiteNode root = (SiteNode) siteMap.getRoot();
        int siteNumber = root.getChildCount();
        for (int i = 0; i < siteNumber; i++) {
            SiteNode site = (SiteNode) root.getChildAt(i);
            String siteName = ScanPanel.cleanSiteName(site, true);
            String[] hostAndPort = siteName.split(":");
            boolean isSSL = (site.getNodeName().startsWith("https"));
            String siteStart = "<site name=\"" + XMLStringUtil.escapeControlChrs(site.getNodeName()) + "\"" +
                    " host=\"" + XMLStringUtil.escapeControlChrs(hostAndPort[0])+ "\""+
                    " port=\"" + XMLStringUtil.escapeControlChrs(hostAndPort[1])+ "\""+
                    " ssl=\"" + String.valueOf(isSSL) + "\"" +
                    ">";
            StringBuilder extensionsXML = getExtensionsXML(site);
View Full Code Here

    @Override
    public void run() {
        stopAttack = false;
        try {
            SiteNode startNode = accessNode(this.url);
            String urlString = url.toString();

            logger.info("Starting at url : " + urlString);

            if (startNode == null) {
                logger.debug("Failed to access URL " + urlString);
                extension.notifyProgress(Progress.FAILED);
                return;
            }
            if (stopAttack) {
                logger.debug("Attack stopped manually");
                extension.notifyProgress(Progress.STOPPED);
                return;
            }

            spider(startNode);
           
            ExtensionActiveScan extAscan = (ExtensionActiveScan) Control.getSingleton().getExtensionLoader().getExtension(ExtensionActiveScan.NAME);
            if (extAscan == null) {
                logger.error("No active scanner");
                extension.notifyProgress(Progress.FAILED);
            } else {
                extension.notifyProgress(Progress.ASCAN);
                extAscan.onHttpRequestSend(startNode.getHistoryReference().getHttpMessage());
            }

        } catch (Exception e) {
            logger.error(e.getMessage(), e);
            extension.notifyProgress(Progress.FAILED);
View Full Code Here

            logger.info("Starting spider.");
            extension.notifyProgress(Progress.SPIDER);
            startNode.setAllowsChildren(true);
            for (String node : nodes) {
                logger.info("About to call accessNode.");
                SiteNode childNode = accessNode(new URL(url + node));
                logger.info("got out of accessNode.");
                if (childNode != null) {
                    logger.info("Child node != null, child node is " + childNode);
                    //childNode.setParent(startNode);
                    //startNode.add(childNode);
View Full Code Here

TOP

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

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.