Class AbstractStrategy
java.lang.Object
com.jsql.model.injection.strategy.AbstractStrategy
- Direct Known Subclasses:
StrategyInjectionBlind
,StrategyInjectionError
,StrategyInjectionMultibit
,StrategyInjectionNormal
,StrategyInjectionStacked
,StrategyInjectionTime
Define a strategy to inject SQL with methods like Error and Time.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
Change model strategy to current applicable strategy only when not already set.protected abstract void
allow
(int... i) Inform the view that this strategy can be used.abstract void
Test if this strategy can be used to inject SQL.abstract String
getName()
Get the injection strategy name.abstract String
Get number of characters you can obtain from the strategy.abstract String
inject
(String sqlQuery, String startPosition, AbstractSuspendable stoppable, String metadataInjectionProcess) Start the strategy work.boolean
void
markVulnerability
(Interaction message, int... indexErrorStrategy) void
setApplicable
(boolean isApplicable) toString()
protected abstract void
unallow
(int... i) Inform the view that this strategy can't be used.
-
Field Details
-
KEY_LOG_CHECKING_STRATEGY
- See Also:
-
KEY_LOG_VULNERABLE
- See Also:
-
FORMAT_STRATEGY_NOT_IMPLEMENTED
- See Also:
-
FORMAT_SKIP_STRATEGY_DISABLED
- See Also:
-
FORMAT_CHECKING_STRATEGY
- See Also:
-
isApplicable
protected boolean isApplicableTrue if injection can be used, false otherwise. -
injectionModel
-
-
Constructor Details
-
AbstractStrategy
-
-
Method Details
-
checkApplicability
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
Get number of characters you can obtain from the strategy. -
getName
Get the injection strategy name. -
markVulnerability
-
toString
-
isApplicable
public boolean isApplicable() -
setApplicable
public void setApplicable(boolean isApplicable)
-