Skip to content

Commit 43c6574

Browse files
committed
Fixing CI/CD errors
1 parent 57f8485 commit 43c6574

11 files changed

Lines changed: 72 additions & 15 deletions

File tree

.github/workflows/tests.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,12 @@ jobs:
111111
# 'binary' instead of 'text'. Keeping this step byte-compile-free leaves --smoke clean.
112112
run: python -B -m unittest discover -s tests -p "test_*.py"
113113

114+
- name: Esperanto self-test
115+
# offline, deterministic engine check against an in-memory SQLite boolean oracle: all
116+
# compare modes + identify + bytes/text + noisy-oracle quorum + integrity + strategy
117+
# handoff (a failed assertion exits non-zero)
118+
run: python extra/esperanto/run.py --self-test
119+
114120
- name: Coverage
115121
if: matrix.python-version != 'pypy-2.7'
116122
run: |

extra/esperanto/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,5 @@
2424
from .handler import buildHandler
2525
from .records import Cap, ExtractResult, BulkResult, Dialect, InferenceStrategy
2626
from .records import OracleUndecided, QueryBudgetExceeded
27+
28+
__all__ = ["Esperanto", "hostExtract", "buildHandler", "Cap", "ExtractResult", "BulkResult", "Dialect", "InferenceStrategy", "OracleUndecided", "QueryBudgetExceeded"]

extra/esperanto/atlas.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,12 +418,18 @@ def _isSingleUnicodeScalar(value):
418418
except NameError:
419419
_unichr = chr # py3
420420

421+
# py2/py3 shim: the py2 unicode text type (str on py3)
422+
try:
423+
_unicode = unicode # py2
424+
except NameError:
425+
_unicode = str # py3
426+
421427

422428
def _native(s):
423429
# embed a literal as the native str type: on py2 a unicode value is encoded to
424430
# utf-8 bytes so the byte-string SQL templates ('{expr}'.format(...)) don't force
425431
# an ascii encode of non-ASCII data; on py3 str is already unicode-clean.
426-
if str is bytes and isinstance(s, unicode): # py2 only (unicode unresolved on py3)
432+
if str is bytes and isinstance(s, _unicode): # py2 only
427433
return s.encode("utf-8")
428434
return s
429435

extra/esperanto/discovery.py

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,25 @@
55
See the file 'LICENSE' for copying permission
66
"""
77

8-
from .atlas import *
9-
from .records import *
8+
from .atlas import _BANNER_KEYWORDS
9+
from .atlas import _BANNERS
10+
from .atlas import _BINWRAP
11+
from .atlas import _BYTELEN
12+
from .atlas import _CATALOGS
13+
from .atlas import _CHARCODE
14+
from .atlas import _CHARFROM
15+
from .atlas import _COALESCE
16+
from .atlas import _CONCAT
17+
from .atlas import _DUAL
18+
from .atlas import _DUAL_IMPLIES
19+
from .atlas import _HEXFN
20+
from .atlas import _IDENTITY
21+
from .atlas import _LENGTH
22+
from .atlas import _PREFIX
23+
from .atlas import _SUBSTRING
24+
from .atlas import _TEXTCAST
25+
from .records import Cap
26+
from .records import OracleUndecided
1027

1128

1229
class _Discovery(object):

extra/esperanto/engine.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@
55
See the file 'LICENSE' for copying permission
66
"""
77

8-
from .atlas import *
9-
from .records import *
8+
from .atlas import _FREQ_ORDER
9+
from .atlas import _PRINTABLE_SORTED
10+
from .atlas import _REPL
11+
from .atlas import _unichr
12+
from .records import Dialect
1013
from .oracle import _OracleCore
1114
from .discovery import _Discovery
1215
from .extraction import _Extraction

extra/esperanto/enumeration.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,18 @@
55
See the file 'LICENSE' for copying permission
66
"""
77

8-
from .atlas import *
9-
from .records import *
8+
from .atlas import _BULK_AGG
9+
from .atlas import _COLUMN_SPECS
10+
from .atlas import _HEX_PAYLOAD_CODES
11+
from .atlas import _IDENT_QUOTE
12+
from .atlas import _KEY_SPECS
13+
from .atlas import _REPL
14+
from .atlas import _ROWID
15+
from .atlas import _ROWID_LITBOUND
16+
from .records import BulkResult
17+
from .records import Cap
18+
from .records import InferenceStrategy
19+
from .records import OracleUndecided
1020
from .wordlist import commonColumns
1121
from .wordlist import commonTables
1222

extra/esperanto/extraction.py

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,23 @@
55
See the file 'LICENSE' for copying permission
66
"""
77

8-
from .atlas import *
9-
from .records import *
8+
import binascii
9+
10+
from .atlas import _FREQ_ORDER
11+
from .atlas import _HEX_Q_ENCODINGS
12+
from .atlas import _HEXDIGITS
13+
from .atlas import _HEXFN
14+
from .atlas import _isSingleUnicodeScalar
15+
from .atlas import _MAX_HEX_CHAR_NIBBLES
16+
from .atlas import _native
17+
from .atlas import _PRINTABLE_SORTED
18+
from .atlas import _REPL
19+
from .atlas import _SIMILAR_META
20+
from .atlas import _UNICODE_MAX
21+
from .atlas import _unhexlify
22+
from .atlas import _unichr
23+
from .records import Cap
24+
from .records import ExtractResult
1025

1126

1227
class _Extraction(object):

extra/esperanto/oracle.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77

88
from contextlib import contextmanager
99

10-
from .atlas import *
11-
from .records import *
10+
from .records import OracleUndecided
11+
from .records import QueryBudgetExceeded
1212

1313

1414
class _OracleCore(object):

extra/esperanto/records.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
See the file 'LICENSE' for copying permission
66
"""
77

8-
from .atlas import *
9-
10-
118
class OracleUndecided(RuntimeError):
129
"""The oracle gave no reliable True/False after retries/voting - a transport or
1310
observation failure, NOT a definitive answer. Raised so blind extraction fails

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from thirdparty import six
2121

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

0 commit comments

Comments
 (0)