Skip to content

Commit 4504f2c

Browse files
author
Marshall Lee Whittaker
committed
Added some brute force options.
1 parent 60ba08e commit 4504f2c

File tree

4 files changed

+35
-7
lines changed

4 files changed

+35
-7
lines changed

background.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ var techuOption = true;
3434
var techsOption = true;
3535
var techtOption = true;
3636
var techqOption = true;
37+
var dbsOption = true;
38+
var ctablesOption = false;
39+
var ccolumnsOption = false;
40+
var cfilesOption = false;
3741
var trigger;
3842

3943

@@ -102,6 +106,10 @@ function assembleCmd(url, referUrl) {
102106
if (unstableconnOption) {sqlmapText += " --unstable"; };
103107
if (nocastOption) {sqlmapText += " --no-cast"; };
104108
if (noescapeOption) {sqlmapText += " --no-escape"; };
109+
if (dbsOption) {sqlmapText += " --dbs"; };
110+
if (ctablesOption) {sqlmapText += " --common-tables"; };
111+
if (ccolumnsOption) {sqlmapText += " --common-columns"; };
112+
if (cfilesOption) {sqlmapText += " --common-files"; };
105113

106114
techOption = ''
107115
if (techbOption) {techOption += "B"; };
@@ -186,7 +194,7 @@ browser.contextMenus.onClicked.addListener((info, tab) => {
186194

187195
// check the saved options each click in case they changed
188196
let gettingOptions = browser.storage.sync.get(
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'])
197+
['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', 'dbs', 'ctables', 'ccolumns', 'cfiles', 'snackbar'])
190198
.then((res) => {
191199
quotesOption = res.quotes;
192200
programOption = res.prog;
@@ -214,6 +222,10 @@ browser.contextMenus.onClicked.addListener((info, tab) => {
214222
techsOption = res.techs;
215223
techtOption = res.techt;
216224
techqOption = res.techq;
225+
dbsOption = res.dbs;
226+
ctablesOption = res.ctables;
227+
ccolumnsOption = res.ccolumns;
228+
cfilesOption = res.cfiles;
217229
snackbarOption = res.snackbar;
218230
});
219231
let promiseCancel = new Promise(function(resolve,reject) {

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"manifest_version": 2,
33
"name": "SQLMap Helper",
44
"description": "Adds a helper menu for SQLMap.",
5-
"version": "0.12",
5+
"version": "0.12r3",
66
"homepage_url": "https://github.com/oxagast/sqlmap-helper",
77

88
"background": {

options.html

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@
6161
"noescape" /><br />
6262
</div>
6363
<div id="enum" class="tab-content">
64+
Enumerate databases: <input type="checkbox" name="dbs" id=
65+
"dbs" /><br />
6466
Dump all tables: <input type="checkbox" name="dumpall" id=
6567
"dumpall" /><br />
6668
</div>
@@ -79,12 +81,18 @@
7981
"techt" /><br />
8082
</div>
8183
<div id="detect" class="tab-content">
82-
Page text only comparison: <input type="checkbox" name=
83-
"textonly" id="textonly" /><br />
84-
Page title only comparison: <input type="checkbox" name=
85-
"titleonly" id="titleonly" /><br />
84+
Page text only comparison: <input type="checkbox" name=
85+
"textonly" id="textonly" /><br />
86+
Page title only comparison: <input type="checkbox" name=
87+
"titleonly" id="titleonly" /><br />
8688
</div>
8789
<div id="brute" class="tab-content">
90+
Check for common tables: <input type="checkbox" name=
91+
"ctables" id="ctables" /><br />
92+
Check for common columns <input type="checkbox" name=
93+
"ccolumns" id="ccolumns" /><br />
94+
Check for common files: <input type="checkbox" name=
95+
"cfiles" id="cfiles" /><br />
8896
</div>
8997
<div id="osa" class="tab-content">
9098
Try to obtain OS shell: <input type="checkbox" name=

options.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ function saveOptions(e) {
2626
techs: document.querySelector('input[name=techs]').checked,
2727
techt: document.querySelector('input[name=techt]').checked,
2828
techq: document.querySelector('input[name=techq]').checked,
29+
dbs: document.querySelector('input[name=dbs]').checked,
30+
ctables: document.querySelector('input[name=ctables]').checked,
31+
ccolumns: document.querySelector('input[name=ccolumns]').checked,
32+
cfiles: document.querySelector('input[name=cfiles]').checked,
2933
snackbar: document.querySelector('input[name=snackbar]').checked,
3034

3135
});
@@ -37,7 +41,7 @@ function saveOptions(e) {
3741

3842
function restoreOptions() {
3943
var gettingItem = browser.storage.sync.get(
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']);
44+
['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', 'dbs', 'ctables', 'ccolumns', 'cfiles', 'snackbar']);
4145
gettingItem.then((res) => {
4246

4347
if (Object.keys(res).length > 0 && res.constructor === Object) {
@@ -67,6 +71,10 @@ function restoreOptions() {
6771
document.querySelector('input[name=techs]').checked = res.techs ? res.techs : true;
6872
document.querySelector('input[name=techt]').checked = res.techt ? res.techt : true;
6973
document.querySelector('input[name=techq]').checked = res.techq ? res.techq : true;
74+
document.querySelector('input[name=dbs]').checked = res.dbs ? res.dbs : true;
75+
document.querySelector('input[name=ctables]').checked = res.ctables ? res.ctables : false;
76+
document.querySelector('input[name=ccolumns]').checked = res.ccolumns ? res.ccolumns : false;
77+
document.querySelector('input[name=cfiles]').checked = res.cfiles ? res.cfiles : false;
7078
document.querySelector('input[name=snackbar]').checked = res.snackbar ? res.snackbar : false;
7179
}
7280
// if no saved info save the defaults to initialize

0 commit comments

Comments
 (0)