Some more drei stuff

This commit is contained in:
Miroslav Stampar 2019-03-28 15:14:16 +01:00
parent 49586ad6dd
commit 4b020c4257
81 changed files with 125 additions and 167 deletions

View file

@ -105,6 +105,7 @@ from lib.request.inject import checkBooleanExpression
from lib.request.templates import getPageTemplate
from lib.techniques.union.test import unionTest
from lib.techniques.union.use import configUnion
from lib.utils.xrange import xrange
from thirdparty import six
from thirdparty.six.moves import http_client as _http_client

View file

@ -72,6 +72,7 @@ from lib.core.settings import USER_AGENT_ALIASES
from lib.core.target import initTargetEnv
from lib.core.target import setupTargetEnv
from lib.utils.hash import crackHashFile
from lib.utils.xrange import xrange
def _selectInjection():
"""

View file

@ -46,6 +46,7 @@ from lib.core.settings import REPLACEMENT_MARKER
from lib.core.settings import SINGLE_QUOTE_MARKER
from lib.core.settings import SLEEP_TIME_MARKER
from lib.core.unescaper import unescaper
from lib.utils.xrange import xrange
class Agent(object):
"""

View file

@ -20,6 +20,7 @@ from lib.core.enums import MKSTEMP_PREFIX
from lib.core.exception import SqlmapSystemException
from lib.core.settings import BIGARRAY_CHUNK_SIZE
from lib.core.settings import BIGARRAY_COMPRESS_LEVEL
from lib.utils.xrange import xrange
DEFAULT_SIZE_OF = sys.getsizeof(object())

View file

@ -167,6 +167,7 @@ from lib.core.settings import VERSION_STRING
from lib.core.settings import WEBSCARAB_SPLITTER
from lib.core.threads import getCurrentThreadData
from lib.utils.sqlalchemy import _sqlalchemy
from lib.utils.xrange import xrange
from thirdparty import six
from thirdparty.clientform.clientform import ParseResponse
from thirdparty.clientform.clientform import ParseError

View file

@ -50,6 +50,7 @@ from lib.core.settings import UNICODE_ENCODING
from lib.core.settings import UNSAFE_DUMP_FILEPATH_REPLACEMENT
from lib.core.settings import VERSION_STRING
from lib.core.settings import WINDOWS_RESERVED_NAMES
from lib.utils.xrange import xrange
from thirdparty import six
from thirdparty.magic import magic

View file

@ -147,6 +147,7 @@ from lib.utils.crawler import crawl
from lib.utils.deps import checkDependencies
from lib.utils.search import search
from lib.utils.purge import purge
from lib.utils.xrange import xrange
from thirdparty import six
from thirdparty.keepalive import keepalive
from thirdparty.multipart import multipartpost

View file

@ -17,7 +17,7 @@ from lib.core.enums import DBMS_DIRECTORY_NAME
from lib.core.enums import OS
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
VERSION = "1.3.3.70"
VERSION = "1.3.3.71"
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
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)

View file

@ -72,6 +72,7 @@ from lib.core.settings import URI_INJECTABLE_REGEX
from lib.core.settings import USER_AGENT_ALIASES
from lib.core.settings import XML_RECOGNITION_REGEX
from lib.utils.hashdb import HashDB
from lib.utils.xrange import xrange
from thirdparty.odict import OrderedDict
from thirdparty.six.moves import urllib as _urllib

View file

@ -25,6 +25,7 @@ from lib.core.exception import SqlmapUserQuitException
from lib.core.exception import SqlmapValueException
from lib.core.settings import MAX_NUMBER_OF_THREADS
from lib.core.settings import PYVERSION
from lib.utils.xrange import xrange
shared = AttribDict()

View file

@ -39,6 +39,7 @@ from lib.core.shell import autoCompletion
from lib.core.shell import clearHistory
from lib.core.shell import loadHistory
from lib.core.shell import saveHistory
from lib.utils.xrange import xrange
def cmdLineParser(argv=None):
"""

View file

@ -16,6 +16,7 @@ from lib.core.data import paths
from lib.core.datatype import AttribDict
from lib.core.exception import SqlmapInstallationException
from lib.core.settings import PAYLOAD_XML_FILES
from lib.utils.xrange import xrange
def cleanupVals(text, tag):
if tag == "clause" and '-' in text:

View file

@ -118,6 +118,7 @@ from lib.request.basic import processResponse
from lib.request.direct import direct
from lib.request.comparison import comparison
from lib.request.methodrequest import MethodRequest
from lib.utils.xrange import xrange
from thirdparty import six
from thirdparty.odict import OrderedDict
from thirdparty.six.moves import http_client as _http_client

View file

@ -59,6 +59,7 @@ from lib.techniques.dns.test import dnsTest
from lib.techniques.dns.use import dnsUse
from lib.techniques.error.use import errorUse
from lib.techniques.union.use import unionUse
from lib.utils.xrange import xrange
from thirdparty import six
def _goDns(payload, expression):

View file

@ -27,6 +27,7 @@ from lib.core.exception import SqlmapUnsupportedFeatureException
from lib.core.exception import SqlmapUserQuitException
from lib.core.unescaper import unescaper
from lib.request import inject
from lib.utils.xrange import xrange
class UDF:
"""

View file

@ -51,6 +51,7 @@ from lib.core.settings import SHELL_RUNCMD_EXE_TAG
from lib.core.settings import SHELL_WRITABLE_DIR_TAG
from lib.core.settings import VIEWSTATE_REGEX
from lib.request.connect import Connect as Request
from lib.utils.xrange import xrange
from thirdparty.six.moves import urllib as _urllib
class Web:

View file

@ -32,6 +32,7 @@ from lib.core.enums import HASHDB_KEYS
from lib.core.enums import PAYLOAD
from lib.core.exception import SqlmapUnsupportedFeatureException
from lib.core.threads import getCurrentThreadData
from lib.utils.xrange import xrange
from lib.request import inject
class XP_cmdshell:

View file

@ -32,6 +32,7 @@ from lib.core.settings import MAX_DNS_LABEL
from lib.core.settings import PARTIAL_VALUE_MARKER
from lib.core.unescaper import unescaper
from lib.request.connect import Connect as Request
from lib.utils.xrange import xrange
def dnsUse(payload, expression):
"""

View file

@ -57,6 +57,7 @@ from lib.core.threads import runThreads
from lib.core.unescaper import unescaper
from lib.request.connect import Connect as Request
from lib.utils.progress import ProgressBar
from lib.utils.xrange import xrange
from thirdparty import six
def _oneShotErrorUse(expression, field=None, chunkTest=False):

View file

@ -42,6 +42,7 @@ from lib.core.settings import ORDER_BY_STEP
from lib.core.unescaper import unescaper
from lib.request.comparison import comparison
from lib.request.connect import Connect as Request
from lib.utils.xrange import xrange
def _findUnionCharCount(comment, place, parameter, value, prefix, suffix, where=PAYLOAD.WHERE.ORIGINAL):
"""

View file

@ -59,6 +59,7 @@ from lib.core.threads import runThreads
from lib.core.unescaper import unescaper
from lib.request.connect import Connect as Request
from lib.utils.progress import ProgressBar
from lib.utils.xrange import xrange
from thirdparty import six
from thirdparty.odict import OrderedDict

View file

@ -47,6 +47,7 @@ from lib.core.settings import RESTAPI_DEFAULT_PORT
from lib.core.shell import autoCompletion
from lib.core.subprocessng import Popen
from lib.parse.cmdline import cmdLineParser
from lib.utils.xrange import xrange
from thirdparty.bottle.bottle import error as return_error
from thirdparty.bottle.bottle import get
from thirdparty.bottle.bottle import hook

View file

@ -31,6 +31,7 @@ from lib.core.threads import getCurrentThreadData
from lib.core.threads import runThreads
from lib.parse.sitemap import parseSitemap
from lib.request.connect import Connect as Request
from lib.utils.xrange import xrange
from thirdparty.beautifulsoup.beautifulsoup import BeautifulSoup
from thirdparty.six.moves import http_client as _http_client
from thirdparty.six.moves import urllib as _urllib

View file

@ -86,6 +86,7 @@ from lib.core.settings import NULL
from lib.core.settings import UNICODE_ENCODING
from lib.core.settings import ROTATING_CHARS
from lib.core.wordlist import Wordlist
from lib.utils.xrange import xrange
from thirdparty import six
from thirdparty.colorama.initialise import init as coloramainit
from thirdparty.pydes.pyDes import des

View file

@ -25,6 +25,7 @@ from lib.core.settings import HASHDB_RETRIEVE_RETRIES
from lib.core.settings import UNICODE_ENCODING
from lib.core.threads import getCurrentThreadData
from lib.core.threads import getCurrentThreadName
from lib.utils.xrange import xrange
class HashDB(object):
def __init__(self, filepath):

View file

@ -31,6 +31,7 @@ from lib.core.settings import MAX_INT
from lib.core.settings import NULL
from lib.core.unescaper import unescaper
from lib.request import inject
from lib.utils.xrange import xrange
def pivotDumpTable(table, colList, count=None, blind=True, alias=None):
lengths = {}

View file

@ -13,6 +13,7 @@ import string
from lib.core.common import getSafeExString
from lib.core.data import logger
from lib.utils.xrange import xrange
def purge(directory):
"""

View file

@ -1,10 +1,12 @@
#!/usr/bin/env python2
#!/usr/bin/env python
"""
Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
See the file 'LICENSE' for copying permission
"""
import numbers
class xrange(object):
"""
Advanced (re)implementation of xrange (supports slice/copy/etc.)
@ -68,7 +70,7 @@ class xrange(object):
start, stop, step = index.indices(self._len())
return xrange(self._index(start),
self._index(stop), step * self.step)
elif isinstance(index, (int, long)):
elif isinstance(index, numbers.Integral):
if index < 0:
fixed_index = index + self._len()
else: