MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / execute

Method execute

lib/utils/api.py:105–122  ·  view source on GitHub ↗
(self, statement, arguments=None)

Source from the content-addressed store, hash-verified

103 self.connection.commit()
104
105 def execute(self, statement, arguments=None):
106 with self.lock:
107 while True:
108 try:
109 if arguments:
110 self.cursor.execute(statement, arguments)
111 else:
112 self.cursor.execute(statement)
113 except sqlite3.OperationalError as ex:
114 if "locked" not in getSafeExString(ex):
115 raise
116 else:
117 time.sleep(1)
118 else:
119 break
120
121 if statement.lstrip().upper().startswith("SELECT"):
122 return self.cursor.fetchall()
123
124 def init(self):
125 self.execute("CREATE TABLE IF NOT EXISTS logs(id INTEGER PRIMARY KEY AUTOINCREMENT, taskid INTEGER, time TEXT, level TEXT, message TEXT)")

Callers 12

initMethod · 0.95
do_REQUESTMethod · 0.45
writeMethod · 0.45
emitMethod · 0.45
scan_dataFunction · 0.45
scan_log_limitedFunction · 0.45
scan_logFunction · 0.45
_get_cursorMethod · 0.45
retrieveMethod · 0.45
flushMethod · 0.45
beginTransactionMethod · 0.45
endTransactionMethod · 0.45

Calls 2

getSafeExStringFunction · 0.90
fetchallMethod · 0.45

Tested by

no test coverage detected