Minor code refactoring

This commit is contained in:
Bernardo Damele
2010-01-14 20:42:45 +00:00
parent 26c7b74e65
commit c4215ce8d2
6 changed files with 30 additions and 29 deletions

View File

@@ -636,15 +636,14 @@ class Metasploit:
def uploadMsfPayloadStager(self, web=False):
if web:
self.exeFilePathRemote = "./%s" % os.path.basename(self.exeFilePathLocal)
self.exeFilePathRemote = "%s/%s" % (self.webDirectory, os.path.basename(self.exeFilePathLocal))
else:
self.exeFilePathRemote = "%s/%s" % (conf.tmpPath, os.path.basename(self.exeFilePathLocal))
logger.info("uploading payload stager to '%s'" % self.exeFilePathRemote)
if web:
for directory in self.webDirectories:
self.webFileUpload(self.exeFilePathLocal, self.exeFilePathRemote, directory)
self.webFileUpload(self.exeFilePathLocal, self.exeFilePathRemote, self.webDirectory)
else:
self.writeFile(self.exeFilePathLocal, self.exeFilePathRemote, "binary", False)