| 365 | kb.data.onlyGETs = None |
| 366 | |
| 367 | def retrieve(): |
| 368 | links = search(conf.googleDork) |
| 369 | |
| 370 | if not links: |
| 371 | errMsg = "unable to find results for your " |
| 372 | errMsg += "search dork expression" |
| 373 | raise SqlmapGenericException(errMsg) |
| 374 | |
| 375 | for link in links: |
| 376 | link = urldecode(link) |
| 377 | if re.search(r"(.*?)\?(.+)", link) or conf.forms: |
| 378 | kb.targets.add((link, conf.method, conf.data, conf.cookie, None)) |
| 379 | elif re.search(URI_INJECTABLE_REGEX, link, re.I): |
| 380 | if kb.data.onlyGETs is None and conf.data is None and not conf.googleDork: |
| 381 | message = "do you want to scan only results containing GET parameters? [Y/n] " |
| 382 | kb.data.onlyGETs = readInput(message, default='Y', boolean=True) |
| 383 | if not kb.data.onlyGETs or conf.googleDork: |
| 384 | kb.targets.add((link, conf.method, conf.data, conf.cookie, None)) |
| 385 | |
| 386 | return links |
| 387 | |
| 388 | while True: |
| 389 | links = retrieve() |