Class AbstractStrategy

java.lang.Object
com.jsql.model.injection.strategy.AbstractStrategy
Direct Known Subclasses:
StrategyInjectionBlind, StrategyInjectionError, StrategyInjectionMultibit, StrategyInjectionNormal, StrategyInjectionStacked, StrategyInjectionTime

public abstract class AbstractStrategy extends Object
Define a strategy to inject SQL with methods like Error and Time.
  • Field Details

  • Constructor Details

    • AbstractStrategy

      protected AbstractStrategy(InjectionModel injectionModel)
  • Method Details

    • checkApplicability

      public abstract void checkApplicability() throws JSqlException
      Test if this strategy can be used to inject SQL.
      Throws:
      JSqlException
    • allow

      protected abstract void allow(int... i)
      Inform the view that this strategy can be used.
    • unallow

      protected abstract void unallow(int... i)
      Inform the view that this strategy can't be used.
    • inject

      public abstract String inject(String sqlQuery, String startPosition, AbstractSuspendable stoppable, String metadataInjectionProcess) throws StoppedByUserSlidingException
      Start the strategy work.
      Returns:
      Source code
      Throws:
      StoppedByUserSlidingException
    • activateWhenApplicable

      public abstract void activateWhenApplicable()
      Change model strategy to current applicable strategy only when not already set. Normal > Stacked > Error > Multibit > Blind > Time
    • getPerformanceLength

      public abstract String getPerformanceLength()
      Get number of characters you can obtain from the strategy.
    • getName

      public abstract String getName()
      Get the injection strategy name.
    • markVulnerability

      public void markVulnerability(Interaction message, int... indexErrorStrategy)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • isApplicable

      public boolean isApplicable()
    • setApplicable

      public void setApplicable(boolean isApplicable)