View Javadoc
1   package com.jsql.model.injection.strategy.blind.callable;
2   
3   import java.util.concurrent.Callable;
4   
5   /**
6    * Callable used to read blind/time database information.
7    */
8   public abstract class AbstractCallableBit<T extends AbstractCallableBit<T>> implements Callable<T> {
9       
10      /**
11       * The URL called.
12       */
13      protected String booleanUrl;
14      
15      /**
16       * Character position.
17       */
18      protected int currentIndex;
19      
20      /**
21       * Bit searched.
22       */
23      protected int currentBit;
24      protected int idPage = -1;
25      protected int block = -1;
26  
27      /**
28       * Default call used for bit test.
29       */
30      protected boolean isMultibit = false;
31      protected boolean isBinary = false;
32  
33      /**
34       * Character representation of Boolean bits
35       */
36      private String charText;
37      
38      /**
39       * Check if a response time means the SQL query is true.
40       * @return true if the current SQL test is confirmed
41       */
42      public abstract boolean isTrue();
43      
44      public int getCurrentIndex() {
45          return this.currentIndex;
46      }
47      
48      public int getCurrentBit() {
49          return this.currentBit;
50      }
51  
52      public String getCharText() {
53          return this.charText;
54      }
55  
56      public void setCharText(String charText) {
57          this.charText = charText;
58      }
59  
60      public boolean isMultibit() {
61          return this.isMultibit;
62      }
63  
64      public boolean isBinary() {
65          return this.isBinary;
66      }
67  
68      public int getBlock() {
69          return this.block;
70      }
71  
72      public int getIdPage() {
73          return this.idPage;
74      }
75  }