Package com.subgraph.vega.api.scanner

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


  private final InjectionChecks injection = new InjectionChecks();

  @Override
  public void initialize(IPathState ps) {
    final IInjectionModuleContext ctx = ps.createModuleContext();
    ctx.submitRequest(createRequest(ps, IPS_TEST), this, 0);
    ctx.submitRequest(createRequest(ps, IPS_SAFE), this, 1);
  }
View Full Code Here


    return module;
  }

  @Override
  public void runScript(IPathState pathState) {
    final IInjectionModuleContext ctx = pathState.createModuleContext();
    try {
      Context cx = Context.enter();
      Scriptable instance = module.createInstanceScope(cx);
      final Object[] args = new Object[] { new ModuleContextJS(instance, ctx) };
      final long startTS = System.currentTimeMillis();
View Full Code Here

  @Override
  public void processResponse(IWebCrawler crawler, HttpUriRequest request, IHttpResponse response, Object argument) {
    if(!(argument instanceof IInjectionModuleContext)) {
     
    }
    final IInjectionModuleContext ctx = (IInjectionModuleContext) argument;
    final Scriptable scope = callbackFunction.getParentScope();
    try {
      final Context cx = Context.enter();
      final Object[] arguments = { request, createResponse(response, cx, scope), new ModuleContextJS(scope, ctx) };
      callbackFunction.call(cx, scope, scope, arguments);
View Full Code Here

    return cx.newObject(scope, "Response", args);
  }

  @Override
  public void processException(HttpUriRequest request, Throwable ex, Object argument) {
    final IInjectionModuleContext ctx = (IInjectionModuleContext) argument;
    ctx.reportRequestException(request, ex);
  }
View Full Code Here

TOP

Related Classes of com.subgraph.vega.api.scanner.IInjectionModuleContext

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.