File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -200,11 +200,11 @@ def webInit(self):
200200 logger .info (infoMsg )
201201
202202 if self .webApi == "asp" :
203- runcmdName = 'runcmd .exe'
204- runcmdStream = decloakToNamedTemporaryFile (os .path .join (paths .SQLMAP_SHELL_PATH , runcmdName + '_ ' ), runcmdName )
203+ runcmdName = "tmpe%s .exe" % randomStr ( 4 )
204+ runcmdStream = decloakToNamedTemporaryFile (os .path .join (paths .SQLMAP_SHELL_PATH , 'runcmd.exe_ ' ), runcmdName )
205205 scriptsDirectory = "Scripts"
206206 backdoorDirectory = "%s..\%s" % (posixToNtSlashes (directory ), scriptsDirectory )
207- backdoorContent = backdoorContent .replace ("WRITABLE_DIR" , backdoorDirectory )
207+ backdoorContent = backdoorContent .replace ("WRITABLE_DIR" , backdoorDirectory ). replace ( "RUNCMD_EXE" , runcmdName )
208208 backdoorStream .file .truncate ()
209209 backdoorStream .read ()
210210 backdoorStream .seek (0 )
You can’t perform that action at this time.
0 commit comments