1- /* Written by oxagast. Edited some things from mycliget to get this to work. */
2-
3- /*
4- * V: 0.0.9 - 3/25/2019
5- */
6-
7- /*
1+ /* Written by oxagast. Edited some things from mycliget to get this to work.
2+ * Some of this code from mycliget.
83 * clipboard function originated with mozilla webextension examples here:
94 * https://github.com/mdn/webextensions-examples
105 */
@@ -50,9 +45,6 @@ let ajaxGet = (obj) => {
5045 } ) ;
5146} ;
5247
53- // callback for onBeforeSendHeaders listener.
54- // Returns a promise and adds cancel request to the xmlhttpreq
55- // trigger now looped into main promise.all
5648let getHeaders = ( e ) => {
5749 headers = '' ;
5850 sqlmapheaders = '' ;
@@ -62,7 +54,6 @@ let getHeaders = (e) => {
6254 sqlmapheaders += " --cookie '" + header . value + "'" ;
6355 }
6456 }
65- //console.log('headers: ' + headers.toString());
6657
6758
6859 var asyncCancel = new Promise ( ( resolve , reject ) => {
@@ -80,13 +71,6 @@ function assembleCmd(url, referUrl) {
8071 if ( dumpallOption ) { sqlmapText += " --dump-all" ; } ;
8172 if ( osshellOption ) { sqlmapText += " --os-shell" ; } ;
8273
83- // ######################################################################
84- // use remote suggested filename, how safe is this? also only available in moderately up to date
85- // ## replacement for -O -J, same security issues though, make optional
86- // ## this version will accept filename or location header
87- // curl -s -D - "$url" -o /dev/null | grep -i "filename\|Location" | (IFS= read -r spo; sec=$(echo ${spo//*\//filename=}); echo ${sec#*filename=});
88- // ######################################################################
89-
9074
9175 sqlmapText += sqlmapheaders ;
9276 try {
@@ -99,17 +83,13 @@ function assembleCmd(url, referUrl) {
9983
10084
10185
102- if ( quotesOption ) {
103- sqlmapText = wgetText . replace ( / ' / g, '"' ) ;
104- }
10586 const sqlmapCode = "copyToClipboard(" + JSON . stringify ( sqlmapText ) + ", " + snackbarOption + ");" ;
10687
10788 switch ( programOption ) {
10889 case "sqlmap" :
10990 return ( sqlmapCode ) ;
11091 break ;
11192 }
112- //return (programOption === "curl") ? curlCode : wgetCode;
11393} ;
11494
11595function copyCommand ( code , tab ) {
0 commit comments