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

Function _saveToHashDB

lib/controller/controller.py:215–237  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

213 return retVal
214
215def _saveToHashDB():
216 injections = hashDBRetrieve(HASHDB_KEYS.KB_INJECTIONS, True)
217 if not isListLike(injections):
218 injections = []
219 injections.extend(_ for _ in kb.injections if _ and _.place is not None and _.parameter is not None)
220
221 _ = dict()
222 for injection in injections:
223 key = (injection.place, injection.parameter, injection.ptype)
224 if key not in _:
225 _[key] = injection
226 else:
227 _[key].data.update(injection.data)
228 hashDBWrite(HASHDB_KEYS.KB_INJECTIONS, list(_.values()), True)
229
230 _ = hashDBRetrieve(HASHDB_KEYS.KB_ABS_FILE_PATHS, True)
231 hashDBWrite(HASHDB_KEYS.KB_ABS_FILE_PATHS, kb.absFilePaths | (_ if isinstance(_, set) else set()), True)
232
233 if not hashDBRetrieve(HASHDB_KEYS.KB_CHARS):
234 hashDBWrite(HASHDB_KEYS.KB_CHARS, kb.chars, True)
235
236 if not hashDBRetrieve(HASHDB_KEYS.KB_DYNAMIC_MARKINGS):
237 hashDBWrite(HASHDB_KEYS.KB_DYNAMIC_MARKINGS, kb.dynamicMarkings, True)
238
239def _saveToResultsFile():
240 if not conf.resultsFP:

Callers 1

startFunction · 0.85

Calls 6

hashDBRetrieveFunction · 0.90
isListLikeFunction · 0.90
hashDBWriteFunction · 0.90
extendMethod · 0.80
valuesMethod · 0.80
updateMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…