This function calls a function that performs checks on both URL stability and all GET, POST, Cookie and User-Agent parameters to check if they are dynamic and SQL injection affected
()
| 266 | |
| 267 | @stackedmethod |
| 268 | def start(): |
| 269 | """ |
| 270 | This function calls a function that performs checks on both URL |
| 271 | stability and all GET, POST, Cookie and User-Agent parameters to |
| 272 | check if they are dynamic and SQL injection affected |
| 273 | """ |
| 274 | |
| 275 | if conf.hashFile: |
| 276 | crackHashFile(conf.hashFile) |
| 277 | |
| 278 | if conf.direct: |
| 279 | initTargetEnv() |
| 280 | setupTargetEnv() |
| 281 | action() |
| 282 | return True |
| 283 | |
| 284 | if conf.url and not any((conf.forms, conf.crawlDepth)): |
| 285 | kb.targets.add((conf.url, conf.method, conf.data, conf.cookie, None)) |
| 286 | |
| 287 | if conf.configFile and not kb.targets: |
| 288 | errMsg = "you did not edit the configuration file properly, set " |
| 289 | errMsg += "the target URL, list of targets or google dork" |
| 290 | logger.error(errMsg) |
| 291 | return False |
| 292 | |
| 293 | if kb.targets and isListLike(kb.targets) and len(kb.targets) > 1: |
| 294 | infoMsg = "found a total of %d targets" % len(kb.targets) |
| 295 | logger.info(infoMsg) |
| 296 | |
| 297 | targetCount = 0 |
| 298 | initialHeaders = list(conf.httpHeaders) |
| 299 | |
| 300 | for targetUrl, targetMethod, targetData, targetCookie, targetHeaders in kb.targets: |
| 301 | targetCount += 1 |
| 302 | |
| 303 | try: |
| 304 | if conf.checkInternet: |
| 305 | infoMsg = "checking for Internet connection" |
| 306 | logger.info(infoMsg) |
| 307 | |
| 308 | if not checkInternet(): |
| 309 | warnMsg = "[%s] [WARNING] no connection detected" % time.strftime("%X") |
| 310 | dataToStdout(warnMsg) |
| 311 | |
| 312 | valid = False |
| 313 | for _ in xrange(conf.retries): |
| 314 | if checkInternet(): |
| 315 | valid = True |
| 316 | break |
| 317 | else: |
| 318 | dataToStdout('.') |
| 319 | time.sleep(5) |
| 320 | |
| 321 | if not valid: |
| 322 | errMsg = "please check your Internet connection and rerun" |
| 323 | raise SqlmapConnectionException(errMsg) |
| 324 | else: |
| 325 | dataToStdout("\n") |
no test coverage detected
searching dependent graphs…