Search in sources :

Example 1 with InjectionModel

use of com.jsql.model.InjectionModel in project jsql-injection by ron190.

the class PostTest method initialize.

@BeforeClass
public static void initialize() throws InjectionFailureException {
    InjectionModel model = new InjectionModel();
    MediatorModel.register(model);
    model.displayVersion();
    MediatorModel.model().addObserver(new SystemOutTerminal());
    ConnectionUtil.setUrlBase("http://" + AbstractTestSuite.HOSTNAME + "/simulate_post.php");
    ParameterUtil.setRequest(Arrays.asList(new SimpleEntry<String, String>("lib", "0")));
    ConnectionUtil.setMethodInjection(MethodInjection.REQUEST);
    MediatorModel.model().beginInjection();
    MediatorModel.model().setStrategy(StrategyInjection.NORMAL);
}
Also used : InjectionModel(com.jsql.model.InjectionModel) SimpleEntry(java.util.AbstractMap.SimpleEntry) SystemOutTerminal(com.jsql.view.terminal.SystemOutTerminal) BeforeClass(org.junit.BeforeClass)

Example 2 with InjectionModel

use of com.jsql.model.InjectionModel in project jsql-injection by ron190.

the class CubridNormalGetTestSuite method initialize.

@BeforeClass
public static void initialize() throws InjectionFailureException {
    InjectionModel model = new InjectionModel();
    MediatorModel.register(model);
    model.displayVersion();
    MediatorModel.model().addObserver(new SystemOutTerminal());
    ConnectionUtil.setUrlBase("http://" + AbstractTestSuite.HOSTNAME + "/cubrid_simulate_get.php");
    ParameterUtil.setQueryString(Arrays.asList(new SimpleEntry<String, String>("lib", "0")));
    ConnectionUtil.setMethodInjection(MethodInjection.QUERY);
    MediatorModel.model().beginInjection();
    MediatorModel.model().setStrategy(StrategyInjection.NORMAL);
}
Also used : InjectionModel(com.jsql.model.InjectionModel) SimpleEntry(java.util.AbstractMap.SimpleEntry) SystemOutTerminal(com.jsql.view.terminal.SystemOutTerminal) BeforeClass(org.junit.BeforeClass)

Example 3 with InjectionModel

use of com.jsql.model.InjectionModel in project jsql-injection by ron190.

the class DB2BlindGetTestSuite method initialize.

@BeforeClass
public static void initialize() throws InjectionFailureException {
    InjectionModel model = new InjectionModel();
    MediatorModel.register(model);
    model.displayVersion();
    MediatorModel.model().addObserver(new SystemOutTerminal());
    ConnectionUtil.setUrlBase("http://" + AbstractTestSuite.HOSTNAME + "/db2_simulate_get.php");
    ParameterUtil.setQueryString(Arrays.asList(new SimpleEntry<String, String>("lib", "1")));
    ConnectionUtil.setMethodInjection(MethodInjection.QUERY);
    MediatorModel.model().beginInjection();
    MediatorModel.model().setStrategy(StrategyInjection.BLIND);
}
Also used : InjectionModel(com.jsql.model.InjectionModel) SimpleEntry(java.util.AbstractMap.SimpleEntry) SystemOutTerminal(com.jsql.view.terminal.SystemOutTerminal) BeforeClass(org.junit.BeforeClass)

Example 4 with InjectionModel

use of com.jsql.model.InjectionModel in project jsql-injection by ron190.

the class DB2NormalGetTestSuite method initialize.

@BeforeClass
public static void initialize() throws InjectionFailureException {
    InjectionModel model = new InjectionModel();
    MediatorModel.register(model);
    model.displayVersion();
    MediatorModel.model().addObserver(new SystemOutTerminal());
    ConnectionUtil.setUrlBase("http://" + AbstractTestSuite.HOSTNAME + "/db2_simulate_get.php");
    ParameterUtil.setQueryString(Arrays.asList(new SimpleEntry<String, String>("lib", "0")));
    ConnectionUtil.setMethodInjection(MethodInjection.QUERY);
    MediatorModel.model().beginInjection();
    MediatorModel.model().setStrategy(StrategyInjection.NORMAL);
}
Also used : InjectionModel(com.jsql.model.InjectionModel) SimpleEntry(java.util.AbstractMap.SimpleEntry) SystemOutTerminal(com.jsql.view.terminal.SystemOutTerminal) BeforeClass(org.junit.BeforeClass)

Example 5 with InjectionModel

use of com.jsql.model.InjectionModel in project jsql-injection by ron190.

the class MysqlBlindHeaderTestSuite method initialize.

@BeforeClass
public static void initialize() throws MalformedURLException {
    InjectionModel model = new InjectionModel();
    MediatorModel.register(model);
    model.displayVersion();
    MediatorModel.model().addObserver(new SystemOutTerminal());
    PreferencesUtil.setNotTestingConnection(true);
    ParameterUtil.initQueryString("http://" + AbstractTestSuite.HOSTNAME + "/simulate_header.php");
    ParameterUtil.initRequest("");
    ParameterUtil.initHeader("lib: 1*");
    ConnectionUtil.setMethodInjection(MethodInjection.HEADER);
    ConnectionUtil.setTypeRequest("POST");
    MediatorModel.model().beginInjection();
    MediatorModel.model().setStrategy(StrategyInjection.BLIND);
}
Also used : InjectionModel(com.jsql.model.InjectionModel) SystemOutTerminal(com.jsql.view.terminal.SystemOutTerminal) BeforeClass(org.junit.BeforeClass)

Aggregations

InjectionModel (com.jsql.model.InjectionModel)22 SystemOutTerminal (com.jsql.view.terminal.SystemOutTerminal)21 BeforeClass (org.junit.BeforeClass)21 SimpleEntry (java.util.AbstractMap.SimpleEntry)15 JFrameView (com.jsql.view.swing.JFrameView)1 AWTError (java.awt.AWTError)1 Dimension (java.awt.Dimension)1 HeadlessException (java.awt.HeadlessException)1