Skip to content

Commit 564c5a2

Browse files
committed
Removing --fuzz-test
1 parent cfa5042 commit 564c5a2

File tree

4 files changed

+2
-73
lines changed

4 files changed

+2
-73
lines changed

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.six import unichr as _unichr
2121

2222
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
23-
VERSION = "1.5.9.16"
23+
VERSION = "1.5.9.17"
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)

lib/core/testing.py

Lines changed: 0 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -166,71 +166,6 @@ def _thread():
166166

167167
return retVal
168168

169-
def fuzzTest():
170-
count = 0
171-
address, port = "127.0.0.10", random.randint(1025, 65535)
172-
173-
def _thread():
174-
vulnserver.init(quiet=True)
175-
vulnserver.run(address=address, port=port)
176-
177-
thread = threading.Thread(target=_thread)
178-
thread.daemon = True
179-
thread.start()
180-
181-
while True:
182-
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
183-
try:
184-
s.connect((address, port))
185-
break
186-
except:
187-
time.sleep(1)
188-
189-
handle, config = tempfile.mkstemp(suffix=".conf")
190-
os.close(handle)
191-
192-
url = "http://%s:%d/?id=1" % (address, port)
193-
194-
content = open(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "sqlmap.conf"))).read().replace("url =", "url = %s" % url)
195-
open(config, "w+").write(content)
196-
197-
while True:
198-
lines = content.split("\n")
199-
200-
for i in xrange(20):
201-
j = random.randint(0, len(lines) - 1)
202-
203-
if any(_ in lines[j] for _ in ("googleDork",)):
204-
continue
205-
206-
if re.search(r"= (True|False)", lines[j]):
207-
lines[j] = lines[j].replace(" = False", " = True")
208-
continue
209-
210-
if lines[j].strip().endswith('='):
211-
lines[j] += random.sample(("True", "False", randomStr(), str(randomInt())), 1)[0]
212-
213-
k = random.randint(0, len(lines) - 1)
214-
if '=' in lines[k] and not re.search(r"= (True|False)", lines[k]):
215-
lines[k] += chr(random.randint(0, 255))
216-
217-
open(config, "w+").write("\n".join(lines))
218-
219-
cmd = "%s %s -c %s --non-interactive --answers='Github=n' --flush-session --technique=%s --banner" % (sys.executable, os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "sqlmap.py")), config, random.sample("BEUQ", 1)[0])
220-
output = shellExec(cmd)
221-
222-
if "Traceback" in output:
223-
dataToStdout("---\n\n$ %s\n" % cmd)
224-
dataToStdout("%s---\n" % output, coloring=False)
225-
226-
handle, config = tempfile.mkstemp(prefix="sqlmapcrash", suffix=".conf")
227-
os.close(handle)
228-
open(config, "w+").write("\n".join(lines))
229-
else:
230-
dataToStdout("\r%d\r" % count)
231-
232-
count += 1
233-
234169
def smokeTest():
235170
"""
236171
Runs the basic smoke testing of a program

lib/parse/cmdline.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -824,9 +824,6 @@ def cmdLineParser(argv=None):
824824
parser.add_argument("--vuln-test", dest="vulnTest", action="store_true",
825825
help=SUPPRESS)
826826

827-
parser.add_argument("--fuzz-test", dest="fuzzTest", action="store_true",
828-
help=SUPPRESS)
829-
830827
# API options
831828
parser.add_argument("--api", dest="api", action="store_true",
832829
help=SUPPRESS)
@@ -1065,7 +1062,7 @@ def _format_action_invocation(self, action):
10651062
else:
10661063
args.stdinPipe = None
10671064

1068-
if not any((args.direct, args.url, args.logFile, args.bulkFile, args.googleDork, args.configFile, args.requestFile, args.updateAll, args.smokeTest, args.vulnTest, args.fuzzTest, args.wizard, args.dependencies, args.purge, args.listTampers, args.hashFile, args.stdinPipe)):
1065+
if not any((args.direct, args.url, args.logFile, args.bulkFile, args.googleDork, args.configFile, args.requestFile, args.updateAll, args.smokeTest, args.vulnTest, args.wizard, args.dependencies, args.purge, args.listTampers, args.hashFile, args.stdinPipe)):
10691066
errMsg = "missing a mandatory option (-d, -u, -l, -m, -r, -g, -c, --wizard, --shell, --update, --purge, --list-tampers or --dependencies). "
10701067
errMsg += "Use -h for basic and -hh for advanced help\n"
10711068
parser.error(errMsg)

sqlmap.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,6 @@ def main():
175175
elif conf.vulnTest:
176176
from lib.core.testing import vulnTest
177177
os._exitcode = 1 - (vulnTest() or 0)
178-
elif conf.fuzzTest:
179-
from lib.core.testing import fuzzTest
180-
fuzzTest()
181178
else:
182179
from lib.controller.controller import start
183180
if conf.profile:

0 commit comments

Comments
 (0)