Retrieve the output of a boolean based SQL query
(expression)
| 310 | return ", ".join(output or "" for output in outputs) if not isNoneValue(outputs) else None |
| 311 | |
| 312 | def _goBooleanProxy(expression): |
| 313 | """ |
| 314 | Retrieve the output of a boolean based SQL query |
| 315 | """ |
| 316 | |
| 317 | initTechnique(getTechnique()) |
| 318 | |
| 319 | if conf.dnsDomain: |
| 320 | query = agent.prefixQuery(getTechniqueData().vector) |
| 321 | query = agent.suffixQuery(query) |
| 322 | payload = agent.payload(newValue=query) |
| 323 | output = _goDns(payload, expression) |
| 324 | |
| 325 | if output is not None: |
| 326 | return output |
| 327 | |
| 328 | vector = getTechniqueData().vector |
| 329 | vector = vector.replace(INFERENCE_MARKER, expression) |
| 330 | query = agent.prefixQuery(vector) |
| 331 | query = agent.suffixQuery(query) |
| 332 | payload = agent.payload(newValue=query) |
| 333 | |
| 334 | timeBasedCompare = getTechnique() in (PAYLOAD.TECHNIQUE.TIME, PAYLOAD.TECHNIQUE.STACKED) |
| 335 | |
| 336 | output = hashDBRetrieve(expression, checkConf=True) |
| 337 | |
| 338 | if output is None: |
| 339 | output = Request.queryPage(payload, timeBasedCompare=timeBasedCompare, raise404=False) |
| 340 | |
| 341 | if output is not None: |
| 342 | hashDBWrite(expression, output) |
| 343 | |
| 344 | return output |
| 345 | |
| 346 | def _goUnion(expression, unpack=True, dump=False): |
| 347 | """ |
no test coverage detected
searching dependent graphs…