Skip to content

Commit 4b020c4

Browse files
committed
Some more drei stuff
1 parent 49586ad commit 4b020c4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+125
-167
lines changed

extra/cloak/cloak.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
from optparse import OptionError
1717
from optparse import OptionParser
1818

19+
if sys.version_info.major > 2:
20+
xrange = range
21+
1922
def hideAscii(data):
2023
retVal = ""
2124
for i in xrange(len(data)):

extra/safe2bin/safe2bin.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
from optparse import OptionError
1919
from optparse import OptionParser
2020

21+
if sys.version_info.major > 2:
22+
xrange = range
23+
2124
# Regex used for recognition of hex encoded characters
2225
HEX_ENCODED_CHAR_REGEX = r"(?P<result>\\x[0-9A-Fa-f]{2})"
2326

extra/shutils/duplicates.py

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,22 @@
99

1010
import sys
1111

12-
if len(sys.argv) > 0:
13-
items = list()
12+
if __name__ == "__main__":
13+
if len(sys.argv) > 0:
14+
items = list()
1415

15-
with open(sys.argv[1], 'r') as f:
16-
for item in f.readlines():
17-
item = item.strip()
18-
try:
19-
str.encode(item)
20-
if item in items:
21-
if item:
22-
print(item)
23-
else:
24-
items.append(item)
25-
except:
26-
pass
16+
with open(sys.argv[1], 'r') as f:
17+
for item in f.readlines():
18+
item = item.strip()
19+
try:
20+
str.encode(item)
21+
if item in items:
22+
if item:
23+
print(item)
24+
else:
25+
items.append(item)
26+
except:
27+
pass
2728

28-
with open(sys.argv[1], 'w+') as f:
29-
f.writelines("\n".join(items))
29+
with open(sys.argv[1], 'w+') as f:
30+
f.writelines("\n".join(items))

extra/wafdetectify/__init__.py

Lines changed: 0 additions & 8 deletions
This file was deleted.

extra/wafdetectify/wafdetectify.py

Lines changed: 0 additions & 134 deletions
This file was deleted.

lib/controller/checks.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@
105105
from lib.request.templates import getPageTemplate
106106
from lib.techniques.union.test import unionTest
107107
from lib.techniques.union.use import configUnion
108+
from lib.utils.xrange import xrange
108109
from thirdparty import six
109110
from thirdparty.six.moves import http_client as _http_client
110111

lib/controller/controller.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
from lib.core.target import initTargetEnv
7373
from lib.core.target import setupTargetEnv
7474
from lib.utils.hash import crackHashFile
75+
from lib.utils.xrange import xrange
7576

7677
def _selectInjection():
7778
"""

lib/core/agent.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
from lib.core.settings import SINGLE_QUOTE_MARKER
4747
from lib.core.settings import SLEEP_TIME_MARKER
4848
from lib.core.unescaper import unescaper
49+
from lib.utils.xrange import xrange
4950

5051
class Agent(object):
5152
"""

lib/core/bigarray.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
from lib.core.exception import SqlmapSystemException
2121
from lib.core.settings import BIGARRAY_CHUNK_SIZE
2222
from lib.core.settings import BIGARRAY_COMPRESS_LEVEL
23+
from lib.utils.xrange import xrange
2324

2425
DEFAULT_SIZE_OF = sys.getsizeof(object())
2526

lib/core/common.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@
167167
from lib.core.settings import WEBSCARAB_SPLITTER
168168
from lib.core.threads import getCurrentThreadData
169169
from lib.utils.sqlalchemy import _sqlalchemy
170+
from lib.utils.xrange import xrange
170171
from thirdparty import six
171172
from thirdparty.clientform.clientform import ParseResponse
172173
from thirdparty.clientform.clientform import ParseError

0 commit comments

Comments
 (0)