@@ -55,14 +55,24 @@ class SQLMapGenerator {
5555 input . addEventListener ( 'input' , ( ) => this . updateCommand ( ) ) ;
5656 input . addEventListener ( 'change' , ( ) => this . updateCommand ( ) ) ;
5757 } ) ;
58+
59+ // HTTP method custom field toggle
60+ document . getElementById ( 'method' ) . addEventListener ( 'change' , ( e ) => {
61+ const customHttpGroup = document . getElementById ( 'customHttpMethodGroup' ) ;
62+ if ( e . target . value === 'custom' ) {
63+ customHttpGroup . style . display = 'block' ;
64+ } else {
65+ customHttpGroup . style . display = 'none' ;
66+ }
67+ } ) ;
5868
5969 // User-Agent custom field toggle
6070 document . getElementById ( 'userAgent' ) . addEventListener ( 'change' , ( e ) => {
61- const customGroup = document . getElementById ( 'customUserAgentGroup' ) ;
71+ const customUserAgentGroup = document . getElementById ( 'customUserAgentGroup' ) ;
6272 if ( e . target . value === 'custom' ) {
63- customGroup . style . display = 'block' ;
73+ customUserAgentGroup . style . display = 'block' ;
6474 } else {
65- customGroup . style . display = 'none' ;
75+ customUserAgentGroup . style . display = 'none' ;
6676 }
6777 } ) ;
6878 }
@@ -187,45 +197,49 @@ class SQLMapGenerator {
187197 const proxyIgnore = document . getElementById ( 'proxyIgnore' ) . checked
188198 if ( proxyIgnore ) config [ '--ignore-proxy' ] = proxyIgnore ;
189199
190-
191-
192-
193-
194- //
195-
200+ // Request options
196201 const method = document . getElementById ( 'method' ) . value ;
197- if ( method ) config [ '--method' ] = method ;
202+ if ( method && method !== 'custom' ) {
203+ config [ '--method' ] = method ;
204+ } else if ( method === 'custom' ) {
205+ const customHttpMethod = document . getElementById ( 'customHttpMethod' ) . value . trim ( ) ;
206+ if ( customHttpMethod ) config [ '--method' ] = customHttpMethod ;
207+ }
198208
199- const data = document . getElementById ( 'data' ) . value . trim ( ) ;
209+ const data = document . getElementById ( 'data' ) . value . trim ( ) . replaceAll ( "\n" , "\\\n" ) ;
200210 if ( data ) config [ '--data' ] = data ;
201211
202-
203-
204-
205-
212+ const paramDel = document . getElementById ( 'paramDel' ) . value . trim ( ) ;
213+ if ( paramDel ) config [ '--param-del' ] = paramDel ;
214+
215+ const host = document . getElementById ( 'host' ) . value . trim ( ) ;
216+ if ( host ) config [ '--host' ] = host ;
206217
207218 // Request options
208219 const userAgent = document . getElementById ( 'userAgent' ) . value ;
209- if ( userAgent && userAgent !== 'custom' ) {
210- config [ '-A' ] = userAgent ;
211- } else if ( userAgent === 'custom' ) {
220+ if ( userAgent && userAgent === 'random' ) {
221+ config [ '--random-agent' ] = true ;
222+ }
223+ else if ( userAgent && userAgent === 'mobile' ) {
224+ config [ '--mobile' ] = true ;
225+ }
226+ else if ( userAgent && userAgent === 'custom' ) {
212227 const customUserAgent = document . getElementById ( 'customUserAgent' ) . value . trim ( ) ;
213228 if ( customUserAgent ) config [ '-A' ] = customUserAgent ;
214229 }
215-
216- const headers = document . getElementById ( 'headers' ) . value . trim ( ) ;
230+ else if ( userAgent ) {
231+ config [ '-A' ] = userAgent ;
232+ }
233+
234+ const referer = document . getElementById ( 'referer' ) . value . trim ( ) ;
235+ if ( referer ) config [ '--referer' ] = referer ;
236+
237+ const headers = document . getElementById ( 'headers' ) . value . trim ( ) . replaceAll ( "\n" , "\\\n" ) ;
217238 if ( headers ) config [ '-H' ] = headers ;
218239
219240 const cookie = document . getElementById ( 'cookie' ) . value . trim ( ) ;
220241 if ( cookie ) config [ '--cookie' ] = cookie ;
221242
222- const referer = document . getElementById ( 'referer' ) . value . trim ( ) ;
223- if ( referer ) config [ '--referer' ] = referer ;
224-
225-
226-
227-
228- if ( document . getElementById ( 'randomAgent' ) . checked ) config [ '--random-agent' ] = true ;
229243
230244 // Injection options
231245 const testParams = document . getElementById ( 'testParams' ) . value . trim ( ) ;
@@ -327,7 +341,8 @@ class SQLMapGenerator {
327341 '-u' , '-d' , '-r' , '-m' , '-l' , '--scope' , '-g' ,
328342 '--force-ssl' , '--timeout' , '--delay' , '--threads' ,
329343 '--proxy' , '--proxy-cred' , '--proxy-file' , '--proxy-freq' , '--ignore-proxy' ,
330- '--method' , '--data' ,
344+ '--method' , '--data' , '--param-del' ,
345+ '--host' , '-A' , '--mobile' , '--random-agent' , "--referer" , "-H" ,
331346 '-p' , '--skip' , '--level' , '--risk' , '--dbms' , '--os' , '--technique' ,
332347 '--batch' , '-v' , '-t' , '--parse-errors' , '--test-filter' ,
333348 '--current-user' , '--current-db' , '--dbs' , '--tables' , '--columns' , '--schema' , '--dump-all' ,
@@ -344,9 +359,13 @@ class SQLMapGenerator {
344359 } else {
345360 // Quote values that contain spaces or special characters
346361 const value = config [ param ] . toString ( ) ;
347- if ( value . includes ( ' ' ) || value . includes ( '&' ) || value . includes ( '= ' ) ) {
362+ if ( value . includes ( ' ' ) || value . includes ( '&' ) || value . includes ( ';' ) || value . includes ( '=' ) || value . includes ( '\n ') ) {
348363 command += ` ${ param } "${ value } "` ;
349- } else {
364+ }
365+ else if ( value . includes ( '"' ) ) {
366+ command += ` ${ param } ` + value . replaceAll ( '"' , '\\"' ) ;
367+ }
368+ else {
350369 command += ` ${ param } ${ value } ` ;
351370 }
352371 }
@@ -566,27 +585,31 @@ class SQLMapGenerator {
566585 // Map parameters to form element IDs
567586 const paramMapping = {
568587 '-u' : 'url' ,
569- '--method' : 'method' ,
570- '--data' : 'data' ,
588+ '-d' : 'directDb' ,
571589 '-r' : 'requestFile' ,
590+ '-m' : 'targetsFile' ,
572591 '-l' : 'burpFile' ,
573592 '--scope' : 'burpFileScope' ,
574- '-m' : 'targetsFile' ,
575- '-d' : 'directDb' ,
576593 '-g' : 'googleDork' ,
577594 '--force-ssl' : 'forceSsl' ,
578- '-A' : 'userAgent' ,
579- '-H' : 'headers' ,
580- '--cookie' : 'cookie' ,
581- '--referer' : 'referer' ,
595+ '--timeout' : 'timeout' ,
596+ '--delay' : 'delay' ,
597+ '--threads' : 'threads' ,
582598 '--proxy' : 'proxy' ,
583599 '--proxy-cred' : 'proxyCred' ,
584600 '--proxy-file' : 'proxyFile' ,
585601 '--proxy-freq' : 'proxyFreq' ,
586602 '--ignore-proxy' : 'proxyIgnore' ,
587- '--timeout' : 'timeout' ,
588- '--delay' : 'delay' ,
603+ '--method' : 'method' ,
604+ '--data' : 'data' ,
605+ '--param-del' : 'paramDel' ,
606+ '--host' : 'host' ,
607+ '-A' : 'userAgent' ,
608+ '--mobile' : 'mobileUserAgent' ,
589609 '--random-agent' : 'randomAgent' ,
610+ '--referer' : 'referer' ,
611+ '-H' : 'headers' ,
612+ '--cookie' : 'cookie' ,
590613 '-p' : 'testParams' ,
591614 '--skip' : 'skipParams' ,
592615 '--level' : 'level' ,
@@ -609,7 +632,6 @@ class SQLMapGenerator {
609632 '-D' : 'database' ,
610633 '-T' : 'table' ,
611634 '-C' : 'column' ,
612- '--threads' : 'threads' ,
613635 '--keep-alive' : 'keepAlive' ,
614636 '--null-connection' : 'nullConnection' ,
615637 '--predict-output' : 'predictOutput' ,
0 commit comments