Class InjectionModel

All Implemented Interfaces:
Serializable, AutoCloseable, Flow.Publisher<Request>

public class InjectionModel extends AbstractModelObservable implements Serializable
Model class of MVC pattern for processing SQL injection automatically.
Different views can be attached to this observable, like Swing or command line, in order to separate the functional job from the graphical processing.
The Model has a specific database vendor and strategy which run an automatic injection to get name of databases, tables, columns and values, and it can also retrieve resources like files and shell.
Tasks are run in multi-threads in general to speed the process.
See Also:
  • Field Details

  • Constructor Details

    • InjectionModel

      public InjectionModel()
  • Method Details

    • resetModel

      public void resetModel()
      Reset each injection attributes: Database metadata, General Thread status, Strategy.
    • beginInjection

      public void beginInjection()
      Prepare the injection process, can be interrupted by the user (via shouldStopAll). Erase all attributes eventually defined in a previous injection. Run by Scan, Standard and TU.
    • getImplicitReason

      public static String getImplicitReason(Throwable e)
    • inject

      public String inject(String dataInjection, boolean isUsingIndex, String metadataInjectionProcess, AbstractCallableBoolean<?> callableBoolean, boolean isReport)
      Run a HTTP connection to the web server.
      Specified by:
      inject in class AbstractModelObservable
      Parameters:
      dataInjection - SQL query
      Returns:
      source code of current page
    • sendResponseFromSite

      public void sendResponseFromSite(String message, String source)
      Display source code in console.
      Parameters:
      message - Error message
      source - Text to display in console
    • displayVersion

      public void displayVersion()
    • getIndexesInUrl

      public String getIndexesInUrl()
    • setIndexesInUrl

      public void setIndexesInUrl(String indexesInUrl)
    • shouldErasePreviousInjection

      public boolean shouldErasePreviousInjection()
    • setIsScanning

      public void setIsScanning(boolean isScanning)
    • getVersionJsql

      public String getVersionJsql()
    • getMediatorUtils

      public MediatorUtils getMediatorUtils()
    • getMediatorVendor

      public MediatorVendor getMediatorVendor()
    • getMediatorMethod

      public MediatorMethod getMediatorMethod()
    • getDataAccess

      public DataAccess getDataAccess()
    • getResourceAccess

      public ResourceAccess getResourceAccess()
    • getMediatorStrategy

      public MediatorStrategy getMediatorStrategy()
    • appendAnalysisReport

      public void appendAnalysisReport(String analysisReport)
    • appendAnalysisReport

      public void appendAnalysisReport(String analysisReport, boolean isInit)