Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6f5d2ed

Browse files
committed
Minor cosmetic adjustments
1 parent a2077bf commit 6f5d2ed

5 files changed

Lines changed: 13 additions & 10 deletions

File tree

lib/contrib/tokenkidnapping/README.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Due to the anti-virus positive detection of executable stored inside this folder,
22
we needed to somehow circumvent this. As from the plain sqlmap users perspective nothing
3-
has to be done prior to it's usage by sqlmap, but if you want to have access to the
4-
original use the decrypt functionality of the ../extra/cloak/cloak.py utility.
3+
has to be done prior to its usage by sqlmap, but if you want to have access to the
4+
original executable use the decrypt functionality of the ../extra/cloak/cloak.py utility.
55

66
To prepare the executable to the cloaked form use this command:
77
python ../extra/cloak/cloak.py -i Churrasco.exe

lib/core/common.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
import urlparse
3333
import ntpath
3434
import posixpath
35+
3536
from tempfile import NamedTemporaryFile
3637

3738
from extra.cloak.cloak import decloak

lib/takeover/metasploit.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
from lib.core.common import dataToStdout
3737
from lib.core.common import getLocalIP
3838
from lib.core.common import getRemoteIP
39+
from lib.core.common import normalizePath
3940
from lib.core.common import pollProcess
4041
from lib.core.common import randomRange
4142
from lib.core.common import randomStr
@@ -647,6 +648,8 @@ def uploadMsfPayloadStager(self, web=False):
647648
else:
648649
self.exeFilePathRemote = "%s/%s" % (conf.tmpPath, os.path.basename(self.exeFilePathLocal))
649650

651+
self.exeFilePathRemote = normalizePath(self.exeFilePathRemote)
652+
650653
logger.info("uploading payload stager to '%s'" % self.exeFilePathRemote)
651654

652655
if web:

lib/takeover/web.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,10 @@ def webBackdoorRunCmd(self, cmd):
7676
return output
7777

7878
def webFileUpload(self, fileToUpload, destFileName, directory):
79-
file = open(fileToUpload, "r")
80-
self.__webFileStreamUpload(file, destFileName, directory)
81-
file.close()
82-
79+
inputFile = open(fileToUpload, "r")
80+
self.__webFileStreamUpload(inputFile, destFileName, directory)
81+
inputFile.close()
82+
8383
def __webFileStreamUpload(self, stream, destFileName, directory):
8484
if self.webApi == "php":
8585
multipartParams = {
@@ -89,7 +89,7 @@ def __webFileStreamUpload(self, stream, destFileName, directory):
8989
}
9090
page = Request.getPage(url=self.webUploaderUrl, multipart=multipartParams)
9191

92-
if "Backdoor uploaded" not in page:
92+
if "File uploaded" not in page:
9393
warnMsg = "unable to upload the backdoor through "
9494
warnMsg += "the uploader agent on '%s'" % directory
9595
logger.warn(warnMsg)
@@ -179,7 +179,7 @@ def webInit(self):
179179
self.webUploaderUrl = self.webUploaderUrl.replace("./", "/").replace("\\", "/")
180180
uplPage, _ = Request.getPage(url=self.webUploaderUrl, direct=True)
181181

182-
if "sqlmap backdoor uploader" not in uplPage:
182+
if "sqlmap file uploader" not in uplPage:
183183
warnMsg = "unable to upload the uploader "
184184
warnMsg += "agent on '%s'" % directory
185185
logger.warn(warnMsg)
@@ -200,6 +200,5 @@ def webInit(self):
200200
logger.info(infoMsg)
201201

202202
break
203-
203+
204204
backdoorStream.name = backdoorStream.old_name
205-

shell/uploader.php_

1 Byte
Binary file not shown.

0 commit comments

Comments
 (0)