|
42 | 42 | from lib.core.exception import sqlmapUserQuitException |
43 | 43 | from lib.core.settings import COMMON_PASSWORD_SUFFIXES |
44 | 44 | from lib.core.settings import DUMMY_USER_PREFIX |
| 45 | +from lib.core.settings import HASH_MOD_ITEM_DISPLAY |
45 | 46 | from lib.core.settings import IS_WIN |
46 | 47 | from lib.core.settings import LIST_EMAIL |
47 | 48 | from lib.core.settings import UNICODE_ENCODING |
@@ -422,11 +423,12 @@ def dictionaryAttack(attack_dict): |
422 | 423 |
|
423 | 424 | attack_info.remove(item) |
424 | 425 |
|
425 | | - elif count % 1117 == 0 or count == length or hash_regex in (HASH.ORACLE_OLD) or hash_regex == HASH.CRYPT_GENERIC and IS_WIN: |
| 426 | + elif count % HASH_MOD_ITEM_DISPLAY == 0 or count == length or hash_regex in (HASH.ORACLE_OLD) or hash_regex == HASH.CRYPT_GENERIC and IS_WIN: |
426 | 427 | status = '%d/%d words (%d%s)' % (count, length, round(100.0*count/length), '%') |
427 | 428 | dataToStdout("\r[%s] [INFO] %s" % (time.strftime("%X"), status)) |
428 | 429 |
|
429 | 430 | except KeyboardInterrupt: |
| 431 | + print |
430 | 432 | warnMsg = "Ctrl+C detected in dictionary attack phase" |
431 | 433 | logger.warn(warnMsg) |
432 | 434 | return results |
@@ -472,13 +474,14 @@ def dictionaryAttack(attack_dict): |
472 | 474 |
|
473 | 475 | found = True |
474 | 476 | break |
475 | | - elif count % 1117 == 0 or count == length or hash_regex in (HASH.ORACLE_OLD) or hash_regex == HASH.CRYPT_GENERIC and IS_WIN: |
| 477 | + elif count % HASH_MOD_ITEM_DISPLAY == 0 or count == length or hash_regex in (HASH.ORACLE_OLD) or hash_regex == HASH.CRYPT_GENERIC and IS_WIN: |
476 | 478 | status = '%d/%d words (%d%s)' % (count, length, round(100.0*count/length), '%') |
477 | 479 | if not user.startswith(DUMMY_USER_PREFIX): |
478 | 480 | status += ' (user: %s)' % user |
479 | 481 | dataToStdout("\r[%s] [INFO] %s" % (time.strftime("%X"), status)) |
480 | 482 |
|
481 | 483 | except KeyboardInterrupt: |
| 484 | + print |
482 | 485 | warnMsg = "Ctrl+C detected in dictionary attack phase" |
483 | 486 | logger.warn(warnMsg) |
484 | 487 | return results |
|
0 commit comments