Minor update

This commit is contained in:
Miroslav Stampar 2019-03-27 03:05:53 +01:00
parent b5c82c4685
commit 2dbd0267a1
2 changed files with 4 additions and 6 deletions

View File

@ -32,11 +32,8 @@ import tempfile
import threading import threading
import time import time
import types import types
import urllib
import unicodedata import unicodedata
from ConfigParser import DEFAULTSECT
from ConfigParser import RawConfigParser
from difflib import SequenceMatcher from difflib import SequenceMatcher
from math import sqrt from math import sqrt
from optparse import OptionValueError from optparse import OptionValueError
@ -176,10 +173,11 @@ from thirdparty.clientform.clientform import ParseError
from thirdparty.colorama.initialise import init as coloramainit from thirdparty.colorama.initialise import init as coloramainit
from thirdparty.magic import magic from thirdparty.magic import magic
from thirdparty.odict import OrderedDict from thirdparty.odict import OrderedDict
from thirdparty.six.moves import configparser as _configparser
from thirdparty.six.moves import urllib as _urllib from thirdparty.six.moves import urllib as _urllib
from thirdparty.termcolor.termcolor import colored from thirdparty.termcolor.termcolor import colored
class UnicodeRawConfigParser(RawConfigParser): class UnicodeRawConfigParser(_configparser.RawConfigParser):
""" """
RawConfigParser with unicode writing support RawConfigParser with unicode writing support
""" """
@ -190,7 +188,7 @@ class UnicodeRawConfigParser(RawConfigParser):
""" """
if self._defaults: if self._defaults:
fp.write("[%s]\n" % DEFAULTSECT) fp.write("[%s]\n" % _configparser.DEFAULTSECT)
for (key, value) in self._defaults.items(): for (key, value) in self._defaults.items():
fp.write("%s = %s\n" % (key, getUnicode(value, UNICODE_ENCODING).replace('\n', '\n\t'))) fp.write("%s = %s\n" % (key, getUnicode(value, UNICODE_ENCODING).replace('\n', '\n\t')))

View File

@ -17,7 +17,7 @@ from lib.core.enums import DBMS_DIRECTORY_NAME
from lib.core.enums import OS from lib.core.enums import OS
# sqlmap version (<major>.<minor>.<month>.<monthly commit>) # sqlmap version (<major>.<minor>.<month>.<monthly commit>)
VERSION = "1.3.3.55" VERSION = "1.3.3.56"
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable" TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34} TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE) VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)