Skip to content

Commit 40f0a5e

Browse files
author
Marshall Lee Whittaker
committed
no cast and no escape options
1 parent db781b7 commit 40f0a5e

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

background.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ var chunkedOption = false;
2525
var dropcookOption = false;
2626
var threadsOption = "2";
2727
var unstableconnOption = false;
28+
var nocastOption = false;
29+
var noescapeOption = false;
2830
var trigger;
2931

3032

@@ -91,8 +93,11 @@ function assembleCmd(url, referUrl) {
9193
if (chunkedOption) {sqlmapText += " --chunked"; };
9294
if (dropcookOption) {sqlmapText += " --drop-set-cookie"; };
9395
if (unstableconnOption) {sqlmapText += " --unstable"; };
96+
if (nocastOption) {sqlmapText += " --no-cast"; };
97+
if (noescapeOption) {sqlmapText += " --no-escape"; };
9498
sqlmapText += " --threads " + threadsOption;
95-
sqlmapText += sqlmapheaders;
99+
100+
sqlmapText += sqlmapheaders;
96101
try {
97102
if (sqlmapUserOption.replace(/\s/g,'')) { sqlmapText += " " + sqlmapUserOption; }
98103
}
@@ -164,7 +169,7 @@ browser.contextMenus.onClicked.addListener((info, tab) => {
164169

165170
// check the saved options each click in case they changed
166171
let gettingOptions = browser.storage.sync.get(
167-
['quotes','prog','verbose','rua','dumpall','osshell','sqlmapUser', 'keepalive', 'nullconn', 'textonly', 'titleonly', 'batchp', 'hex', 'mobile', 'chunked', 'dropcook', 'threads', 'unstableconn', 'snackbar'])
172+
['quotes','prog','verbose','rua','dumpall','osshell','sqlmapUser', 'keepalive', 'nullconn', 'textonly', 'titleonly', 'batchp', 'hex', 'mobile', 'chunked', 'dropcook', 'threads', 'unstableconn', 'nocast', 'noescape', 'snackbar'])
168173
.then((res) => {
169174
quotesOption = res.quotes;
170175
programOption = res.prog;
@@ -184,6 +189,8 @@ browser.contextMenus.onClicked.addListener((info, tab) => {
184189
dropcookOption = res.dropcook;
185190
threadsOption = res.threads;
186191
unstableconnOption = res.unstableconn;
192+
nocastOption = res.nocast;
193+
noescapeOption = res.noescape;
187194
snackbarOption = res.snackbar;
188195
});
189196
let promiseCancel = new Promise(function(resolve,reject) {

options.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@
5555
"threads" /><br />
5656
</div>
5757
<div id="injection" class="tab-content">
58+
No payload cast: <input type="checkbox" name="nocast" id=
59+
"nocast" /><br />
60+
No string escape: <input type="checkbox" name="noescape" id=
61+
"noescape" /><br />
5862
</div>
5963
<div id="enum" class="tab-content">
6064
Dump all tables: <input type="checkbox" name="dumpall" id=

options.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ function saveOptions(e) {
1818
dropcook: document.querySelector('input[name=dropcook]').checked,
1919
threads: document.querySelector('input[name=threads]').value,
2020
unstableconn: document.querySelector('input[name=unstableconn]').checked,
21+
nocast: document.querySelector('input[name=nocast]').checked,
22+
noescape: document.querySelector('input[name=noescape]').checked,
2123
snackbar: document.querySelector('input[name=snackbar]').checked,
2224

2325
});
@@ -29,7 +31,7 @@ function saveOptions(e) {
2931

3032
function restoreOptions() {
3133
var gettingItem = browser.storage.sync.get(
32-
['quotes', 'prog', 'verbose', 'rua', 'dumpall', 'osshell', 'sqlmapUser', 'keepalive', 'nullconn', 'textonly', 'titleonly', 'batchp', 'hex', 'mobile', 'chunked', 'dropcook', 'threads', 'unstableconn', 'snackbar']);
34+
['quotes', 'prog', 'verbose', 'rua', 'dumpall', 'osshell', 'sqlmapUser', 'keepalive', 'nullconn', 'textonly', 'titleonly', 'batchp', 'hex', 'mobile', 'chunked', 'dropcook', 'threads', 'unstableconn', 'nocast', 'noescape', 'snackbar']);
3335
gettingItem.then((res) => {
3436

3537
if (Object.keys(res).length > 0 && res.constructor === Object) {
@@ -51,6 +53,8 @@ function restoreOptions() {
5153
document.querySelector('input[name=dropcook]').checked = res.dropcook ? res.dropcook : false;
5254
document.querySelector('input[name=threads]').value = res.threads ? res.threads : '2';
5355
document.querySelector('input[name=unstableconn]').checked = res.unstableconn ? res.unstableconn : false;
56+
document.querySelector('input[name=nocast]').checked = res.nocast ? res.nocast : false;
57+
document.querySelector('input[name=noescape]').checked = res.noescape ? res.noescape : false;
5458
document.querySelector('input[name=snackbar]').checked = res.snackbar ? res.snackbar : false;
5559
}
5660
// if no saved info save the defaults to initialize

0 commit comments

Comments
 (0)