vlnahp / Btcbf

Bitcoin private key brute force tool, written in python. Also can be used as a bitcoin wallet generator.
GNU Affero General Public License v3.0
313 stars 130 forks source link

I got an error #16

Closed Ango87 closed 2 years ago

Ango87 commented 2 years ago

blink@localhost:/storage/emulated/0/Download/Btcbf-main$ ls Btcbf.py _config.yml foundkey.txt README.md address.txt requirements.txt blink@localhost:/storage/emulated/0/Download/Btcbf-main$ python3 Btcbf.py Traceback (most recent call last): File "/sdcard/Download/Btcbf-main/Btcbf.py", line 3, in from bit.crypto import ECPrivateKey ImportError: cannot import name 'ECPrivateKey' from 'bit.crypto' (/home/blink/.local/lib/python3.9/site-packages/bit/crypto.py) blink@localhost:/storage/emulated/0/Download/Btcbf-main$ python2 Btcbf.py Traceback (most recent call last): File "Btcbf.py", line 3, in from bit.crypto import ECPrivateKey ImportError: No module named bit.crypto

I got the same error even after changing from Python 3 to Python 2

meesvw commented 2 years ago

Did you install the requirements ?

Ango87 commented 2 years ago

@meesvw cd /storage/emulated/0/Download/Btcbf-main blink@localhost:/storage/emulated/0/Download/Btcbf-main$ ls Btcbf.py _config.yml requirements.txt README.md address.txt blink@localhost:/storage/emulated/0/Download/Btcbf-main$ pip install -r requirements.txt DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality. Collecting bit Using cached bit-0.8.0.tar.gz (62 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing wheel metadata ... done Collecting tqdm Using cached tqdm-4.62.3-py2.py3-none-any.whl (76 kB) Requirement already satisfied: requests in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 3)) (2.26.0) Collecting coincurve>=4.3.0 Using cached coincurve-14.0.0.tar.gz (192 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... error ERROR: Command errored out with exit status 1: command: /usr/bin/python2 /usr/local/lib/python2.7/dist-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-y_aEE9/normal --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'cffi>=1.3.0' requests cwd: None Complete output (107 lines): DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality. Collecting cffi>=1.3.0 Using cached cffi-1.15.0.tar.gz (484 kB) Collecting requests Using cached requests-2.27.1-py2.py3-none-any.whl (63 kB) Collecting pycparser Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB) Collecting chardet<5,>=3.0.2; python_version < "3" Using cached chardet-4.0.0-py2.py3-none-any.whl (178 kB) Collecting certifi>=2017.4.17 Using cached certifi-2021.10.8-py2.py3-none-any.whl (149 kB) Collecting idna<3,>=2.5; python_version < "3" Using cached idna-2.10-py2.py3-none-any.whl (58 kB) Collecting urllib3<1.27,>=1.21.1 Downloading urllib3-1.26.8-py2.py3-none-any.whl (138 kB) Building wheels for collected packages: cffi Building wheel for cffi (setup.py): started Building wheel for cffi (setup.py): finished with status 'error' ERROR: Command errored out with exit status 1: command: /usr/bin/python2 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-8rHWGc/cffi/setup.py'"'"'; file='"'"'/tmp/pip-install-8rHWGc/cffi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-X7FUMZ cwd: /tmp/pip-install-8rHWGc/cffi/ Complete output (36 lines): running bdist_wheel running build running build_py creating build creating build/lib.linux-armv8l-2.7 creating build/lib.linux-armv8l-2.7/cffi copying cffi/init.py -> build/lib.linux-armv8l-2.7/cffi copying cffi/api.py -> build/lib.linux-armv8l-2.7/cffi copying cffi/backend_ctypes.py -> build/lib.linux-armv8l-2.7/cffi copying cffi/cffi_opcode.py -> build/lib.linux-armv8l-2.7/cffi copying cffi/commontypes.py -> build/lib.linux-armv8l-2.7/cffi copying cffi/cparser.py -> build/lib.linux-armv8l-2.7/cffi copying cffi/error.py -> build/lib.linux-armv8l-2.7/cffi copying cffi/ffiplatform.py -> build/lib.linux-armv8l-2.7/cffi copying cffi/lock.py -> build/lib.linux-armv8l-2.7/cffi copying cffi/model.py -> build/lib.linux-armv8l-2.7/cffi copying cffi/pkgconfig.py -> build/lib.linux-armv8l-2.7/cffi copying cffi/recompiler.py -> build/lib.linux-armv8l-2.7/cffi copying cffi/setuptools_ext.py -> build/lib.linux-armv8l-2.7/cffi copying cffi/vengine_cpy.py -> build/lib.linux-armv8l-2.7/cffi copying cffi/vengine_gen.py -> build/lib.linux-armv8l-2.7/cffi copying cffi/verifier.py -> build/lib.linux-armv8l-2.7/cffi copying cffi/_cffi_include.h -> build/lib.linux-armv8l-2.7/cffi copying cffi/parse_c_type.h -> build/lib.linux-armv8l-2.7/cffi copying cffi/_embedding.h -> build/lib.linux-armv8l-2.7/cffi copying cffi/_cffi_errors.h -> build/lib.linux-armv8l-2.7/cffi running build_ext building '_cffi_backend' extension creating build/temp.linux-armv8l-2.7 creating build/temp.linux-armv8l-2.7/c arm-linux-gnueabihf-gcc -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -ffile-prefix-map=/build/python2.7-zkaHIM/python2.7-2.7.18=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include/ffi -I/usr/include/libffi -I/usr/include/python2.7 -c c/_cffi_backend.c -o build/temp.linux-armv8l-2.7/c/_cffi_backend.o c/_cffi_backend.c:15:10: fatal error: ffi.h: No such file or directory 15 | #include | ^~~ compilation terminated. error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1

ERROR: Failed building wheel for cffi
Running setup.py clean for cffi

Failed to build cffi Installing collected packages: pycparser, cffi, chardet, certifi, idna, urllib3, requests Running setup.py install for cffi: started Running setup.py install for cffi: finished with status 'error' ERROR: Command errored out with exit status 1: command: /usr/bin/python2 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-8rHWGc/cffi/setup.py'"'"'; file='"'"'/tmp/pip-install-8rHWGc/cffi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-V0hi1C/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-y_aEE9/normal --compile --install-headers /tmp/pip-build-env-y_aEE9/normal/include/python2.7/cffi cwd: /tmp/pip-install-8rHWGc/cffi/ Complete output (36 lines): running install running build running build_py creating build creating build/lib.linux-armv8l-2.7 creating build/lib.linux-armv8l-2.7/cffi copying cffi/init.py -> build/lib.linux-armv8l-2.7/cffi copying cffi/api.py -> build/lib.linux-armv8l-2.7/cffi copying cffi/backend_ctypes.py -> build/lib.linux-armv8l-2.7/cffi copying cffi/cffi_opcode.py -> build/lib.linux-armv8l-2.7/cffi copying cffi/commontypes.py -> build/lib.linux-armv8l-2.7/cffi copying cffi/cparser.py -> build/lib.linux-armv8l-2.7/cffi copying cffi/error.py -> build/lib.linux-armv8l-2.7/cffi copying cffi/ffiplatform.py -> build/lib.linux-armv8l-2.7/cffi copying cffi/lock.py -> build/lib.linux-armv8l-2.7/cffi copying cffi/model.py -> build/lib.linux-armv8l-2.7/cffi copying cffi/pkgconfig.py -> build/lib.linux-armv8l-2.7/cffi copying cffi/recompiler.py -> build/lib.linux-armv8l-2.7/cffi copying cffi/setuptools_ext.py -> build/lib.linux-armv8l-2.7/cffi copying cffi/vengine_cpy.py -> build/lib.linux-armv8l-2.7/cffi copying cffi/vengine_gen.py -> build/lib.linux-armv8l-2.7/cffi copying cffi/verifier.py -> build/lib.linux-armv8l-2.7/cffi copying cffi/_cffi_include.h -> build/lib.linux-armv8l-2.7/cffi copying cffi/parse_c_type.h -> build/lib.linux-armv8l-2.7/cffi copying cffi/_embedding.h -> build/lib.linux-armv8l-2.7/cffi copying cffi/_cffi_errors.h -> build/lib.linux-armv8l-2.7/cffi running build_ext building '_cffi_backend' extension creating build/temp.linux-armv8l-2.7 creating build/temp.linux-armv8l-2.7/c arm-linux-gnueabihf-gcc -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -ffile-prefix-map=/build/python2.7-zkaHIM/python2.7-2.7.18=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include/ffi -I/usr/include/libffi -I/usr/include/python2.7 -c c/_cffi_backend.c -o build/temp.linux-armv8l-2.7/c/_cffi_backend.o c/_cffi_backend.c:15:10: fatal error: ffi.h: No such file or directory 15 | #include | ^~~ compilation terminated. error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1

ERROR: Command errored out with exit status 1: /usr/bin/python2 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-8rHWGc/cffi/setup.py'"'"'; file='"'"'/tmp/pip-install-8rHWGc/cffi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-V0hi1C/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-y_aEE9/normal --compile --install-headers /tmp/pip-build-env-y_aEE9/normal/include/python2.7/cffi Check the logs for full command output.

ERROR: Command errored out with exit status 1: /usr/bin/python2 /usr/local/lib/python2.7/dist-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-y_aEE9/normal --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'cffi>=1.3.0' requests Check the logs for full command output.

meesvw commented 2 years ago

Try using Python version 3

meesvw commented 2 years ago

What OS version are you using?

Ango87 commented 2 years ago

What OS version are you using?

Android

Ango87 commented 2 years ago

@meesvw $ ls Btcbf.py _config.yml requirements.txt README.md address.txt blink@localhost:/storage/emulated/0/Download/Btcbf-main$ python3 Btcbf.py Traceback (most recent call last): File "/sdcard/Download/Btcbf-main/Btcbf.py", line 3, in from bit.crypto import ECPrivateKey ImportError: cannot import name 'ECPrivateKey' from 'bit.crypto' (/home/blink/.local/lib/python3.9/site-packages/bit/crypto.py)

meesvw commented 2 years ago

I don't recommend running this on an Android device, but if you really want to you could try this:

pip3 install -r requirements.txt

This command will install the requirements using python3.

Next rerun the script if you get no errors. This should solve that the requirements can't install. If you still get errors it's probably because arm isn't supported. If that's the case you can't run it...

meesvw commented 2 years ago

I also saw this in your error log: fatal error: ffi.h: No such file or directory

Which can be solved by installing this package: libffi-dev

Command sudo apt-get install libffi-dev

vlnahp commented 2 years ago

What OS version are you using?

Android

It is not recommended to run Btcbf on Android. To install the requirements, it is necessary to have cryptography libraries installed. On Android cryptography libs need to be compiled. It takes a long time and effort.