Skip to content

Commit 2c24a86

Browse files
committed
Beta release
Implemented new switches: --abort-code --ignore-code --ignore-redirects --ignore-timeouts --retries --retry-on --randomize --safe-url --safe-post --safe-req --safe-freq --skip-urlencode --csrf-data --chunked --hpp --eval
1 parent fa992c0 commit 2c24a86

File tree

3 files changed

+400
-140
lines changed

3 files changed

+400
-140
lines changed

app.js

Lines changed: 67 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ class SQLMapGenerator {
3131
'--method': 'method',
3232
'--param-del': 'paramDel',
3333
'-r': 'requestFile',
34+
'--eval': 'eval',
3435
'--data': 'data',
3536

3637
'--host': 'host',
@@ -49,26 +50,40 @@ class SQLMapGenerator {
4950
'--auth-cred': 'authCred',
5051
'--auth-file': 'authFile',
5152

52-
'--csrf-token': 'csrfToken',
53-
'--csrf-method': 'csrfMethod',
5453
'--csrf-url': 'csrfUrl',
54+
'--csrf-method': 'csrfMethod',
55+
'--csrf-data': 'csrfData',
56+
'--csrf-token': 'csrfToken',
5557
'--csrf-retries': 'csrfRetries',
58+
59+
'--safe-url': 'safeUrl',
60+
'--safe-post': 'safePost',
61+
'--safe-req': 'safeReq',
62+
'--safe-freq': 'safeFreq',
63+
5664

5765
'-p': 'paramTest',
5866
'--skip': 'paramSkip',
5967
'--param-exclude': 'paramExclude',
6068
'--param-filter': 'paramFilter',
6169
'--prefix': 'prefix',
6270
'--suffix': 'suffix',
71+
'--randomize': 'randomize',
6372

73+
'--titles': 'titles',
74+
'--text-only': 'textOnly',
75+
'--ignore-redirects': 'ignoreRedirects',
76+
'--ignore-timeouts': 'ignoreTimeouts',
6477
'--string': 'string',
6578
'--regexp': 'regexp',
6679
'--not-string': 'notString',
6780
'--code': 'code',
68-
'--titles': 'titles',
69-
'--text-only': 'textOnly',
70-
'--level': 'level',
81+
'--abort-code': 'abortCode',
82+
'--ignore-code': 'ignoreCode',
83+
'--retries': 'retries',
84+
'--retry-on': 'retryOn',
7185

86+
'--level': 'level',
7287
'--risk': 'risk',
7388
'--dbms': 'dbms',
7489
'--os': 'os',
@@ -81,6 +96,9 @@ class SQLMapGenerator {
8196
'--no-cast': 'noCast',
8297
'--no-escape': 'noEscape',
8398
'--predict-output':'predictOutput',
99+
'--skip-urlencode':'skipUrlencode',
100+
'--chunked':'chunked',
101+
'--hpp':'hpp',
84102

85103
'--all': 'all',
86104
'--banner': 'banner',
@@ -215,18 +233,25 @@ class SQLMapGenerator {
215233
var id = this.paramMapping[confkey];
216234
var elem = document.getElementById(id);
217235
var value = null;
218-
if (elem.type === 'checkbox') {
219-
value = elem.checked;
220-
}
221-
else if (elem.type === 'text' || elem.type === 'number' || elem.type === 'url' || elem.type === 'select-one') {
222-
value = elem.value.trim();
223-
}
224-
else if (elem.type === 'textarea') {
225-
value = elem.value.trim().replaceAll("\n", "\\\n");
226-
}
236+
try {
227237

228-
if (value) {
229-
config[confkey] = value;
238+
239+
if (elem.type === 'checkbox') {
240+
value = elem.checked;
241+
}
242+
else if (elem.type === 'text' || elem.type === 'number' || elem.type === 'url' || elem.type === 'select-one') {
243+
value = elem.value.trim();
244+
}
245+
else if (elem.type === 'textarea') {
246+
value = elem.value.trim().replaceAll("\n", "\\\n");
247+
}
248+
249+
if (value) {
250+
config[confkey] = value;
251+
}
252+
253+
} catch (e) {
254+
console.log(confkey, e);
230255
}
231256
}
232257

@@ -291,6 +316,7 @@ class SQLMapGenerator {
291316
if (paramDel && paramDel !== "&") config['--param-del'] = paramDel;
292317

293318
this.setStandardConfigItem(config, '-r');
319+
this.setStandardConfigItem(config, '--eval');
294320
this.setStandardConfigItem(config, '--data');
295321

296322
// ## Request Headers
@@ -332,9 +358,8 @@ class SQLMapGenerator {
332358
this.setStandardConfigItem(config, '--auth-file');
333359

334360
// ## CSRF Tokens Control
335-
this.setStandardConfigItem(config, '--csrf-token');
336361
this.setStandardConfigItem(config, '--csrf-url');
337-
362+
338363
const csrfMethod = document.getElementById('csrfMethod').value;
339364
if (csrfMethod && csrfMethod !== 'custom') {
340365
config['--csrf-method'] = csrfMethod;
@@ -343,9 +368,18 @@ class SQLMapGenerator {
343368
if (customCsrfMethod) config['--csrf-method'] = customCsrfMethod;
344369
}
345370

371+
this.setStandardConfigItem(config, '--csrf-data');
372+
this.setStandardConfigItem(config, '--csrf-token');
373+
346374
const csrfRetries = document.getElementById('csrfRetries').value.trim();
347375
if (csrfRetries && csrfRetries > 0) config['--csrf-retries'] = csrfRetries;
348376

377+
// ## Safe Requests
378+
this.setStandardConfigItem(config, '--safe-url');
379+
this.setStandardConfigItem(config, '--safe-post');
380+
this.setStandardConfigItem(config, '--safe-req');
381+
this.setStandardConfigItem(config, '--safe-freq');
382+
349383
// # INJECTION TAB
350384
// ## Parameters
351385
this.setStandardConfigItem(config, '-p');
@@ -354,17 +388,27 @@ class SQLMapGenerator {
354388
this.setStandardConfigItem(config, '--param-filter');
355389
this.setStandardConfigItem(config, '--prefix');
356390
this.setStandardConfigItem(config, '--suffix');
391+
this.setStandardConfigItem(config, '--randomize');
357392

358393
// ## Detection
394+
this.setStandardConfigItem(config, '--text-only');
395+
this.setStandardConfigItem(config, '--titles');
396+
this.setStandardConfigItem(config, '--ignore-redirects');
397+
this.setStandardConfigItem(config, '--ignore-timeouts');
359398
this.setStandardConfigItem(config, '--string');
360399
this.setStandardConfigItem(config, '--regexp');
361400
this.setStandardConfigItem(config, '--not-string');
362401

363402
const code = document.getElementById('code').value.trim();
364403
if (code && code >= 100 && code <= 599) config['--code'] = code;
404+
405+
this.setStandardConfigItem(config, '--abort-code');
406+
this.setStandardConfigItem(config, '--ignore-code');
365407

366-
this.setStandardConfigItem(config, '--text-only');
367-
this.setStandardConfigItem(config, '--titles');
408+
const retries = document.getElementById('retries').value.trim();
409+
if (retries && retries >= 0) config['--retries'] = csrfRetries;
410+
411+
this.setStandardConfigItem(config, '--retry-on');
368412

369413
// ## Attack Optimalization
370414
const level = document.getElementById('level').value;
@@ -393,6 +437,9 @@ class SQLMapGenerator {
393437
this.setStandardConfigItem(config, '--no-cast');
394438
this.setStandardConfigItem(config, '--no-escape');
395439
this.setStandardConfigItem(config, '--predict-output');
440+
this.setStandardConfigItem(config, '--skip-urlencode');
441+
this.setStandardConfigItem(config, '--chunked');
442+
this.setStandardConfigItem(config, '--hpp');
396443

397444
// # EXPLOITATION TAB
398445
// ## Enumeration and Data Exfiltraion

0 commit comments

Comments
 (0)