Ejemplo n.º 1
0
 public TimeBasedHypothesisTester(
     ObjectPool <SqlWriter> writerPool,
     ITimeBasedInjector injector,
     TimeBasedBlindSqlInjectionOptions options,
     ILogger <TimeBasedHypothesisTester> logger
     )
 {
     WriterPool = writerPool;
     Injector   = injector;
     Options    = options;
     Logger     = logger;
 }
 public static ISqlInjectionAttackBuilder UseTimeBased(this ISqlInjectionAttackBuilder builder, Func <InjectorBuilder, InjectionOptions> injectorBuilder, TimeBasedBlindSqlInjectionOptions options)
 {
     builder.Services.AddSingleton(options);
     builder.Services.AddScoped <IHypothesisTester, TimeBasedHypothesisTester>();
     builder.Services.AddScoped <InjectionOptions>(_ => injectorBuilder(new InjectorBuilder()));
     builder.Services.AddScoped <ITimeBasedInjector, Injector>();
     return(builder);
 }