Examples of IPathState


Examples of com.subgraph.vega.api.scanner.IPathState

  private void submitNewForm(FormProcessingState formData) {
    if(!uriFilter.isAllowed(formData.getTargetURI())) {
      return;
    }
     
    final IPathState ps = uriParser.processUri(formData.getTargetURI());
    if(formData.isPostMethod())
      ps.maybeAddPostParameters(formData.getParameters());
    else
      ps.maybeAddParameters(formData.getParameters());
  }
View Full Code Here

Examples of com.subgraph.vega.api.scanner.IPathState

  public synchronized boolean has404Fingerprints() {
    return !page404Fingerprints.isEmpty();
  }
 
  public IPathState get404Parent() {
    final IPathState parent = pathState.getParentState();
    if(parent != null && parent.has404Fingerprints())
      return parent;
    else
      return null
  }
View Full Code Here

Examples of com.subgraph.vega.api.scanner.IPathState

        return true;
    return false;
  }
 
  public boolean hasParent404Fingerprint(IPageFingerprint fp) {
    final IPathState pps = get404Parent();
    return (pps != null && pps.has404FingerprintMatching(fp));
  }
View Full Code Here

Examples of com.subgraph.vega.api.scanner.IPathState

    }
  }

  @Override
  public void runModule(HttpUriRequest request, IHttpResponse response, IInjectionModuleContext ctx) {
    final IPathState ps = ctx.getPathState();

    if(response.isFetchFail())
      ctx.error(request, response, "Failed to fetch response during page variability check");
    else
      testResponse(request, response, ctx);
View Full Code Here

Examples of com.subgraph.vega.api.scanner.IPathState

    injectionChecks.launchInjectionModules(ps);
  }

  private void testResponse(HttpUriRequest request, IHttpResponse response, IInjectionModuleContext ctx) {
    final IPageFingerprint fp = response.getPageFingerprint();
    final IPathState ps = ctx.getPathState();
    if(!ps.matchesPathFingerprint(fp)) {
      ps.setResponseVaries();
      ctx.debug("Response varies");
    }
  }
View Full Code Here

Examples of com.subgraph.vega.api.scanner.IPathState

    synchronized (startLock) {
      if(!isStarted) {
        start();
      }
    }
    final IPathState ps = uriParser.processUri(stripQuery(target));
    ps.maybeAddParameters(parameters);
  }
View Full Code Here

Examples of com.subgraph.vega.api.scanner.IPathState

    synchronized (startLock) {
      if(!isStarted) {
        start();
      }
    }
    final IPathState ps = uriParser.processUri(stripQuery(target));
    ps.maybeAddPostParameters(parameters);
  }
View Full Code Here

Examples of com.subgraph.vega.api.scanner.IPathState

    return ps.getRequestEngine().createGetRequest(path.getHttpHost(), newPath);
  }

  @Override
  public void runModule(HttpUriRequest request, IHttpResponse response, IInjectionModuleContext ctx) {
    final IPathState ps = ctx.getPathState();
   
    if(response.isFetchFail()) {
      ctx.error(request, response, "Fetch failed during parent directory check");
    } else if(ps.matchesPathFingerprint(response.getPageFingerprint())) {
      ctx.debug("Problem with parent directory behavior");
      ctx.getPathState().setBadParentDirectory();
    }
 
    ipsCheck.initialize(ctx.getPathState());   
View Full Code Here

Examples of com.subgraph.vega.api.scanner.IPathState

    ctx.submitAlteredRequest(this, "/"+ PAGE_DOES_NOT_EXIST);
  }

  @Override
  public void runModule(HttpUriRequest request, IHttpResponse response, IInjectionModuleContext ctx) {
    final IPathState ps = ctx.getPathState();
    final boolean isFirstResponse = ctx.getCurrentIndex() == 0;
    boolean failed = false;

    if(ps.hasFailed404Detection())
      failed = true;

    if(response.isFetchFail()) {
      ctx.error(request, response, "during 404 response checks");
      failed = true;
View Full Code Here

Examples of com.subgraph.vega.api.scanner.IPathState

    }
  }

  private void processResponseFingerprint(IInjectionModuleContext ctx, HttpUriRequest req, IHttpResponse res, boolean isFirstResponse) {
    final IPageFingerprint fp = res.getPageFingerprint();
    final IPathState ps = ctx.getPathState();

    if(isFirstResponse && !ps.isSureDirectory() && !ps.isRootPath() && ps.matchesPathFingerprint(fp)) {
      ctx.debug("First 404 probe identical to parent page");
      return;
    }

    if(!ps.add404Fingerprint(fp)) {
      ctx.debug("Failed 404 detection, too many unique 404 signatures received");
      ps.setFailed404Detection();
      return;
    }

    final IPathState parent404 = ps.get404Parent();
    if((parent404 != null) && !parent404.has404FingerprintMatching(fp)) {
      ctx.debug("New 404 signature detected that was not detected on parent");
      ctx.responseChecks(req, res);
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.