Class StrategyInjectionNormal

java.lang.Object
com.jsql.model.injection.strategy.AbstractStrategy
com.jsql.model.injection.strategy.StrategyInjectionNormal

public class StrategyInjectionNormal extends AbstractStrategy
  • Field Details

    • visibleIndex

      protected String visibleIndex
      i.e, 2 in "[..]union select 1,2,[..]", if 2 is found in HTML body.
    • sourceIndexesFound

      protected String sourceIndexesFound
      HTML body of page successfully responding to multiple fields selection (select 1,2,3,..).
  • Constructor Details

    • StrategyInjectionNormal

      public StrategyInjectionNormal(InjectionModel injectionModel)
  • Method Details

    • checkApplicability

      public void checkApplicability() throws JSqlException
      Description copied from class: AbstractStrategy
      Test if this strategy can be used to inject SQL.
      Specified by:
      checkApplicability in class AbstractStrategy
      Throws:
      JSqlException
    • allow

      public void allow(int... i)
      Description copied from class: AbstractStrategy
      Inform the view that this strategy can be used.
      Specified by:
      allow in class AbstractStrategy
    • unallow

      public void unallow(int... i)
      Description copied from class: AbstractStrategy
      Inform the view that this strategy can't be used.
      Specified by:
      unallow in class AbstractStrategy
    • inject

      public String inject(String sqlQuery, String startPosition, AbstractSuspendable stoppable, String metadataInjectionProcess)
      Description copied from class: AbstractStrategy
      Start the strategy work.
      Specified by:
      inject in class AbstractStrategy
      Returns:
      Source code
    • activateWhenApplicable

      public void activateWhenApplicable()
      Description copied from class: AbstractStrategy
      Change model strategy to current applicable strategy only when not already set. Normal > Stacked > Error > Multibit > Blind > Time
      Specified by:
      activateWhenApplicable in class AbstractStrategy
    • getVisibleIndex

      public String getVisibleIndex(String firstSuccessPageSource)
      Runnable class, search the most efficient index.
      Some indexes will display a lots of characters, others won't, so sort them by order of efficiency:
      find the one that displays the most number of characters.
      Returns:
      Integer index with most efficiency and visible in source code
    • getPerformanceLength

      public String getPerformanceLength()
      Description copied from class: AbstractStrategy
      Get number of characters you can obtain from the strategy.
      Specified by:
      getPerformanceLength in class AbstractStrategy
    • getName

      public String getName()
      Description copied from class: AbstractStrategy
      Get the injection strategy name.
      Specified by:
      getName in class AbstractStrategy
    • getVisibleIndex

      public String getVisibleIndex()
    • setVisibleIndex

      public void setVisibleIndex(String visibleIndex)
    • setSourceIndexesFound

      public void setSourceIndexesFound(String sourceIndexesFound)