Skip to content

Commit c1c164b

Browse files
author
Marshall Lee Whittaker
committed
added the technique specification options
1 parent 40f0a5e commit c1c164b

File tree

3 files changed

+49
-2
lines changed

3 files changed

+49
-2
lines changed

background.js

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ var threadsOption = "2";
2727
var unstableconnOption = false;
2828
var nocastOption = false;
2929
var noescapeOption = false;
30+
var techOption = '';
31+
var techbOption = true;
32+
var techeOption = true;
33+
var techuOption = true;
34+
var techsOption = true;
35+
var techtOption = true;
36+
var techqOption = true;
3037
var trigger;
3138

3239

@@ -95,6 +102,16 @@ function assembleCmd(url, referUrl) {
95102
if (unstableconnOption) {sqlmapText += " --unstable"; };
96103
if (nocastOption) {sqlmapText += " --no-cast"; };
97104
if (noescapeOption) {sqlmapText += " --no-escape"; };
105+
106+
techOption = ''
107+
if (techbOption) {techOption += "B"; };
108+
if (techeOption) {techOption += "E"; };
109+
if (techuOption) {techOption += "U"; };
110+
if (techsOption) {techOption += "S"; };
111+
if (techtOption) {techOption += "T"; };
112+
if (techqOption) {techOption += "Q"; };
113+
sqlmapText += " --technique " + techOption;
114+
98115
sqlmapText += " --threads " + threadsOption;
99116

100117
sqlmapText += sqlmapheaders;
@@ -169,7 +186,7 @@ browser.contextMenus.onClicked.addListener((info, tab) => {
169186

170187
// check the saved options each click in case they changed
171188
let gettingOptions = browser.storage.sync.get(
172-
['quotes','prog','verbose','rua','dumpall','osshell','sqlmapUser', 'keepalive', 'nullconn', 'textonly', 'titleonly', 'batchp', 'hex', 'mobile', 'chunked', 'dropcook', 'threads', 'unstableconn', 'nocast', 'noescape', 'snackbar'])
189+
['quotes','prog','verbose','rua','dumpall','osshell','sqlmapUser', 'keepalive', 'nullconn', 'textonly', 'titleonly', 'batchp', 'hex', 'mobile', 'chunked', 'dropcook', 'threads', 'unstableconn', 'nocast', 'noescape', 'techb', 'teche', 'techu', 'techs', 'techt', 'techq', 'snackbar'])
173190
.then((res) => {
174191
quotesOption = res.quotes;
175192
programOption = res.prog;
@@ -191,6 +208,12 @@ browser.contextMenus.onClicked.addListener((info, tab) => {
191208
unstableconnOption = res.unstableconn;
192209
nocastOption = res.nocast;
193210
noescapeOption = res.noescape;
211+
techbOption = res.techb;
212+
techeOption = res.teche;
213+
techuOption = res.techu;
214+
techsOption = res.techs;
215+
techtOption = res.techt;
216+
techqOption = res.techq;
194217
snackbarOption = res.snackbar;
195218
});
196219
let promiseCancel = new Promise(function(resolve,reject) {

options.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,18 @@
6565
"dumpall" /><br />
6666
</div>
6767
<div id="tech" class="tab-content">
68+
Stacked queries: <input type="checkbox" name="techs" id=
69+
"techs" /><br />
70+
Union based queries: <input type="checkbox" name="techu" id=
71+
"techu" /><br />
72+
Error based queries: <input type="checkbox" name="teche" id=
73+
"teche" /><br />
74+
Inline queries: <input type="checkbox" name="techq" id=
75+
"techq" /><br />
76+
Boolean based blind queries: <input type="checkbox" name="techb" id=
77+
"techb" /><br />
78+
Time based blind queries: <input type="checkbox" name="techt" id=
79+
"techt" /><br />
6880
</div>
6981
<div id="detect" class="tab-content">
7082
Page text only comparison: <input type="checkbox" name=

options.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ function saveOptions(e) {
2020
unstableconn: document.querySelector('input[name=unstableconn]').checked,
2121
nocast: document.querySelector('input[name=nocast]').checked,
2222
noescape: document.querySelector('input[name=noescape]').checked,
23+
techb: document.querySelector('input[name=techb]').checked,
24+
teche: document.querySelector('input[name=teche]').checked,
25+
techu: document.querySelector('input[name=techu]').checked,
26+
techs: document.querySelector('input[name=techs]').checked,
27+
techt: document.querySelector('input[name=techt]').checked,
28+
techq: document.querySelector('input[name=techq]').checked,
2329
snackbar: document.querySelector('input[name=snackbar]').checked,
2430

2531
});
@@ -31,7 +37,7 @@ function saveOptions(e) {
3137

3238
function restoreOptions() {
3339
var gettingItem = browser.storage.sync.get(
34-
['quotes', 'prog', 'verbose', 'rua', 'dumpall', 'osshell', 'sqlmapUser', 'keepalive', 'nullconn', 'textonly', 'titleonly', 'batchp', 'hex', 'mobile', 'chunked', 'dropcook', 'threads', 'unstableconn', 'nocast', 'noescape', 'snackbar']);
40+
['quotes', 'prog', 'verbose', 'rua', 'dumpall', 'osshell', 'sqlmapUser', 'keepalive', 'nullconn', 'textonly', 'titleonly', 'batchp', 'hex', 'mobile', 'chunked', 'dropcook', 'threads', 'unstableconn', 'nocast', 'noescape', 'techb', 'teche', 'techu', 'techs', 'techt', 'techq', 'snackbar']);
3541
gettingItem.then((res) => {
3642

3743
if (Object.keys(res).length > 0 && res.constructor === Object) {
@@ -55,6 +61,12 @@ function restoreOptions() {
5561
document.querySelector('input[name=unstableconn]').checked = res.unstableconn ? res.unstableconn : false;
5662
document.querySelector('input[name=nocast]').checked = res.nocast ? res.nocast : false;
5763
document.querySelector('input[name=noescape]').checked = res.noescape ? res.noescape : false;
64+
document.querySelector('input[name=techb]').checked = res.techb ? res.techb : true;
65+
document.querySelector('input[name=teche]').checked = res.teche ? res.teche : true;
66+
document.querySelector('input[name=techu]').checked = res.techu ? res.techu : true;
67+
document.querySelector('input[name=techs]').checked = res.techs ? res.techs : true;
68+
document.querySelector('input[name=techt]').checked = res.techt ? res.techt : true;
69+
document.querySelector('input[name=techq]').checked = res.techq ? res.techq : true;
5870
document.querySelector('input[name=snackbar]').checked = res.snackbar ? res.snackbar : false;
5971
}
6072
// if no saved info save the defaults to initialize

0 commit comments

Comments
 (0)