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

Skip to content

Commit f95d0c8

Browse files
committed
Minor refactoring (already default mode in os.makedirs)
1 parent 76905e8 commit f95d0c8

4 files changed

Lines changed: 11 additions & 11 deletions

File tree

lib/core/dump.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ def dbTableValues(self, tableValues):
415415
elif conf.dumpFormat in (DUMP_FORMAT.CSV, DUMP_FORMAT.HTML):
416416
if not os.path.isdir(dumpDbPath):
417417
try:
418-
os.makedirs(dumpDbPath, 0755)
418+
os.makedirs(dumpDbPath)
419419
except:
420420
warnFile = True
421421

@@ -424,7 +424,7 @@ def dbTableValues(self, tableValues):
424424

425425
if not os.path.isdir(dumpDbPath):
426426
try:
427-
os.makedirs(dumpDbPath, 0755)
427+
os.makedirs(dumpDbPath)
428428
except Exception, ex:
429429
try:
430430
tempDir = tempfile.mkdtemp(prefix="sqlmapdb")
@@ -612,7 +612,7 @@ def dbTableValues(self, tableValues):
612612
mimetype = magic.from_buffer(value, mime=True)
613613
if any(mimetype.startswith(_) for _ in ("application", "image")):
614614
if not os.path.isdir(dumpDbPath):
615-
os.makedirs(dumpDbPath, 0755)
615+
os.makedirs(dumpDbPath)
616616

617617
_ = re.sub(r"[^\w]", UNSAFE_DUMP_FILEPATH_REPLACEMENT, normalizeUnicode(unsafeSQLIdentificatorNaming(column)))
618618
filepath = os.path.join(dumpDbPath, "%s-%d.bin" % (_, randomInt(8)))

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from lib.core.enums import OS
2020

2121
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
22-
VERSION = "1.2.3.4"
22+
VERSION = "1.2.3.5"
2323
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2424
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2525
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

lib/core/target.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ def _createFilesDir():
581581

582582
if not os.path.isdir(conf.filePath):
583583
try:
584-
os.makedirs(conf.filePath, 0755)
584+
os.makedirs(conf.filePath)
585585
except OSError, ex:
586586
tempDir = tempfile.mkdtemp(prefix="sqlmapfiles")
587587
warnMsg = "unable to create files directory "
@@ -603,7 +603,7 @@ def _createDumpDir():
603603

604604
if not os.path.isdir(conf.dumpPath):
605605
try:
606-
os.makedirs(conf.dumpPath, 0755)
606+
os.makedirs(conf.dumpPath)
607607
except OSError, ex:
608608
tempDir = tempfile.mkdtemp(prefix="sqlmapdump")
609609
warnMsg = "unable to create dump directory "
@@ -624,7 +624,7 @@ def _createTargetDirs():
624624

625625
try:
626626
if not os.path.isdir(paths.SQLMAP_OUTPUT_PATH):
627-
os.makedirs(paths.SQLMAP_OUTPUT_PATH, 0755)
627+
os.makedirs(paths.SQLMAP_OUTPUT_PATH)
628628

629629
_ = os.path.join(paths.SQLMAP_OUTPUT_PATH, randomStr())
630630
open(_, "w+b").close()
@@ -654,7 +654,7 @@ def _createTargetDirs():
654654

655655
try:
656656
if not os.path.isdir(conf.outputPath):
657-
os.makedirs(conf.outputPath, 0755)
657+
os.makedirs(conf.outputPath)
658658
except (OSError, IOError, TypeError), ex:
659659
try:
660660
tempDir = tempfile.mkdtemp(prefix="sqlmapoutput")

txt/checksum.md5

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ e3a3f5218b2e52dd0afafdfc9fed2002 lib/core/agent.py
3434
12e80071013606f01822c3823fb51054 lib/core/decorators.py
3535
9458679feb9184f3fb1611daf1ebef63 lib/core/defaults.py
3636
a8bea09096a42a9a7feeb9d4d118ae66 lib/core/dicts.py
37-
0d742fbf72bca25a3e82640616c30c9a lib/core/dump.py
37+
9ea8a043030796e6faef7f7e957729d5 lib/core/dump.py
3838
c8551f7696a76450e6d139409e4f06cd lib/core/enums.py
3939
cada93357a7321655927fc9625b3bfec lib/core/exception.py
4040
1e5532ede194ac9c083891c2f02bca93 lib/core/__init__.py
@@ -46,10 +46,10 @@ ffa5f01f39b17c8d73423acca6cfe86a lib/core/readlineng.py
4646
0c3eef46bdbf87e29a3f95f90240d192 lib/core/replication.py
4747
a7db43859b61569b601b97f187dd31c5 lib/core/revision.py
4848
fcb74fcc9577523524659ec49e2e964b lib/core/session.py
49-
9fde692b6fa94718d5fbe8f804e4edde lib/core/settings.py
49+
4bb1c9ea37c92266776add390287cb39 lib/core/settings.py
5050
d0adc28a38e43a787df4471f7f027413 lib/core/shell.py
5151
63491be462c515a1a3880c27c2acc4a2 lib/core/subprocessng.py
52-
505aaa61e1bba3c3d4567c3e667699e3 lib/core/target.py
52+
3cc852f927833895361973fbcfd156d2 lib/core/target.py
5353
72d499ca8d792e90a1ebfb2ad2341a51 lib/core/testing.py
5454
de9922a29c71a235cb95a916ff925db2 lib/core/threads.py
5555
c40758411bb0bd68764d78e0bb72bd0f lib/core/unescaper.py

0 commit comments

Comments
 (0)