mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-06 12:41:30 +00:00
Some more PEPing (I hope that I haven't broke anything)
This commit is contained in:
@@ -94,7 +94,7 @@ class Database(object):
|
||||
else:
|
||||
self.cursor.execute(statement)
|
||||
except sqlite3.OperationalError, ex:
|
||||
if not "locked" in getSafeExString(ex):
|
||||
if "locked" not in getSafeExString(ex):
|
||||
raise
|
||||
else:
|
||||
break
|
||||
@@ -103,22 +103,11 @@ class Database(object):
|
||||
return self.cursor.fetchall()
|
||||
|
||||
def init(self):
|
||||
self.execute("CREATE TABLE logs("
|
||||
"id INTEGER PRIMARY KEY AUTOINCREMENT, "
|
||||
"taskid INTEGER, time TEXT, "
|
||||
"level TEXT, message TEXT"
|
||||
")")
|
||||
self.execute("CREATE TABLE logs(id INTEGER PRIMARY KEY AUTOINCREMENT, taskid INTEGER, time TEXT, level TEXT, message TEXT)")
|
||||
|
||||
self.execute("CREATE TABLE data("
|
||||
"id INTEGER PRIMARY KEY AUTOINCREMENT, "
|
||||
"taskid INTEGER, status INTEGER, "
|
||||
"content_type INTEGER, value TEXT"
|
||||
")")
|
||||
self.execute("CREATE TABLE data(id INTEGER PRIMARY KEY AUTOINCREMENT, taskid INTEGER, status INTEGER, content_type INTEGER, value TEXT)")
|
||||
|
||||
self.execute("CREATE TABLE errors("
|
||||
"id INTEGER PRIMARY KEY AUTOINCREMENT, "
|
||||
"taskid INTEGER, error TEXT"
|
||||
")")
|
||||
self.execute("CREATE TABLE errors(id INTEGER PRIMARY KEY AUTOINCREMENT, taskid INTEGER, error TEXT)")
|
||||
|
||||
class Task(object):
|
||||
def __init__(self, taskid, remote_addr):
|
||||
@@ -860,7 +849,7 @@ def client(host=RESTAPI_DEFAULT_ADDRESS, port=RESTAPI_DEFAULT_PORT, username=Non
|
||||
return
|
||||
|
||||
elif command in ("help", "?"):
|
||||
msg = "help Show this help message\n"
|
||||
msg = "help Show this help message\n"
|
||||
msg += "new ARGS Start a new scan task with provided arguments (e.g. 'new -u \"http://testphp.vulnweb.com/artists.php?artist=1\"')\n"
|
||||
msg += "use TASKID Switch current context to different task (e.g. 'use c04d8c5c7582efb4')\n"
|
||||
msg += "data Retrieve and show data for current task\n"
|
||||
|
||||
Reference in New Issue
Block a user