| skipped 43 lines |
44 | 44 | | # Armory, btcrecover will just load the version that ships with Armory. |
45 | 45 | | |
46 | 46 | | |
| 47 | + | def full_version(): |
| 48 | + | from struct import calcsize |
| 49 | + | return "btcrecover {} on Python {} {}-bit, {}-bit unicodes, {}-bit ints".format( |
| 50 | + | __version__, |
| 51 | + | ".".join(str(i) for i in sys.version_info[:3]), |
| 52 | + | calcsize("P") * 8, |
| 53 | + | sys.maxunicode.bit_length(), |
| 54 | + | sys.maxint.bit_length() + 1 |
| 55 | + | ) |
| 56 | + | |
| 57 | + | |
47 | 58 | | # One of these two is typically called relatively early by parse_arguments() |
48 | 59 | | def enable_unicode_mode(): |
49 | 60 | | global io, tstr, tstr_from_stdin, tchr |
| skipped 2833 lines |
2883 | 2894 | | parser_common.add_argument("--listpass", action="store_true", help="just list all password combinations to test and exit") |
2884 | 2895 | | parser_common.add_argument("--performance", action="store_true", help="run a continuous performance test (Ctrl-C to exit)") |
2885 | 2896 | | parser_common.add_argument("--pause", action="store_true", help="pause before exiting") |
2886 | | - | parser_common.add_argument("--version","-v",action="version", version="%(prog)s " + __version__) |
| 2897 | + | parser_common.add_argument("--version","-v",action="store_true", help="show full version information and exit") |
2887 | 2898 | | bip39_group = parser_common.add_argument_group("BIP-39 passwords") |
2888 | 2899 | | bip39_group.add_argument("--bip39", action="store_true", help="search for a BIP-39 password instead of from a wallet") |
2889 | 2900 | | bip39_group.add_argument("--mpk", metavar="XPUB", help="the master public key") |
| skipped 115 lines |
3005 | 3016 | | elif args.help: |
3006 | 3017 | | parser.print_help() |
3007 | 3018 | | sys.exit(0) |
| 3019 | + | |
| 3020 | + | # Version information is always printed by btcrecover.py, so just exit |
| 3021 | + | if args.version: sys.exit(0) |
3008 | 3022 | | |
3009 | 3023 | | |
3010 | 3024 | | if args.performance and (base_iterator or args.passwordlist or args.tokenlist): |
| skipped 2581 lines |