Class StrategyInjectionNormal
java.lang.Object
com.jsql.model.injection.strategy.AbstractStrategy
com.jsql.model.injection.strategy.StrategyInjectionNormal
-
Field Summary
Modifier and TypeFieldDescriptionprotected String
HTML body of page successfully responding to multiple fields selection (select 1,2,3,..).protected String
i.e, 2 in "[..]union select 1,2,[..]", if 2 is found in HTML body.Fields inherited from class com.jsql.model.injection.strategy.AbstractStrategy
FORMAT_CHECKING_STRATEGY, FORMAT_SKIP_STRATEGY_DISABLED, FORMAT_STRATEGY_NOT_IMPLEMENTED, injectionModel, isApplicable, KEY_LOG_CHECKING_STRATEGY, KEY_LOG_VULNERABLE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Change model strategy to current applicable strategy only when not already set.void
allow
(int... i) Inform the view that this strategy can be used.void
Test if this strategy can be used to inject SQL.getName()
Get the injection strategy name.Get number of characters you can obtain from the strategy.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.inject
(String sqlQuery, String startPosition, AbstractSuspendable stoppable, String metadataInjectionProcess) Start the strategy work.void
setSourceIndexesFound
(String sourceIndexesFound) void
setVisibleIndex
(String visibleIndex) void
unallow
(int... i) Inform the view that this strategy can't be used.Methods inherited from class com.jsql.model.injection.strategy.AbstractStrategy
isApplicable, markVulnerability, setApplicable, toString
-
Field Details
-
visibleIndex
i.e, 2 in "[..]union select 1,2,[..]", if 2 is found in HTML body. -
sourceIndexesFound
HTML body of page successfully responding to multiple fields selection (select 1,2,3,..).
-
-
Constructor Details
-
StrategyInjectionNormal
-
-
Method Details
-
checkApplicability
Description copied from class:AbstractStrategy
Test if this strategy can be used to inject SQL.- Specified by:
checkApplicability
in classAbstractStrategy
- 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 classAbstractStrategy
-
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 classAbstractStrategy
-
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 classAbstractStrategy
- 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 classAbstractStrategy
-
getVisibleIndex
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
Description copied from class:AbstractStrategy
Get number of characters you can obtain from the strategy.- Specified by:
getPerformanceLength
in classAbstractStrategy
-
getName
Description copied from class:AbstractStrategy
Get the injection strategy name.- Specified by:
getName
in classAbstractStrategy
-
getVisibleIndex
-
setVisibleIndex
-
setSourceIndexesFound
-