Skip to content

Commit

Permalink
Support the characters of the current locale.
Browse files Browse the repository at this point in the history
This allows specifying characters other than ASCII characters in the
'charset', 'prefix' and 'suffix' options.
For example, if you use a utf-8 locale, you can try to find a password
containing utf-8 characters.
  • Loading branch information
glv2 committed Jul 17, 2015
1 parent cdd1b1b commit 6a722bb
Show file tree
Hide file tree
Showing 7 changed files with 186 additions and 55 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2015-07-16 Guillaume LE VAILLANT <guillaume.le.vaillant@openmailbox.org>
Version 1.3
Support all the characters of the current locale (e.g. utf-8).

2015-07-06 Guillaume LE VAILLANT <guillaume.le.vaillant@openmailbox.org>
Version 1.2
Print progress info when sending a USR1 signal to the process.
Expand Down
3 changes: 3 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
Version 1.3
2015-07-16

Version 1.2
2015-07-06

Expand Down
39 changes: 30 additions & 9 deletions README
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
bruteforce-wallet
=================
# bruteforce-wallet

The purpose of this program is to try to find the password of an encrypted
Peercoin (or Bitcoin, Litecoin, etc...) wallet file (i.e.: wallet.dat).
Peercoin (or Bitcoin, Litecoin, etc...) wallet file (i.e. wallet.dat).

The program tries to decrypt one of the encrypted addresses in the wallet by
trying all the possible passwords.
The minimum and maximum password length to try can be indicated as option
on the command line.
The beginning and the end of the password can be specified too.
There are also options to indicate the character set and number of threads
to use.
trying all the possible passwords. It is especially useful if you know
something about the password (i.e. you forgot a part of your password but still
remember most of it). Finding the password of a wallet without knowing
anything about it would take way too much time (unless the password is really
short and/or weak).

There are command line options to specify:

- the minimum password length to try
- the maximum password length to try
- the beginning of the password
- the end of the password
- the character set to use (among the characters of the current locale)
- the number of threads to use

Sending a USR1 signal to a running bruteforce-wallet process makes it print
progress info to standard error and continue.
Expand All @@ -23,6 +30,8 @@ The program requires the OpenSSL and BerkeleyDB libraries.

## Limitations

The program currently only works on unix-like POSIX systems (e.g. GNU/Linux).

Different versions of BerkeleyDB are usually not compatible with each other.
Therefore, for the program to work, you will have to check that the BerkeleyDB
version you are using can read the databases created by the BerkeleyDB version
Expand All @@ -43,9 +52,21 @@ only passwords with 5 to 10 characters beginning with "W4l" and ending with "z":
bruteforce-wallet -t 8 -l 5 -m 10 -b "W4l" -e "z" wallet.dat


Try to find the password of an encrypted wallet file using 8 threads, trying
only passwords with 10 characters using the character set "P情8ŭ":

bruteforce-wallet -t 8 -l 10 -m 10 -s "P情8ŭ" wallet.dat


Print progress info:

pkill -USR1 -f bruteforce-wallet


## Donations

If you find this program useful and want to make a donation, you can send coins
to one of the following addresses:

- Peercoin: PWFNV1Cvq7nQBRyRueuYzwmDNXUGpgNkBC
- Bitcoin: 1F1ZfM7XtggHsShK4vwuy9zv98a9wt7nXx
7 changes: 4 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AC_INIT(bruteforce_wallet, 1.2)
AC_INIT(bruteforce_wallet, 1.3)
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR(src/bruteforce-wallet.c)

Expand All @@ -7,13 +7,14 @@ AC_PROG_CC
AC_PROG_INSTALL

dnl Check for standard headers
AC_CHECK_HEADERS([math.h signal.h stdio.h stdlib.h string.h unistd.h])
AC_CHECK_HEADERS([math.h locale.h signal.h stdio.h stdlib.h string.h unistd.h wchar.h])

dnl Check for functions
AC_CHECK_FUNCS([calloc malloc free])
AC_CHECK_FUNCS([perror printf fprintf])
AC_CHECK_FUNCS([atoi])
AC_CHECK_FUNCS([memcmp memset strlen strncpy])
AC_CHECK_FUNCS([memcmp memset])
AC_CHECK_FUNCS([setlocale mbstowcs wcsncpy wcstombs])
AC_CHECK_FUNCS([getopt])
AC_CHECK_FUNCS([signal])

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Copyright 2014-2015 Guillaume LE VAILLANT
# Distributed under the terms of the GNU General Public License v3

EAPI="5"

inherit eutils autotools

DESCRIPTION="A bruteforce cracker for Peercoin (and Bitcoin, Litecoin, etc...) encrypted wallet files."
HOMEPAGE="https://github.com/glv2/${PN}"
SRC_URI="https://github.com/glv2/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~arm ~x86"

DEPEND="
dev-libs/openssl
sys-libs/db
"
RDEPEND="${DEPEND}"

src_prepare() {
eautoreconf
}

src_configure() {
econf
}

src_install() {
dobin "${PN}"
dodoc AUTHORS ChangeLog COPYING NEWS README
}
Loading

0 comments on commit 6a722bb

Please sign in to comment.