From 148e52e132221b21c20aef1673b094fd50960ac5 Mon Sep 17 00:00:00 2001 From: kenorb Date: Sun, 27 Feb 2022 22:18:37 +0000 Subject: [PATCH 01/40] Updates secp256k1 to bitcoin-core#309 --- secp256k1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/secp256k1 b/secp256k1 index cc623d5..cb04ab5 160000 --- a/secp256k1 +++ b/secp256k1 @@ -1 +1 @@ -Subproject commit cc623d50e43507f1d41490280a06065bf7fa3128 +Subproject commit cb04ab5e3c27ae709a461cb7d72ab6f2a8465c93 From 15a635b70ff5be2dc17db9e9e1f7b1f4764368e8 Mon Sep 17 00:00:00 2001 From: kenorb Date: Tue, 19 Apr 2022 20:06:14 +0100 Subject: [PATCH 02/40] Adds automake to README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 15289fb..7af867d 100644 --- a/README.md +++ b/README.md @@ -172,10 +172,10 @@ installed (at least openssl and gmp are required along with libsecp256k1's build dependencies). I really need to learn autotools. If you file an issue about a build failure in libsecp256k1 I will close it. -Dependencies should install with +Dependencies should install with: ``` -apt install autoconf autogen git libtool make +apt install autoconf autogen automake git libtool make apt install build-essential libgmp-dev libgmp3-dev libssl-dev ``` From 5b8b0caa62a95ffc0bcfaa454aea1b71be29e98b Mon Sep 17 00:00:00 2001 From: kenorb Date: Wed, 20 Apr 2022 23:04:16 +0100 Subject: [PATCH 03/40] Updates secp256k1 submodule to bitcoin-core#299 --- ec_pubkey_fast.c | 2 +- secp256k1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ec_pubkey_fast.c b/ec_pubkey_fast.c index d5f0b71..d7a4f72 100644 --- a/ec_pubkey_fast.c +++ b/ec_pubkey_fast.c @@ -29,7 +29,7 @@ void secp256k1_ecmult(const secp256k1_ecmult_context_t *ctx, secp256k1_gej_t *r, abort(); } -static int secp256k1_eckey_pubkey_parse(secp256k1_ge_t *elem, const unsigned char *pub, int size); +static int secp256k1_eckey_pubkey_parse(secp256k1_ge_t *elem, const unsigned char *pub, long unsigned int size); #include "mmapf.h" diff --git a/secp256k1 b/secp256k1 index cb04ab5..eeab823 160000 --- a/secp256k1 +++ b/secp256k1 @@ -1 +1 @@ -Subproject commit cb04ab5e3c27ae709a461cb7d72ab6f2a8465c93 +Subproject commit eeab823b70b3b2db8f47e15d6348d848724aae6d From 18d352cdf26d039b9c1283f685010d24376df06c Mon Sep 17 00:00:00 2001 From: kenorb Date: Wed, 20 Apr 2022 23:09:58 +0100 Subject: [PATCH 04/40] Updates secp256k1 submodule to bitcoin-core#294 --- ec_pubkey_fast.c | 84 ++++++++++++++++++++++++------------------------ secp256k1 | 2 +- 2 files changed, 43 insertions(+), 43 deletions(-) diff --git a/ec_pubkey_fast.c b/ec_pubkey_fast.c index d7a4f72..64cc79f 100644 --- a/ec_pubkey_fast.c +++ b/ec_pubkey_fast.c @@ -24,12 +24,12 @@ #include "secp256k1/src/ecmult.h" #include "secp256k1/src/eckey_impl.h" -void secp256k1_ecmult(const secp256k1_ecmult_context_t *ctx, secp256k1_gej_t *r, const secp256k1_gej_t *a, const secp256k1_scalar_t *na, const secp256k1_scalar_t *ng) { +void secp256k1_ecmult(const secp256k1_ecmult_context *ctx, secp256k1_gej *r, const secp256k1_gej *a, const secp256k1_scalar *na, const secp256k1_scalar *ng) { fprintf(stderr, "there is no secp256k1_ecmult %p %p %p %p %p\n", (void*)ctx, (void*)r, (void*)a, (void*)na, (void*)ng); abort(); } -static int secp256k1_eckey_pubkey_parse(secp256k1_ge_t *elem, const unsigned char *pub, long unsigned int size); +static int secp256k1_eckey_pubkey_parse(secp256k1_ge *elem, const unsigned char *pub, long unsigned int size); #include "mmapf.h" @@ -39,8 +39,8 @@ static int secp256k1_eckey_pubkey_parse(secp256k1_ge_t *elem, const unsigned cha #define SETBIT(T, B, V) (T = V ? T | (1<infinity) { VERIFY_CHECK(rzr == NULL); @@ -244,7 +244,7 @@ static void secp256k1_gej_add_ge_bl(secp256k1_gej_t *r, const secp256k1_gej_t *a } -static void secp256k1_ecmult_gen_bl(secp256k1_gej_t *r, const unsigned char *seckey){ +static void secp256k1_ecmult_gen_bl(secp256k1_gej *r, const unsigned char *seckey){ unsigned char a[256]; for (int j = 0; j < 32; j++){ for (int i = 0; i < 8; i++){ @@ -275,8 +275,8 @@ static void secp256k1_ecmult_gen_bl(secp256k1_gej_t *r, const unsigned char *sec #endif int secp256k1_ec_pubkey_create_precomp(unsigned char *pub_chr, int *pub_chr_sz, const unsigned char *seckey) { - secp256k1_gej_t pj; - secp256k1_ge_t p; + secp256k1_gej pj; + secp256k1_ge p; #ifdef USE_BL_ARITHMETIC secp256k1_ecmult_gen_bl(&pj, seckey); @@ -296,16 +296,16 @@ int secp256k1_ec_pubkey_create_precomp(unsigned char *pub_chr, int *pub_chr_sz, return 0; } -static secp256k1_gej_t *batchpj; -static secp256k1_ge_t *batchpa; -static secp256k1_fe_t *batchaz; -static secp256k1_fe_t *batchai; +static secp256k1_gej *batchpj; +static secp256k1_ge *batchpa; +static secp256k1_fe *batchaz; +static secp256k1_fe *batchai; int secp256k1_ec_pubkey_batch_init(unsigned int num) { - if (!batchpj) { batchpj = malloc(sizeof(secp256k1_gej_t)*num); } - if (!batchpa) { batchpa = malloc(sizeof(secp256k1_ge_t)*num); } - if (!batchaz) { batchaz = malloc(sizeof(secp256k1_fe_t)*num); } - if (!batchai) { batchai = malloc(sizeof(secp256k1_fe_t)*num); } + if (!batchpj) { batchpj = malloc(sizeof(secp256k1_gej)*num); } + if (!batchpa) { batchpa = malloc(sizeof(secp256k1_ge)*num); } + if (!batchaz) { batchaz = malloc(sizeof(secp256k1_fe)*num); } + if (!batchai) { batchai = malloc(sizeof(secp256k1_fe)*num); } if (batchpj == NULL || batchpa == NULL || batchaz == NULL || batchai == NULL) { return 1; } else { @@ -313,7 +313,7 @@ int secp256k1_ec_pubkey_batch_init(unsigned int num) { } } -void secp256k1_ge_set_all_gej_static(int num, secp256k1_ge_t *batchpa, secp256k1_gej_t *batchpj) { +void secp256k1_ge_set_all_gej_static(int num, secp256k1_ge *batchpa, secp256k1_gej *batchpj) { size_t i; for (i = 0; i < num; i++) { batchaz[i] = batchpj[i].z; @@ -335,9 +335,9 @@ int secp256k1_ec_pubkey_batch_incr(unsigned int num, unsigned int skip, unsigned unsigned char b32[32]; - secp256k1_scalar_t priv, incr_s; - secp256k1_gej_t temp; - secp256k1_ge_t incr_a; + secp256k1_scalar priv, incr_s; + secp256k1_gej temp; + secp256k1_ge incr_a; /* load staring private key */ secp256k1_scalar_set_b32(&priv, start, NULL); @@ -415,7 +415,7 @@ int secp256k1_ec_pubkey_batch_create(unsigned int num, unsigned char (*pub)[65], } int secp256k1_scalar_add_b32(void * out, void * a, void *b) { - secp256k1_scalar_t tmp_a, tmp_b; + secp256k1_scalar tmp_a, tmp_b; secp256k1_scalar_set_b32(&tmp_a, a, NULL); secp256k1_scalar_set_b32(&tmp_b, b, NULL); @@ -452,9 +452,9 @@ void priv_add_uint32(unsigned char *priv, unsigned int add) { } typedef struct { - secp256k1_gej_t pubj; - secp256k1_ge_t inc; - secp256k1_gej_t incj; + secp256k1_gej pubj; + secp256k1_ge inc; + secp256k1_gej incj; unsigned int n; } pubkey_incr_t; @@ -481,7 +481,7 @@ int secp256k1_ec_pubkey_incr_init(unsigned char *seckey, unsigned int add) { } int secp256k1_ec_pubkey_incr(unsigned char *pub_chr, int *pub_chr_sz, unsigned char *seckey) { - secp256k1_ge_t p; + secp256k1_ge p; priv_add_uint32(seckey, pubkey_incr_ctx.n); #ifdef USE_BL_ARITHMETIC @@ -504,7 +504,7 @@ int secp256k1_ec_pubkey_incr(unsigned char *pub_chr, int *pub_chr_sz, unsigned c } void * secp256k1_ec_priv_to_gej(unsigned char *priv) { - secp256k1_gej_t *gej = malloc(sizeof(secp256k1_gej_t)); + secp256k1_gej *gej = malloc(sizeof(secp256k1_gej)); #ifdef USE_BL_ARITHMETIC secp256k1_ecmult_gen_bl(gej, priv); #else @@ -515,17 +515,17 @@ void * secp256k1_ec_priv_to_gej(unsigned char *priv) { } int secp256k1_ec_pubkey_add_gej(unsigned char *pub_chr, int *pub_chr_sz, void *add) { - secp256k1_ge_t in; - secp256k1_ge_t p; + secp256k1_ge in; + secp256k1_ge p; - secp256k1_gej_t out; + secp256k1_gej out; secp256k1_eckey_pubkey_parse(&in, pub_chr, *pub_chr_sz); #ifdef USE_BL_ARITHMETIC - secp256k1_gej_add_ge_bl(&out, (secp256k1_gej_t *)add, &in, NULL); + secp256k1_gej_add_ge_bl(&out, (secp256k1_gej *)add, &in, NULL); #else - secp256k1_gej_add_ge_var(&out, (secp256k1_gej_t *)add, &in, NULL); + secp256k1_gej_add_ge_var(&out, (secp256k1_gej *)add, &in, NULL); #endif secp256k1_ge_set_gej(&p, &out); diff --git a/secp256k1 b/secp256k1 index eeab823..9e90516 160000 --- a/secp256k1 +++ b/secp256k1 @@ -1 +1 @@ -Subproject commit eeab823b70b3b2db8f47e15d6348d848724aae6d +Subproject commit 9e9051687cdfcce1036bee103e3fa0756381ea4e From 8c4a3d6108c39d01c710eb47feaedfe3799c2e18 Mon Sep 17 00:00:00 2001 From: kenorb Date: Wed, 20 Apr 2022 23:55:01 +0100 Subject: [PATCH 05/40] Updates secp256k1 submodule to bitcoin-core#320 --- secp256k1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/secp256k1 b/secp256k1 index 9e90516..52fd03f 160000 --- a/secp256k1 +++ b/secp256k1 @@ -1 +1 @@ -Subproject commit 9e9051687cdfcce1036bee103e3fa0756381ea4e +Subproject commit 52fd03f1ba0996dfdc82075f321039580b8d2820 From cba150069116dc27039ee89dbfedc7fcb6bbfea3 Mon Sep 17 00:00:00 2001 From: kenorb Date: Wed, 20 Apr 2022 23:55:58 +0100 Subject: [PATCH 06/40] Updates secp256k1 submodule to bitcoin-core#325 --- secp256k1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/secp256k1 b/secp256k1 index 52fd03f..cc3141a 160000 --- a/secp256k1 +++ b/secp256k1 @@ -1 +1 @@ -Subproject commit 52fd03f1ba0996dfdc82075f321039580b8d2820 +Subproject commit cc3141a00368c8d83dc35243f4936694304d62dc From a49cf48689ab9054aebde1cdc6b08a34ce6f3925 Mon Sep 17 00:00:00 2001 From: kenorb Date: Wed, 20 Apr 2022 23:56:39 +0100 Subject: [PATCH 07/40] Updates secp256k1 submodule to the latest master (11 Oct 2015) --- secp256k1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/secp256k1 b/secp256k1 index cc3141a..edfce4d 160000 --- a/secp256k1 +++ b/secp256k1 @@ -1 +1 @@ -Subproject commit cc3141a00368c8d83dc35243f4936694304d62dc +Subproject commit edfce4d35aabdd5f925a2112760803558497071f From 49a652e63df4255621bd6bfc93e2b82c909d4632 Mon Sep 17 00:00:00 2001 From: kenorb Date: Thu, 21 Apr 2022 00:02:10 +0100 Subject: [PATCH 08/40] Updates scrypt-jane module to master --- scrypt-jane | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scrypt-jane b/scrypt-jane index 1be9d57..51835d0 160000 --- a/scrypt-jane +++ b/scrypt-jane @@ -1 +1 @@ -Subproject commit 1be9d57162392f11a860bec8005cc3ce5afdd057 +Subproject commit 51835d04a336b3aea0fc8cb3002e9ef6dcb47c7b From a3bbcc721cacf9d47c38b4232ddc8a74b063f1b5 Mon Sep 17 00:00:00 2001 From: kenorb Date: Thu, 21 Apr 2022 00:52:01 +0100 Subject: [PATCH 09/40] Updates secp256k1 submodule to bitcoin-core#328 --- secp256k1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/secp256k1 b/secp256k1 index edfce4d..7450ef1 160000 --- a/secp256k1 +++ b/secp256k1 @@ -1 +1 @@ -Subproject commit edfce4d35aabdd5f925a2112760803558497071f +Subproject commit 7450ef171db18361962ce1cabc5f3f233648789b From 236d7f3f7689bc29ed8fe433631ada564ee8bf2d Mon Sep 17 00:00:00 2001 From: kenorb Date: Thu, 21 Apr 2022 00:53:35 +0100 Subject: [PATCH 10/40] Updates secp256k1 submodule to bitcoin-core#338 --- secp256k1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/secp256k1 b/secp256k1 index 7450ef1..31994c8 160000 --- a/secp256k1 +++ b/secp256k1 @@ -1 +1 @@ -Subproject commit 7450ef171db18361962ce1cabc5f3f233648789b +Subproject commit 31994c8e5b8ec6693b2f8678b39d12d65c67067d From e1e17e915de6ccbcc8462d1f232005ece3466428 Mon Sep 17 00:00:00 2001 From: kenorb Date: Fri, 22 Apr 2022 22:13:44 +0100 Subject: [PATCH 11/40] Increases bloom size filter to 1G --- blfchk.c | 5 +++++ bloom.c | 5 +++++ bloom.h | 13 ++++++++++++- brainflayer.c | 5 +++++ 4 files changed, 27 insertions(+), 1 deletion(-) diff --git a/blfchk.c b/blfchk.c index 3a97bc6..72a980d 100644 --- a/blfchk.c +++ b/blfchk.c @@ -77,6 +77,11 @@ int main(int argc, char **argv) { bit = BH17(hash.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } bit = BH18(hash.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } bit = BH19(hash.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } + bit = BH20(hash.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } + bit = BH21(hash.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } + bit = BH22(hash.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } + bit = BH23(hash.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } + bit = BH24(hash.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } if (hfile && !hsearchf(hfile, &hash)) { //fprintf(ofile, "%s (false positive)\n", hex(hash.uc, sizeof(hash.uc), buf, sizeof(buf))); diff --git a/bloom.c b/bloom.c index 7d863a9..f9668cc 100644 --- a/bloom.c +++ b/bloom.c @@ -34,6 +34,11 @@ void bloom_set_hash160(unsigned char *bloom, uint32_t *h) { t = BH17(h); BLOOM_SET_BIT(t); t = BH18(h); BLOOM_SET_BIT(t); t = BH19(h); BLOOM_SET_BIT(t); + t = BH20(h); BLOOM_SET_BIT(t); + t = BH21(h); BLOOM_SET_BIT(t); + t = BH22(h); BLOOM_SET_BIT(t); + t = BH23(h); BLOOM_SET_BIT(t); + t = BH24(h); BLOOM_SET_BIT(t); } /* diff --git a/bloom.h b/bloom.h index 4f2368a..02b40fb 100644 --- a/bloom.h +++ b/bloom.h @@ -5,7 +5,7 @@ #include /* 2^32 bits */ -#define BLOOM_SIZE (512*1024*1024) +#define BLOOM_SIZE (1024*1024*1024) #define BLOOM_SET_BIT(N) (bloom[(N)>>3] = bloom[(N)>>3] | (1<<((N)&7))) #define BLOOM_GET_BIT(N) ( ( bloom[(N)>>3]>>((N)&7) )&1) @@ -34,6 +34,12 @@ #define BH18(N) (N[3]<<24|N[4]>> 8) #define BH19(N) (N[4]<<24|N[0]>> 8) +#define BH20(N) (N[0]<<16|N[1]>>24) +#define BH21(N) (N[1]<<16|N[2]>>24) +#define BH22(N) (N[2]<<16|N[3]>>24) +#define BH23(N) (N[3]<<16|N[4]>>24) +#define BH24(N) (N[4]<<16|N[0]>>24) + void bloom_set_hash160(unsigned char *, uint32_t *); #pragma GCC diagnostic ignored "-Wunused-function" static unsigned int bloom_chk_hash160(unsigned char *bloom, uint32_t *h) { @@ -58,6 +64,11 @@ static unsigned int bloom_chk_hash160(unsigned char *bloom, uint32_t *h) { t = BH17(h); if (BLOOM_GET_BIT(t) == 0) { return 0; } t = BH18(h); if (BLOOM_GET_BIT(t) == 0) { return 0; } t = BH19(h); if (BLOOM_GET_BIT(t) == 0) { return 0; } + t = BH20(h); if (BLOOM_GET_BIT(t) == 0) { return 0; } + t = BH21(h); if (BLOOM_GET_BIT(t) == 0) { return 0; } + t = BH22(h); if (BLOOM_GET_BIT(t) == 0) { return 0; } + t = BH23(h); if (BLOOM_GET_BIT(t) == 0) { return 0; } + t = BH24(h); if (BLOOM_GET_BIT(t) == 0) { return 0; } return 1; } #pragma GCC diagnostic pop diff --git a/brainflayer.c b/brainflayer.c index 38a6ef9..75641cd 100644 --- a/brainflayer.c +++ b/brainflayer.c @@ -819,6 +819,11 @@ int main(int argc, char **argv) { bit = BH17(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } bit = BH18(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } bit = BH19(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } + bit = BH20(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } + bit = BH21(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } + bit = BH22(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } + bit = BH23(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } + bit = BH24(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } if (!fopt || hsearchf(ffile, &hash160)) { if (tty) { fprintf(ofile, "\033[0K"); } From 23108f4d5f8172c672f033700d3602fda7a4b21f Mon Sep 17 00:00:00 2001 From: kenorb Date: Mon, 2 May 2022 22:22:18 +0100 Subject: [PATCH 12/40] README: Adds missing dependency to -lz --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7af867d..da095b6 100644 --- a/README.md +++ b/README.md @@ -176,7 +176,7 @@ Dependencies should install with: ``` apt install autoconf autogen automake git libtool make -apt install build-essential libgmp-dev libgmp3-dev libssl-dev +apt install build-essential libgmp-dev libgmp3-dev libssl-dev zlib1g-dev ``` Supported build target is currently Ubuntu 20.04 on amd64/x86_64. Issues with From 0c047e07501b43903e45be5e9a9aedcdedaf3157 Mon Sep 17 00:00:00 2001 From: kenorb Date: Sun, 8 May 2022 15:08:00 +0100 Subject: [PATCH 13/40] Increases size of ecmult table --- brainflayer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/brainflayer.c b/brainflayer.c index 75641cd..bf5dd94 100644 --- a/brainflayer.c +++ b/brainflayer.c @@ -381,7 +381,7 @@ void usage(unsigned char *name) { -n K/N use only the Kth of every N input lines\n\ -B batch size for affine transformations\n\ must be a power of 2 (default/max: %d)\n\ - -w WINDOW_SIZE window size for ecmult table (default: 16)\n\ + -w WINDOW_SIZE window size for ecmult table (default: 18)\n\ uses about 3 * 2^w KiB memory on startup, but\n\ only about 2^w KiB once the table is built\n\ -m FILE load ecmult table from FILE\n\ @@ -411,7 +411,7 @@ int main(int argc, char **argv) { unsigned char modestr[64]; - int spok = 0, aopt = 0, vopt = 0, wopt = 16, xopt = 0; + int spok = 0, aopt = 0, vopt = 0, wopt = 18, xopt = 0; int nopt_mod = 0, nopt_rem = 0, Bopt = 0, Nopt = 2; uint64_t kopt = 0; unsigned char *bopt = NULL, *iopt = NULL, *oopt = NULL; From dda81125a34f5f50ad5c8104f96444532335ad70 Mon Sep 17 00:00:00 2001 From: kenorb Date: Mon, 9 May 2022 20:25:21 +0100 Subject: [PATCH 14/40] Adds support for multiple bloom filter files --- brainflayer.c | 111 ++++++++++++++++++++++++++++++-------------------- 1 file changed, 67 insertions(+), 44 deletions(-) diff --git a/brainflayer.c b/brainflayer.c index bf5dd94..492c6b2 100644 --- a/brainflayer.c +++ b/brainflayer.c @@ -2,8 +2,9 @@ #include #include #include -#include +#include #include +#include #include #include #include @@ -35,6 +36,9 @@ // raise this if you really want, but quickly diminishing returns #define BATCH_MAX 4096 +// Number of supported bloom files. +#define BOPT_MAX 10 + static int brainflayer_is_init = 0; typedef struct pubhashfn_s { @@ -44,8 +48,8 @@ typedef struct pubhashfn_s { static unsigned char *mem; -static mmapf_ctx bloom_mmapf; -static unsigned char *bloom = NULL; +static mmapf_ctx bloom_mmapf[10]; +static unsigned char *bloom, *blooms[10]; static unsigned char *unhexed = NULL; static size_t unhexed_sz = 4096; @@ -348,6 +352,7 @@ void usage(unsigned char *name) { printf("Usage: %s [OPTION]...\n\n\ -a open output file in append mode\n\ -b FILE check for matches against bloom filter FILE\n\ + multiple files be be specified\n\ -f FILE verify matches against sorted hash160s in FILE\n\ -i FILE read from FILE instead of stdin\n\ -o FILE write to FILE instead of stdout\n\ @@ -369,7 +374,7 @@ void usage(unsigned char *name) { rush - rushwallet (requires -r) FAST\n\ keccak - keccak256 (ethercamp/old ethaddress)\n\ camp2 - keccak256 * 2031 (new ethercamp)\n\ - shaxn - N rounds of SHA-256\n\ + shaxn - N rounds of SHA-256\n\ -x treat input as hex encoded\n\ -s SALT use SALT for salted input types (default: none)\n\ -p PASSPHRASE use PASSPHRASE for salted input types, inputs\n\ @@ -411,10 +416,11 @@ int main(int argc, char **argv) { unsigned char modestr[64]; - int spok = 0, aopt = 0, vopt = 0, wopt = 18, xopt = 0; + int spok = 0, aopt = 0, boptn = 0, vopt = 0, wopt = 18, xopt = 0; int nopt_mod = 0, nopt_rem = 0, Bopt = 0, Nopt = 2; uint64_t kopt = 0; - unsigned char *bopt = NULL, *iopt = NULL, *oopt = NULL; + unsigned char *bopts[BOPT_MAX]; + unsigned char *iopt = NULL, *oopt = NULL; unsigned char *topt = NULL, *sopt = NULL, *popt = NULL; unsigned char *mopt = NULL, *fopt = NULL, *ropt = NULL; unsigned char *Iopt = NULL, *copt = NULL; @@ -464,7 +470,13 @@ int main(int argc, char **argv) { vopt = 1; // verbose break; case 'b': - bopt = optarg; // bloom filter file + if (boptn < BATCH_MAX) { + bopts[boptn] = optarg; // bloom filter file + boptn++; + } + else { + fprintf(stderr, "Number of bloom files reached maximum!\n"); + } break; case 'f': fopt = optarg; // full filter file @@ -515,7 +527,7 @@ int main(int argc, char **argv) { if (optind == 1 && argc == 2) { // older versions of brainflayer had the bloom filter file as a // single optional argument, this keeps compatibility with that - bopt = argv[1]; + bopts[0] = argv[1]; } else { fprintf(stderr, "Invalid arguments:\n"); while (optind < argc) { @@ -684,17 +696,22 @@ int main(int argc, char **argv) { snprintf(modestr, sizeof(modestr), xopt ? "(hex)%s" : "%s", topt); - if (bopt) { - if ((ret = mmapf(&bloom_mmapf, bopt, BLOOM_SIZE, MMAPF_RNDRD)) != MMAPF_OKAY) { - bail(1, "failed to open bloom filter '%s': %s\n", bopt, mmapf_strerror(ret)); - } else if (bloom_mmapf.mem == NULL) { - bail(1, "got NULL pointer trying to set up bloom filter\n"); + if (boptn > 0) { + for (int i = 0; i < boptn; i++) { + if (vopt) { + fprintf(stdout, "Loading %s...\n", bopts[i]); + } + if ((ret = mmapf(&bloom_mmapf[i], bopts[i], BLOOM_SIZE, MMAPF_RNDRD)) != MMAPF_OKAY) { + bail(1, "failed to open bloom filter '%s': %s\n", bopts[i], mmapf_strerror(ret)); + } else if (bloom_mmapf[i].mem == NULL) { + bail(1, "got NULL pointer trying to set up bloom filter\n"); + } + blooms[i] = bloom_mmapf[i].mem; } - bloom = bloom_mmapf.mem; } if (fopt) { - if (!bopt) { + if (boptn == 0) { bail(1, "The '-f' option must be used with a bloom filter\n"); } if ((ffile = fopen(fopt, "r")) == NULL) { @@ -793,39 +810,45 @@ int main(int argc, char **argv) { // loop over the public keys for (i = 0; i < batch_stopped; ++i) { - if (bloom) { /* crack mode */ + if (boptn > 0) { /* crack mode */ // loop over pubkey hash functions for (j = 0; pubhashfn[j].fn != NULL; ++j) { + bool bmatch = false; pubhashfn[j].fn(&hash160, batch_upub[i]); - unsigned int bit; - bit = BH00(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } - bit = BH01(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } - bit = BH02(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } - bit = BH03(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } - bit = BH04(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } - bit = BH05(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } - bit = BH06(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } - bit = BH07(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } - bit = BH08(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } - bit = BH09(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } - bit = BH10(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } - bit = BH11(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } - bit = BH12(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } - bit = BH13(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } - bit = BH14(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } - bit = BH15(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } - bit = BH16(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } - bit = BH17(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } - bit = BH18(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } - bit = BH19(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } - bit = BH20(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } - bit = BH21(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } - bit = BH22(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } - bit = BH23(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } - bit = BH24(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } - - if (!fopt || hsearchf(ffile, &hash160)) { + for (int k = 0; k < boptn; k++) { + unsigned int bit; + bloom = blooms[k]; + bit = BH00(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } + bit = BH01(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } + bit = BH02(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } + bit = BH03(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } + bit = BH04(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } + bit = BH05(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } + bit = BH06(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } + bit = BH07(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } + bit = BH08(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } + bit = BH09(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } + bit = BH10(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } + bit = BH11(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } + bit = BH12(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } + bit = BH13(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } + bit = BH14(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } + bit = BH15(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } + bit = BH16(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } + bit = BH17(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } + bit = BH18(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } + bit = BH19(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } + bit = BH20(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } + bit = BH21(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } + bit = BH22(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } + bit = BH23(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } + bit = BH24(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } + bmatch = true; + break; + } + + if (bmatch && (!fopt || hsearchf(ffile, &hash160))) { if (tty) { fprintf(ofile, "\033[0K"); } // reformat/populate the line if required if (Iopt) { From 87f2f1c81fb1f128356c6f2be801fbe4b89049fe Mon Sep 17 00:00:00 2001 From: kenorb Date: Wed, 11 May 2022 12:21:29 +0100 Subject: [PATCH 15/40] Improves code for validating matches with multiple bloom filters --- brainflayer.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/brainflayer.c b/brainflayer.c index 492c6b2..73149be 100644 --- a/brainflayer.c +++ b/brainflayer.c @@ -2,7 +2,6 @@ #include #include #include -#include #include #include #include @@ -697,9 +696,10 @@ int main(int argc, char **argv) { snprintf(modestr, sizeof(modestr), xopt ? "(hex)%s" : "%s", topt); if (boptn > 0) { + printf("Loading... "); for (int i = 0; i < boptn; i++) { if (vopt) { - fprintf(stdout, "Loading %s...\n", bopts[i]); + fprintf(stdout, "%s... ", bopts[i]); } if ((ret = mmapf(&bloom_mmapf[i], bopts[i], BLOOM_SIZE, MMAPF_RNDRD)) != MMAPF_OKAY) { bail(1, "failed to open bloom filter '%s': %s\n", bopts[i], mmapf_strerror(ret)); @@ -708,6 +708,7 @@ int main(int argc, char **argv) { } blooms[i] = bloom_mmapf[i].mem; } + printf("\n"); } if (fopt) { @@ -813,7 +814,6 @@ int main(int argc, char **argv) { if (boptn > 0) { /* crack mode */ // loop over pubkey hash functions for (j = 0; pubhashfn[j].fn != NULL; ++j) { - bool bmatch = false; pubhashfn[j].fn(&hash160, batch_upub[i]); for (int k = 0; k < boptn; k++) { @@ -844,18 +844,17 @@ int main(int argc, char **argv) { bit = BH22(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } bit = BH23(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } bit = BH24(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } - bmatch = true; - break; - } - if (bmatch && (!fopt || hsearchf(ffile, &hash160))) { - if (tty) { fprintf(ofile, "\033[0K"); } - // reformat/populate the line if required - if (Iopt) { - hex(batch_priv[i], 32, batch_line[i], 65); + if (!fopt || hsearchf(ffile, &hash160)) { + if (tty) { fprintf(ofile, "\033[0K"); } + // reformat/populate the line if required + if (Iopt) { + hex(batch_priv[i], 32, batch_line[i], 65); + } + fprintresult(ofile, &hash160, pubhashfn[j].id, modestr, batch_line[i]); + ++olines; + break; } - fprintresult(ofile, &hash160, pubhashfn[j].id, modestr, batch_line[i]); - ++olines; } } } else { /* generate mode */ From 58aa6da58c88a9585cfde099d9b897612a02daaa Mon Sep 17 00:00:00 2001 From: kenorb Date: Wed, 11 May 2022 18:34:22 +0100 Subject: [PATCH 16/40] Option to keep the original control characters --- brainflayer.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/brainflayer.c b/brainflayer.c index 73149be..8eb07e6 100644 --- a/brainflayer.c +++ b/brainflayer.c @@ -363,6 +363,9 @@ void usage(unsigned char *name) { c - compressed address\n\ e - ethereum address\n\ x - most signifigant bits of x coordinate\n\ + -C keep original control characters\n\ + by default \\r and \\n are removed\n\ + (option is ignored in hex mode)\n\ -t TYPE inputs are TYPE - supported types:\n\ sha256 (default) - classic brainwallet\n\ sha3 - sha3-256\n\ @@ -416,7 +419,7 @@ int main(int argc, char **argv) { unsigned char modestr[64]; int spok = 0, aopt = 0, boptn = 0, vopt = 0, wopt = 18, xopt = 0; - int nopt_mod = 0, nopt_rem = 0, Bopt = 0, Nopt = 2; + int nopt_mod = 0, nopt_rem = 0, Bopt = 0, Copt = 0, Nopt = 2; uint64_t kopt = 0; unsigned char *bopts[BOPT_MAX]; unsigned char *iopt = NULL, *oopt = NULL; @@ -436,7 +439,7 @@ int main(int argc, char **argv) { unsigned char batch_priv[BATCH_MAX][32]; unsigned char batch_upub[BATCH_MAX][65]; - while ((c = getopt(argc, argv, "avxb:hi:k:f:m:n:o:p:s:r:c:t:w:I:B:N:")) != -1) { + while ((c = getopt(argc, argv, "avxb:hi:k:f:m:n:o:p:s:r:c:t:w:CI:B:N:")) != -1) { switch (c) { case 'a': aopt = 1; // open output file in append mode @@ -504,6 +507,9 @@ int main(int argc, char **argv) { case 't': topt = optarg; // type of input break; + case 'C': + Copt = 1; + break; case 'I': Iopt = optarg; // start key for incremental xopt = 1; // input is hex encoded @@ -775,7 +781,7 @@ int main(int argc, char **argv) { batch_stopped = Bopt; } else { for (i = 0; i < Bopt; ++i) { - if ((batch_line_read[i] = getline(&batch_line[i], &batch_line_sz[i], ifile)-1) > -1) { + if ((batch_line_read[i] = getline(&batch_line[i], &batch_line_sz[i], ifile)) > -1) { if (skipping) { ++raw_lines; if (kopt && raw_lines < kopt) { --i; continue; } @@ -784,7 +790,14 @@ int main(int argc, char **argv) { } else { break; } - batch_line[i][batch_line_read[i]] = 0; + if (!Copt || xopt) { + if (batch_line[i][batch_line_read[i]-1] == '\n') { + batch_line[i][--batch_line_read[i]] = 0; + } + if (batch_line[i][batch_line_read[i]-1] == '\r') { + batch_line[i][--batch_line_read[i]] = 0; + } + } if (xopt) { if (batch_line_read[i] / 2 > unhexed_sz) { unhexed_sz = batch_line_read[i]; From 40cc7b724125467b75ebe92537893c287458d6d7 Mon Sep 17 00:00:00 2001 From: kenorb Date: Wed, 11 May 2022 18:41:52 +0100 Subject: [PATCH 17/40] Adds -N option into help section --- brainflayer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/brainflayer.c b/brainflayer.c index 8eb07e6..11c3468 100644 --- a/brainflayer.c +++ b/brainflayer.c @@ -388,6 +388,7 @@ void usage(unsigned char *name) { -n K/N use only the Kth of every N input lines\n\ -B batch size for affine transformations\n\ must be a power of 2 (default/max: %d)\n\ + -N number of SHA rounds (used only in '-t shaxn' mode)\n\ -w WINDOW_SIZE window size for ecmult table (default: 18)\n\ uses about 3 * 2^w KiB memory on startup, but\n\ only about 2^w KiB once the table is built\n\ From 7d3abb8aa1b6425aced3cee06cc2eae14fc7961f Mon Sep 17 00:00:00 2001 From: kenorb Date: Tue, 17 May 2022 19:39:00 +0100 Subject: [PATCH 18/40] Ends a for loop quicker --- brainflayer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/brainflayer.c b/brainflayer.c index 11c3468..fc0d702 100644 --- a/brainflayer.c +++ b/brainflayer.c @@ -867,6 +867,7 @@ int main(int argc, char **argv) { } fprintresult(ofile, &hash160, pubhashfn[j].id, modestr, batch_line[i]); ++olines; + k = boptn; // End a for loop. break; } } From 5ead3eabca7a9e76e396152ce35695776c230ee7 Mon Sep 17 00:00:00 2001 From: kenorb Date: Wed, 18 May 2022 15:57:09 -0500 Subject: [PATCH 19/40] Points secp256k1 submodule to bitcoin-core repo instead --- .gitmodules | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 15f84b1..4a638d1 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ [submodule "secp256k1"] - path = secp256k1 - url = https://github.com/ryancdotorg/secp256k1.git + path = secp256k1 + url = https://github.com/bitcoin-core/secp256k1.git [submodule "scrypt-jane"] path = scrypt-jane url = https://github.com/ryancdotorg/scrypt-jane.git From 0ba8ee6e20371a866224b8073cd50a587d563569 Mon Sep 17 00:00:00 2001 From: kenorb Date: Wed, 18 May 2022 16:06:02 -0500 Subject: [PATCH 20/40] Moves scripts to separate dir --- 2.py | 14 --- 3.py | 91 --------------- generate12words.py | 99 ---------------- generate2words.py | 90 -------------- generate3words.py | 91 --------------- generate6words.py | 93 --------------- generators/brain12.py | 98 ---------------- generators/brain24.py | 110 ------------------ hash160.py | 13 --- {generators => scripts/generators}/2.py | 0 {generators => scripts/generators}/3.py | 0 brain12.py => scripts/generators/brain12.py | 0 .../generators/brain12words.py | 0 brain24.py => scripts/generators/brain24.py | 0 .../generators}/generate12words.py | 0 .../generators}/generate2words.py | 0 .../generators}/generate3words.py | 0 .../generators}/generate6words.py | 0 18 files changed, 699 deletions(-) delete mode 100644 2.py delete mode 100644 3.py delete mode 100644 generate12words.py delete mode 100644 generate2words.py delete mode 100644 generate3words.py delete mode 100644 generate6words.py delete mode 100755 generators/brain12.py delete mode 100755 generators/brain24.py delete mode 100644 hash160.py rename {generators => scripts/generators}/2.py (100%) rename {generators => scripts/generators}/3.py (100%) rename brain12.py => scripts/generators/brain12.py (100%) mode change 100644 => 100755 rename brain12words.py => scripts/generators/brain12words.py (100%) mode change 100644 => 100755 rename brain24.py => scripts/generators/brain24.py (100%) mode change 100644 => 100755 rename {generators => scripts/generators}/generate12words.py (100%) rename {generators => scripts/generators}/generate2words.py (100%) rename {generators => scripts/generators}/generate3words.py (100%) rename {generators => scripts/generators}/generate6words.py (100%) diff --git a/2.py b/2.py deleted file mode 100644 index 28ff344..0000000 --- a/2.py +++ /dev/null @@ -1,14 +0,0 @@ -import line - -ids = {} -found = [] -with open("wordlist.txt") as file1: - for line in file1.lines(): - id_ = line.split()[0] - ids[id_] = line - -with open("base") as file2: - for line in file2.lines(): - id_ = line.split()[0] - if id_ in ids: - found.append("{} {}".format(ids[id_], line)) diff --git a/3.py b/3.py deleted file mode 100644 index 9934ffc..0000000 --- a/3.py +++ /dev/null @@ -1,91 +0,0 @@ -#!/usr/bin/env python -# encoding: utf-8 -""" -code_phrase_geneator.py - -#Created by Scott Roberts. -#Copyright (c) 2011 TogaFoamParty Studios. All rights reserved. - -# Updated to use Bip39 by TheRealLordFractal 2019 - -""" - -import sys -import getopt -import random - - -help_message = ''' -Code Phrase Generator --n or --number : Number of sample code phrases given. (Default is 5) --p or --prefix : Uses a prefix word along with a random codeword instead of two codewords. --w or --wordlist : Uses another wordlist to generate code phrases from. -''' - -CODEWORDS = open('wordlist.txt', 'r').readlines() - - -class Usage(Exception): - def __init__(self, msg): - self.msg = msg - -def generate(prefix=False, number=5): - while number > 0: - if prefix == 'TRUE': - word1 = PREFIXES[int(random.uniform(0,len(PREFIXES)))] - elif prefix: - word1 = prefix - else: - word1 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - - word2 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word3 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - print "%s%s%s" % (word1.rstrip(), word2.rstrip(), word3.rstrip()) - - number -= 1 - - -def main(argv=None): - - number = 5 - prefix = False - - if argv is None: - argv = sys.argv - try: - try: - opts, args = getopt.getopt(argv[1:], "hn:p:i:vw:", ["help", "number=", "prefix=", "wordlist="]) - except getopt.error, msg: - raise Usage(msg) - - # option processing - for option, value in opts: - if option == "-v": - verbose = True - if option in ("-h", "--help"): - raise Usage(help_message) - if option in ("-n", "--number"): - number = int(value) - if option in ("-w", "--wordlist"): - global CODEWORDS - print "Importing: %s" % value - CODEWORDS = open(value, 'r').readlines() - if option in ("-p", "--prefixe"): - - print value - - if (value): - prefix = value - else: - prefix = 'TRUE' - - generate(prefix, number) - - except Usage, err: - print >> sys.stderr, sys.argv[0].split("/")[-1] + ": " + str(err.msg) - print >> sys.stderr, "\t for help use --help" - return 2 - - -if __name__ == "__main__": - sys.exit(main()) diff --git a/generate12words.py b/generate12words.py deleted file mode 100644 index 07de127..0000000 --- a/generate12words.py +++ /dev/null @@ -1,99 +0,0 @@ -#!/usr/bin/env python -# encoding: utf-8 -""" - - -# Bip39 by TheRealLordFractal 2019 - -""" - -import sys -import getopt -import random - -#sys.stdout = open('output.txt','wt') - -help_message = ''' -Bip39 12 Word Random Generator By TheRealLordFractal -Output File Saved as 12words.txt -Command Exntensions: --n or --number : Number of sample code phrases given. (Default is 5) --w or --wordlist : Uses another wordlist to generate code phrases from. -''' - -CODEWORDS = open('wordlist.txt', 'r').readlines() -outputtxt = open('12words.txt', 'w') - -class Usage(Exception): - def __init__(self, msg): - self.msg = msg - -def generate(prefix=False, number=5): - while number > 0: - if prefix == 'TRUE': - print ("Not Supported.") - # word1 = PREFIXES[int(random.uniform(0,len(PREFIXES)))] - elif prefix: - word1 = prefix - else: - word1 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word2 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word3 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word4 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word5 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word6 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word7 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word8 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word9 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word10 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word11 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word12 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - print >> outputtxt, " %s %s %s %s %s %s %s %s %s %s %s %s " % (word1.rstrip(), word2.rstrip(), word3.rstrip(), word4.rstrip(), word5.rstrip(), word6.rstrip(), word7.rstrip(), word8.rstrip(), word9.rstrip(), word10.rstrip(), word11.rstrip(), word12.rstrip()) - - number -= 1 - - -def main(argv=None): - - number = 5 - prefix = False - - if argv is None: - argv = sys.argv - try: - try: - opts, args = getopt.getopt(argv[1:], "hn:p:i:vw:", ["help", "number=", "prefix=", "wordlist="]) - except getopt.error, msg: - raise Usage(msg) - - # option processing - for option, value in opts: - if option == "-v": - verbose = True - if option in ("-h", "--help"): - raise Usage(help_message) - if option in ("-n", "--number"): - number = int(value) - if option in ("-w", "--wordlist"): - global CODEWORDS - print "Importing: %s" % value - CODEWORDS = open(value, 'r').readlines() - if option in ("-p", "--prefixe"): - - print value - - if (value): - prefix = value - else: - prefix = 'TRUE' - - generate(prefix, number) - - except Usage, err: - print >> sys.stderr, sys.argv[0].split("/")[-1] + ": " + str(err.msg) - print >> sys.stderr, "\t for help use --help" - return 2 - - -if __name__ == "__main__": - sys.exit(main()) diff --git a/generate2words.py b/generate2words.py deleted file mode 100644 index 10db4a1..0000000 --- a/generate2words.py +++ /dev/null @@ -1,90 +0,0 @@ -#!/usr/bin/env python -# encoding: utf-8 -""" -code_phrase_geneator.py - -#Created by Scott Roberts. -#Copyright (c) 2011 TogaFoamParty Studios. All rights reserved. - -# Updated to use Bip39 by TheRealLordFractal 2019 - -""" - -import sys -import getopt -import random - - -help_message = ''' -Code Phrase Generator --n or --number : Number of sample code phrases given. (Default is 5) --p or --prefix : Uses a prefix word along with a random codeword instead of two codewords. --w or --wordlist : Uses another wordlist to generate code phrases from. -''' - -CODEWORDS = open('wordlist.txt', 'r').readlines() - - -class Usage(Exception): - def __init__(self, msg): - self.msg = msg - -def generate(prefix=False, number=5): - while number > 0: - if prefix == 'TRUE': - word1 = PREFIXES[int(random.uniform(0,len(PREFIXES)))] - elif prefix: - word1 = prefix - else: - word1 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - - word2 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - print " %s %s" % (word1.rstrip(), word2.rstrip()) - - number -= 1 - - -def main(argv=None): - - number = 5 - prefix = False - - if argv is None: - argv = sys.argv - try: - try: - opts, args = getopt.getopt(argv[1:], "hn:p:i:vw:", ["help", "number=", "prefix=", "wordlist="]) - except getopt.error, msg: - raise Usage(msg) - - # option processing - for option, value in opts: - if option == "-v": - verbose = True - if option in ("-h", "--help"): - raise Usage(help_message) - if option in ("-n", "--number"): - number = int(value) - if option in ("-w", "--wordlist"): - global CODEWORDS - print "Importing: %s" % value - CODEWORDS = open(value, 'r').readlines() - if option in ("-p", "--prefixe"): - - print value - - if (value): - prefix = value - else: - prefix = 'TRUE' - - generate(prefix, number) - - except Usage, err: - print >> sys.stderr, sys.argv[0].split("/")[-1] + ": " + str(err.msg) - print >> sys.stderr, "\t for help use --help" - return 2 - - -if __name__ == "__main__": - sys.exit(main()) diff --git a/generate3words.py b/generate3words.py deleted file mode 100644 index 26cc49d..0000000 --- a/generate3words.py +++ /dev/null @@ -1,91 +0,0 @@ -#!/usr/bin/env python -# encoding: utf-8 -""" -code_phrase_geneator.py - -#Created by Scott Roberts. -#Copyright (c) 2011 TogaFoamParty Studios. All rights reserved. - -# Updated to use Bip39 by TheRealLordFractal 2019 - -""" - -import sys -import getopt -import random - - -help_message = ''' -Code Phrase Generator --n or --number : Number of sample code phrases given. (Default is 5) --p or --prefix : Uses a prefix word along with a random codeword instead of two codewords. --w or --wordlist : Uses another wordlist to generate code phrases from. -''' - -CODEWORDS = open('wordlist.txt', 'r').readlines() - - -class Usage(Exception): - def __init__(self, msg): - self.msg = msg - -def generate(prefix=False, number=5): - while number > 0: - if prefix == 'TRUE': - word1 = PREFIXES[int(random.uniform(0,len(PREFIXES)))] - elif prefix: - word1 = prefix - else: - word1 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - - word2 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word3 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - print " %s %s %s" % (word1.rstrip(), word2.rstrip(), word3.rstrip()) - - number -= 1 - - -def main(argv=None): - - number = 5 - prefix = False - - if argv is None: - argv = sys.argv - try: - try: - opts, args = getopt.getopt(argv[1:], "hn:p:i:vw:", ["help", "number=", "prefix=", "wordlist="]) - except getopt.error, msg: - raise Usage(msg) - - # option processing - for option, value in opts: - if option == "-v": - verbose = True - if option in ("-h", "--help"): - raise Usage(help_message) - if option in ("-n", "--number"): - number = int(value) - if option in ("-w", "--wordlist"): - global CODEWORDS - print "Importing: %s" % value - CODEWORDS = open(value, 'r').readlines() - if option in ("-p", "--prefixe"): - - print value - - if (value): - prefix = value - else: - prefix = 'TRUE' - - generate(prefix, number) - - except Usage, err: - print >> sys.stderr, sys.argv[0].split("/")[-1] + ": " + str(err.msg) - print >> sys.stderr, "\t for help use --help" - return 2 - - -if __name__ == "__main__": - sys.exit(main()) diff --git a/generate6words.py b/generate6words.py deleted file mode 100644 index e716535..0000000 --- a/generate6words.py +++ /dev/null @@ -1,93 +0,0 @@ -#!/usr/bin/env python -# encoding: utf-8 -""" - - -# Bip39 by TheRealLordFractal 2019 - -""" - -import sys -import getopt -import random - -#sys.stdout = open('output.txt','wt') - -help_message = ''' -Bip39 6 Word Random Generator By TheRealLordFractal -Output File Saved as 12words.txt -Command Exntensions: --n or --number : Number of sample code phrases given. (Default is 5) --w or --wordlist : Uses another wordlist to generate code phrases from. -''' - -CODEWORDS = open('wordlist.txt', 'r').readlines() -outputtxt = open('6words.txt', 'w') - -class Usage(Exception): - def __init__(self, msg): - self.msg = msg - -def generate(prefix=False, number=5): - while number > 0: - if prefix == 'TRUE': - print ("Not Supported.") - # word1 = PREFIXES[int(random.uniform(0,len(PREFIXES)))] - elif prefix: - word1 = prefix - else: - word1 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word2 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word3 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word4 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word5 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word6 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - print >> outputtxt, " %s %s %s %s %s %s " % (word1.rstrip(), word2.rstrip(), word3.rstrip(), word4.rstrip(), word5.rstrip(), word6.rstrip()) - - number -= 1 - - -def main(argv=None): - - number = 5 - prefix = False - - if argv is None: - argv = sys.argv - try: - try: - opts, args = getopt.getopt(argv[1:], "hn:p:i:vw:", ["help", "number=", "prefix=", "wordlist="]) - except getopt.error, msg: - raise Usage(msg) - - # option processing - for option, value in opts: - if option == "-v": - verbose = True - if option in ("-h", "--help"): - raise Usage(help_message) - if option in ("-n", "--number"): - number = int(value) - if option in ("-w", "--wordlist"): - global CODEWORDS - print "Importing: %s" % value - CODEWORDS = open(value, 'r').readlines() - if option in ("-p", "--prefixe"): - - print value - - if (value): - prefix = value - else: - prefix = 'TRUE' - - generate(prefix, number) - - except Usage, err: - print >> sys.stderr, sys.argv[0].split("/")[-1] + ": " + str(err.msg) - print >> sys.stderr, "\t for help use --help" - return 2 - - -if __name__ == "__main__": - sys.exit(main()) diff --git a/generators/brain12.py b/generators/brain12.py deleted file mode 100755 index 3984de9..0000000 --- a/generators/brain12.py +++ /dev/null @@ -1,98 +0,0 @@ -#!/usr/bin/env python -# encoding: utf-8 -""" - - -# Bip39 by TheRealLordFractal 2019 - -""" - -import sys -import getopt -import random - -#sys.stdout = open('output.txt','wt') - -help_message = ''' -Bip39 12 Word Random Generator By TheRealLordFractal -Output File Saved as 12words.txt -Command Exntensions: --n or --number : Number of sample code phrases given. (Default is 5) --w or --wordlist : Uses another wordlist to generate code phrases from. -''' - -CODEWORDS = open('wordlist.txt', 'r').readlines() - -class Usage(Exception): - def __init__(self, msg): - self.msg = msg - -def generate(prefix=False, number=5): - while number > 0: - if prefix == 'TRUE': - print ("Not Supported.") - # word1 = PREFIXES[int(random.uniform(0,len(PREFIXES)))] - elif prefix: - word1 = prefix - else: - word1 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word2 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word3 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word4 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word5 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word6 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word7 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word8 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word9 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word10 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word11 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word12 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - print " %s %s %s %s %s %s %s %s %s %s %s %s " % (word1.rstrip(), word2.rstrip(), word3.rstrip(), word4.rstrip(), word5.rstrip(), word6.rstrip(), word7.rstrip(), word8.rstrip(), word9.rstrip(), word10.rstrip(), word11.rstrip(), word12.rstrip()) - - number -= 1 - - -def main(argv=None): - - number = 5 - prefix = False - - if argv is None: - argv = sys.argv - try: - try: - opts, args = getopt.getopt(argv[1:], "hn:p:i:vw:", ["help", "number=", "prefix=", "wordlist="]) - except getopt.error, msg: - raise Usage(msg) - - # option processing - for option, value in opts: - if option == "-v": - verbose = True - if option in ("-h", "--help"): - raise Usage(help_message) - if option in ("-n", "--number"): - number = int(value) - if option in ("-w", "--wordlist"): - global CODEWORDS - print "Importing: %s" % value - CODEWORDS = open(value, 'r').readlines() - if option in ("-p", "--prefixe"): - - print value - - if (value): - prefix = value - else: - prefix = 'TRUE' - - generate(prefix, number) - - except Usage, err: - print >> sys.stderr, sys.argv[0].split("/")[-1] + ": " + str(err.msg) - print >> sys.stderr, "\t for help use --help" - return 2 - - -if __name__ == "__main__": - sys.exit(main()) diff --git a/generators/brain24.py b/generators/brain24.py deleted file mode 100755 index f9b0f17..0000000 --- a/generators/brain24.py +++ /dev/null @@ -1,110 +0,0 @@ -#!/usr/bin/env python -# encoding: utf-8 -""" - - -# Bip39 by TheRealLordFractal 2019 - -""" - -import sys -import getopt -import random - -#sys.stdout = open('output.txt','wt') - -help_message = ''' -Bip39 24 Word Random Generator By TheRealLordFractal -Output File Saved as 24words.txt -Command Exntensions: --n or --number : Number of sample code phrases given. (Default is 5) --w or --wordlist : Uses another wordlist to generate code phrases from. -''' - -CODEWORDS = open('wordlist.txt', 'r').readlines() - -class Usage(Exception): - def __init__(self, msg): - self.msg = msg - -def generate(prefix=False, number=5): - while number > 0: - if prefix == 'TRUE': - print ("Not Supported.") - # word1 = PREFIXES[int(random.uniform(0,len(PREFIXES)))] - elif prefix: - word1 = prefix - else: - word1 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word2 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word3 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word4 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word5 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word6 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word7 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word8 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word9 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word10 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word11 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word12 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word13 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word14 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word15 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word16 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word17 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word18 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word19 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word20 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word21 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word22 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word23 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word24 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - print " %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s " % (word1.rstrip(), word2.rstrip(), word3.rstrip(), word4.rstrip(), word5.rstrip(), word6.rstrip(), word7.rstrip(), word8.rstrip(), word9.rstrip(), word10.rstrip(), word11.rstrip(), word12.rstrip(), word13.rstrip(), word14.rstrip(), word15.rstrip(), word16.rstrip(), word17.rstrip(), word18.rstrip(), word19.rstrip(), word20.rstrip(), word21.rstrip(), word22.rstrip(), word23.rstrip(), word24.rstrip()) - - number -= 1 - - -def main(argv=None): - - number = 5 - prefix = False - - if argv is None: - argv = sys.argv - try: - try: - opts, args = getopt.getopt(argv[1:], "hn:p:i:vw:", ["help", "number=", "prefix=", "wordlist="]) - except getopt.error, msg: - raise Usage(msg) - - # option processing - for option, value in opts: - if option == "-v": - verbose = True - if option in ("-h", "--help"): - raise Usage(help_message) - if option in ("-n", "--number"): - number = int(value) - if option in ("-w", "--wordlist"): - global CODEWORDS - print "Importing: %s" % value - CODEWORDS = open(value, 'r').readlines() - if option in ("-p", "--prefixe"): - - print value - - if (value): - prefix = value - else: - prefix = 'TRUE' - - generate(prefix, number) - - except Usage, err: - print >> sys.stderr, sys.argv[0].split("/")[-1] + ": " + str(err.msg) - print >> sys.stderr, "\t for help use --help" - return 2 - - -if __name__ == "__main__": - sys.exit(main()) diff --git a/hash160.py b/hash160.py deleted file mode 100644 index 31ff32f..0000000 --- a/hash160.py +++ /dev/null @@ -1,13 +0,0 @@ -import sys -from bit.base58 import b58decode_check -from bit.utils import bytes_to_hex -def address_to_hash160(address): - address_bytes = b58decode_check(address) - address_hash160 = bytes_to_hex(address_bytes)[2:] - - return address_hash160 -with open('list.txt') as textfile: - for line in textfile: - s = (line.rstrip('\n')) - h160=address_to_hash160(s) - print(h160) diff --git a/generators/2.py b/scripts/generators/2.py similarity index 100% rename from generators/2.py rename to scripts/generators/2.py diff --git a/generators/3.py b/scripts/generators/3.py similarity index 100% rename from generators/3.py rename to scripts/generators/3.py diff --git a/brain12.py b/scripts/generators/brain12.py old mode 100644 new mode 100755 similarity index 100% rename from brain12.py rename to scripts/generators/brain12.py diff --git a/brain12words.py b/scripts/generators/brain12words.py old mode 100644 new mode 100755 similarity index 100% rename from brain12words.py rename to scripts/generators/brain12words.py diff --git a/brain24.py b/scripts/generators/brain24.py old mode 100644 new mode 100755 similarity index 100% rename from brain24.py rename to scripts/generators/brain24.py diff --git a/generators/generate12words.py b/scripts/generators/generate12words.py similarity index 100% rename from generators/generate12words.py rename to scripts/generators/generate12words.py diff --git a/generators/generate2words.py b/scripts/generators/generate2words.py similarity index 100% rename from generators/generate2words.py rename to scripts/generators/generate2words.py diff --git a/generators/generate3words.py b/scripts/generators/generate3words.py similarity index 100% rename from generators/generate3words.py rename to scripts/generators/generate3words.py diff --git a/generators/generate6words.py b/scripts/generators/generate6words.py similarity index 100% rename from generators/generate6words.py rename to scripts/generators/generate6words.py From a84b9846759bb4ef98a6a958aebaddc3ed36655f Mon Sep 17 00:00:00 2001 From: kenorb Date: Wed, 18 May 2022 16:59:20 -0500 Subject: [PATCH 21/40] Updates secp256k1 to fa57f1b --- secp256k1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/secp256k1 b/secp256k1 index 31994c8..fa57f1b 160000 --- a/secp256k1 +++ b/secp256k1 @@ -1 +1 @@ -Subproject commit 31994c8e5b8ec6693b2f8678b39d12d65c67067d +Subproject commit fa57f1bdf180dfa4d2bfc7bcd838f312f106713e From f3e2c653ddc751638bfeeb1796f1cb606f8a8fe6 Mon Sep 17 00:00:00 2001 From: kenorb Date: Wed, 18 May 2022 17:03:05 -0500 Subject: [PATCH 22/40] Updates secp256k1 to ab31a52 --- ec_pubkey_fast.c | 10 +++++----- secp256k1 | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ec_pubkey_fast.c b/ec_pubkey_fast.c index 64cc79f..c480062 100644 --- a/ec_pubkey_fast.c +++ b/ec_pubkey_fast.c @@ -146,7 +146,7 @@ int secp256k1_ec_pubkey_precomp_table(int window_size, unsigned char *filename) secp256k1_gej_add_var(&numsbase, &numsbase, &nums_gej, NULL); } } - secp256k1_ge_set_all_gej_var(n_windows*n_values, prec, table, 0); + secp256k1_ge_set_all_gej_var(prec, table, n_windows*n_values, 0); free(table); return 0; @@ -313,13 +313,13 @@ int secp256k1_ec_pubkey_batch_init(unsigned int num) { } } -void secp256k1_ge_set_all_gej_static(int num, secp256k1_ge *batchpa, secp256k1_gej *batchpj) { +void secp256k1_ge_set_all_gej_static(secp256k1_ge *batchpa, secp256k1_gej *batchpj, int num) { size_t i; for (i = 0; i < num; i++) { batchaz[i] = batchpj[i].z; } - secp256k1_fe_inv_all_var(num, batchai, batchaz); + secp256k1_fe_inv_all_var(batchai, batchaz, num); for (i = 0; i < num; i++) { secp256k1_ge_set_gej_zinv(&batchpa[i], &batchpj[i], &batchai[i]); @@ -370,7 +370,7 @@ int secp256k1_ec_pubkey_batch_incr(unsigned int num, unsigned int skip, unsigned } /* convert all jacobian coordinates to affine */ - secp256k1_ge_set_all_gej_static(num, batchpa, batchpj); + secp256k1_ge_set_all_gej_static(batchpa, batchpj, num); /* write out formatted public key */ for (i = 0; i < num; ++i) { @@ -399,7 +399,7 @@ int secp256k1_ec_pubkey_batch_create(unsigned int num, unsigned char (*pub)[65], } /* convert all jacobian coordinates to affine */ - secp256k1_ge_set_all_gej_static(num, batchpa, batchpj); + secp256k1_ge_set_all_gej_static(batchpa, batchpj, num); /* write out formatted public key */ for (i = 0; i < num; ++i) { diff --git a/secp256k1 b/secp256k1 index fa57f1b..ab31a52 160000 --- a/secp256k1 +++ b/secp256k1 @@ -1 +1 @@ -Subproject commit fa57f1bdf180dfa4d2bfc7bcd838f312f106713e +Subproject commit ab31a524b407372e4842347f80e5c975363c441d From 9de06aa7603576fa065bdf74e1bcf3d2b60b9cf1 Mon Sep 17 00:00:00 2001 From: kenorb Date: Thu, 19 May 2022 05:16:51 -0500 Subject: [PATCH 23/40] Updates secp256k1 to cac7c55 --- secp256k1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/secp256k1 b/secp256k1 index ab31a52..cac7c55 160000 --- a/secp256k1 +++ b/secp256k1 @@ -1 +1 @@ -Subproject commit ab31a524b407372e4842347f80e5c975363c441d +Subproject commit cac7c5559da67ddc0bdafefc95eb0097f5ecba33 From 56af7ec42d9d5e3328426988347804787b122374 Mon Sep 17 00:00:00 2001 From: kenorb Date: Thu, 19 May 2022 05:19:13 -0500 Subject: [PATCH 24/40] Updates secp256k1 to c77fc08 --- secp256k1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/secp256k1 b/secp256k1 index cac7c55..c77fc08 160000 --- a/secp256k1 +++ b/secp256k1 @@ -1 +1 @@ -Subproject commit cac7c5559da67ddc0bdafefc95eb0097f5ecba33 +Subproject commit c77fc08597960d662eb0df9e4c670c31bdeb227e From bd60706bb2e436bd93fcbc0c34296653aa4c8e5a Mon Sep 17 00:00:00 2001 From: kenorb Date: Thu, 19 May 2022 05:21:55 -0500 Subject: [PATCH 25/40] Updates secp256k1 to 9bc2e26 --- Makefile | 2 +- secp256k1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 5b2907b..28e8185 100644 --- a/Makefile +++ b/Makefile @@ -43,7 +43,7 @@ algo/brainwalletio.o: algo/brainwalletio.c scrypt-jane/scrypt-jane.h algo/brainv2.o: algo/brainv2.c scrypt-jane/scrypt-jane.h ec_pubkey_fast.o: ec_pubkey_fast.c secp256k1/include/secp256k1.h - $(COMPILE) -Wno-unused-function -c $< -o $@ + $(COMPILE) -Wno-unused-function -c $< -o $@ -I secp256k1 %.o: %.c $(COMPILE) -c $< -o $@ diff --git a/secp256k1 b/secp256k1 index c77fc08..9bc2e26 160000 --- a/secp256k1 +++ b/secp256k1 @@ -1 +1 @@ -Subproject commit c77fc08597960d662eb0df9e4c670c31bdeb227e +Subproject commit 9bc2e26502fa543db168f253f3b33bf7064bafde From cc86343eba83736b4e7c3954ef0e04ff41af27e5 Mon Sep 17 00:00:00 2001 From: kenorb Date: Thu, 19 May 2022 05:30:40 -0500 Subject: [PATCH 26/40] Updates secp256k1 to 4d01bc2 --- ec_pubkey_fast.c | 2 +- secp256k1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ec_pubkey_fast.c b/ec_pubkey_fast.c index c480062..eb540a8 100644 --- a/ec_pubkey_fast.c +++ b/ec_pubkey_fast.c @@ -146,7 +146,7 @@ int secp256k1_ec_pubkey_precomp_table(int window_size, unsigned char *filename) secp256k1_gej_add_var(&numsbase, &numsbase, &nums_gej, NULL); } } - secp256k1_ge_set_all_gej_var(prec, table, n_windows*n_values, 0); + secp256k1_ge_set_all_gej_var(prec, table, n_windows*n_values); free(table); return 0; diff --git a/secp256k1 b/secp256k1 index 9bc2e26..4d01bc2 160000 --- a/secp256k1 +++ b/secp256k1 @@ -1 +1 @@ -Subproject commit 9bc2e26502fa543db168f253f3b33bf7064bafde +Subproject commit 4d01bc2d9cae4cb9d12b021a59640e72f1ee1e68 From 44876eae4cecc6461b2ce54026cab41bfc6940ee Mon Sep 17 00:00:00 2001 From: kenorb Date: Thu, 19 May 2022 05:40:41 -0500 Subject: [PATCH 27/40] Updates secp256k1 to 91fae3a --- secp256k1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/secp256k1 b/secp256k1 index 4d01bc2..91fae3a 160000 --- a/secp256k1 +++ b/secp256k1 @@ -1 +1 @@ -Subproject commit 4d01bc2d9cae4cb9d12b021a59640e72f1ee1e68 +Subproject commit 91fae3ace0291b144b27fd8bbda509042f5400f1 From 8288b5eff41181fcccfc87bc79850a62edf84198 Mon Sep 17 00:00:00 2001 From: kenorb Date: Thu, 19 May 2022 05:42:54 -0500 Subject: [PATCH 28/40] Updates secp256k1 to acb7f97 --- secp256k1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/secp256k1 b/secp256k1 index 91fae3a..acb7f97 160000 --- a/secp256k1 +++ b/secp256k1 @@ -1 +1 @@ -Subproject commit 91fae3ace0291b144b27fd8bbda509042f5400f1 +Subproject commit acb7f97eb82dfbbdb797354e1550b910055b4422 From 773b10b12e0cc235a3425a79086b77bed5d58e0e Mon Sep 17 00:00:00 2001 From: kenorb Date: Wed, 15 Jun 2022 01:14:40 +0100 Subject: [PATCH 29/40] Increases BATCH_MAX to 4096*2 --- brainflayer.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/brainflayer.c b/brainflayer.c index fc0d702..c18842e 100644 --- a/brainflayer.c +++ b/brainflayer.c @@ -33,7 +33,7 @@ #include "algo/sha3.h" // raise this if you really want, but quickly diminishing returns -#define BATCH_MAX 4096 +#define BATCH_MAX 4096*2 // Number of supported bloom files. #define BOPT_MAX 10 @@ -703,7 +703,9 @@ int main(int argc, char **argv) { snprintf(modestr, sizeof(modestr), xopt ? "(hex)%s" : "%s", topt); if (boptn > 0) { - printf("Loading... "); + if (vopt) { + printf("Loading... "); + } for (int i = 0; i < boptn; i++) { if (vopt) { fprintf(stdout, "%s... ", bopts[i]); From bb57b391391fa04053100a8aa3df057be12769f3 Mon Sep 17 00:00:00 2001 From: kenorb Date: Wed, 15 Jun 2022 01:17:19 +0100 Subject: [PATCH 30/40] Increases BATCH_MAX to 4096*4 --- brainflayer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/brainflayer.c b/brainflayer.c index c18842e..d99cb14 100644 --- a/brainflayer.c +++ b/brainflayer.c @@ -33,7 +33,7 @@ #include "algo/sha3.h" // raise this if you really want, but quickly diminishing returns -#define BATCH_MAX 4096*2 +#define BATCH_MAX 4096*4 // Number of supported bloom files. #define BOPT_MAX 10 From c1be40a3348954220429da66e382345afdbc649a Mon Sep 17 00:00:00 2001 From: kenorb Date: Wed, 15 Jun 2022 02:20:39 +0100 Subject: [PATCH 31/40] Increases BATCH_MAX to 4096*6 --- brainflayer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/brainflayer.c b/brainflayer.c index d99cb14..43d9c18 100644 --- a/brainflayer.c +++ b/brainflayer.c @@ -33,7 +33,7 @@ #include "algo/sha3.h" // raise this if you really want, but quickly diminishing returns -#define BATCH_MAX 4096*4 +#define BATCH_MAX 4096*6 // Number of supported bloom files. #define BOPT_MAX 10 From 23dd7b5770ca50fcb13c4fb22dee19026432ad45 Mon Sep 17 00:00:00 2001 From: kenorb Date: Wed, 15 Jun 2022 02:25:11 +0100 Subject: [PATCH 32/40] Increases BATCH_MAX to 4096*8 --- brainflayer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/brainflayer.c b/brainflayer.c index 43d9c18..8377394 100644 --- a/brainflayer.c +++ b/brainflayer.c @@ -33,7 +33,7 @@ #include "algo/sha3.h" // raise this if you really want, but quickly diminishing returns -#define BATCH_MAX 4096*6 +#define BATCH_MAX 4096*8 // Number of supported bloom files. #define BOPT_MAX 10 From 2b0f1b66e4752291fc18e33bf7dec545fa14ec71 Mon Sep 17 00:00:00 2001 From: kenorb Date: Wed, 15 Jun 2022 15:10:24 +0100 Subject: [PATCH 33/40] Increases BATCH_MAX to 4096*10 --- brainflayer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/brainflayer.c b/brainflayer.c index 8377394..1e22e62 100644 --- a/brainflayer.c +++ b/brainflayer.c @@ -33,7 +33,7 @@ #include "algo/sha3.h" // raise this if you really want, but quickly diminishing returns -#define BATCH_MAX 4096*8 +#define BATCH_MAX 4096*10 // Number of supported bloom files. #define BOPT_MAX 10 From 0ac5c3a2af6b48a32a84ef93976e3400e2c99222 Mon Sep 17 00:00:00 2001 From: kenorb Date: Wed, 15 Jun 2022 15:15:21 +0100 Subject: [PATCH 34/40] Increases BATCH_MAX to 4096*12 --- brainflayer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/brainflayer.c b/brainflayer.c index 1e22e62..50caf33 100644 --- a/brainflayer.c +++ b/brainflayer.c @@ -33,7 +33,7 @@ #include "algo/sha3.h" // raise this if you really want, but quickly diminishing returns -#define BATCH_MAX 4096*10 +#define BATCH_MAX 4096*12 // Number of supported bloom files. #define BOPT_MAX 10 From 4d679115c7790cdc8554307d063a81e125e6f379 Mon Sep 17 00:00:00 2001 From: kenorb Date: Wed, 15 Jun 2022 17:35:26 +0100 Subject: [PATCH 35/40] Increases BATCH_MAX to 4096*14 --- brainflayer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/brainflayer.c b/brainflayer.c index 50caf33..f7f32d1 100644 --- a/brainflayer.c +++ b/brainflayer.c @@ -33,7 +33,7 @@ #include "algo/sha3.h" // raise this if you really want, but quickly diminishing returns -#define BATCH_MAX 4096*12 +#define BATCH_MAX 4096*14 // Number of supported bloom files. #define BOPT_MAX 10 From b55a375e1edcb5b544c09b9a993713153ae41ece Mon Sep 17 00:00:00 2001 From: kenorb Date: Wed, 15 Jun 2022 21:39:51 +0100 Subject: [PATCH 36/40] Sets window size to 19 by default --- brainflayer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/brainflayer.c b/brainflayer.c index f7f32d1..985802d 100644 --- a/brainflayer.c +++ b/brainflayer.c @@ -389,7 +389,7 @@ void usage(unsigned char *name) { -B batch size for affine transformations\n\ must be a power of 2 (default/max: %d)\n\ -N number of SHA rounds (used only in '-t shaxn' mode)\n\ - -w WINDOW_SIZE window size for ecmult table (default: 18)\n\ + -w WINDOW_SIZE window size for ecmult table (default: 19)\n\ uses about 3 * 2^w KiB memory on startup, but\n\ only about 2^w KiB once the table is built\n\ -m FILE load ecmult table from FILE\n\ @@ -419,7 +419,7 @@ int main(int argc, char **argv) { unsigned char modestr[64]; - int spok = 0, aopt = 0, boptn = 0, vopt = 0, wopt = 18, xopt = 0; + int spok = 0, aopt = 0, boptn = 0, vopt = 0, wopt = 19, xopt = 0; int nopt_mod = 0, nopt_rem = 0, Bopt = 0, Copt = 0, Nopt = 2; uint64_t kopt = 0; unsigned char *bopts[BOPT_MAX]; From 12f76e3bc782fdd257de0e0123d0e129e9ed74ae Mon Sep 17 00:00:00 2001 From: dclavijo Date: Mon, 8 Jan 2024 18:22:16 -0300 Subject: [PATCH 37/40] 1GB bloom filter, clean up --- 2.py | 14 - 3.py | 91 -- bloom.c | 5 + bloom.h | 12 +- brain12.py | 98 --- brain12words.py | 103 --- brain24.py | 110 --- brainflayer.c | 5 + defcoin_stealme.hex | 809 ------------------ electrum-mnemonic-1626.txt | 1626 ------------------------------------ example.hex | 20 - generate12words.py | 99 --- generate2words.py | 90 -- generate3words.py | 91 -- generate6words.py | 93 --- generators/2.py | 2 +- hash160.py | 13 - hex2blf.c | 4 +- scripts/hash160.py | 4 +- 19 files changed, 25 insertions(+), 3264 deletions(-) delete mode 100644 2.py delete mode 100644 3.py delete mode 100644 brain12.py delete mode 100644 brain12words.py delete mode 100644 brain24.py delete mode 100644 defcoin_stealme.hex delete mode 100644 electrum-mnemonic-1626.txt delete mode 100644 example.hex delete mode 100644 generate12words.py delete mode 100644 generate2words.py delete mode 100644 generate3words.py delete mode 100644 generate6words.py delete mode 100644 hash160.py diff --git a/2.py b/2.py deleted file mode 100644 index 28ff344..0000000 --- a/2.py +++ /dev/null @@ -1,14 +0,0 @@ -import line - -ids = {} -found = [] -with open("wordlist.txt") as file1: - for line in file1.lines(): - id_ = line.split()[0] - ids[id_] = line - -with open("base") as file2: - for line in file2.lines(): - id_ = line.split()[0] - if id_ in ids: - found.append("{} {}".format(ids[id_], line)) diff --git a/3.py b/3.py deleted file mode 100644 index 9934ffc..0000000 --- a/3.py +++ /dev/null @@ -1,91 +0,0 @@ -#!/usr/bin/env python -# encoding: utf-8 -""" -code_phrase_geneator.py - -#Created by Scott Roberts. -#Copyright (c) 2011 TogaFoamParty Studios. All rights reserved. - -# Updated to use Bip39 by TheRealLordFractal 2019 - -""" - -import sys -import getopt -import random - - -help_message = ''' -Code Phrase Generator --n or --number : Number of sample code phrases given. (Default is 5) --p or --prefix : Uses a prefix word along with a random codeword instead of two codewords. --w or --wordlist : Uses another wordlist to generate code phrases from. -''' - -CODEWORDS = open('wordlist.txt', 'r').readlines() - - -class Usage(Exception): - def __init__(self, msg): - self.msg = msg - -def generate(prefix=False, number=5): - while number > 0: - if prefix == 'TRUE': - word1 = PREFIXES[int(random.uniform(0,len(PREFIXES)))] - elif prefix: - word1 = prefix - else: - word1 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - - word2 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word3 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - print "%s%s%s" % (word1.rstrip(), word2.rstrip(), word3.rstrip()) - - number -= 1 - - -def main(argv=None): - - number = 5 - prefix = False - - if argv is None: - argv = sys.argv - try: - try: - opts, args = getopt.getopt(argv[1:], "hn:p:i:vw:", ["help", "number=", "prefix=", "wordlist="]) - except getopt.error, msg: - raise Usage(msg) - - # option processing - for option, value in opts: - if option == "-v": - verbose = True - if option in ("-h", "--help"): - raise Usage(help_message) - if option in ("-n", "--number"): - number = int(value) - if option in ("-w", "--wordlist"): - global CODEWORDS - print "Importing: %s" % value - CODEWORDS = open(value, 'r').readlines() - if option in ("-p", "--prefixe"): - - print value - - if (value): - prefix = value - else: - prefix = 'TRUE' - - generate(prefix, number) - - except Usage, err: - print >> sys.stderr, sys.argv[0].split("/")[-1] + ": " + str(err.msg) - print >> sys.stderr, "\t for help use --help" - return 2 - - -if __name__ == "__main__": - sys.exit(main()) diff --git a/bloom.c b/bloom.c index 7d863a9..f9668cc 100644 --- a/bloom.c +++ b/bloom.c @@ -34,6 +34,11 @@ void bloom_set_hash160(unsigned char *bloom, uint32_t *h) { t = BH17(h); BLOOM_SET_BIT(t); t = BH18(h); BLOOM_SET_BIT(t); t = BH19(h); BLOOM_SET_BIT(t); + t = BH20(h); BLOOM_SET_BIT(t); + t = BH21(h); BLOOM_SET_BIT(t); + t = BH22(h); BLOOM_SET_BIT(t); + t = BH23(h); BLOOM_SET_BIT(t); + t = BH24(h); BLOOM_SET_BIT(t); } /* diff --git a/bloom.h b/bloom.h index 4f2368a..d3cfa24 100644 --- a/bloom.h +++ b/bloom.h @@ -5,7 +5,7 @@ #include /* 2^32 bits */ -#define BLOOM_SIZE (512*1024*1024) +#define BLOOM_SIZE (512*1024*1024*2) #define BLOOM_SET_BIT(N) (bloom[(N)>>3] = bloom[(N)>>3] | (1<<((N)&7))) #define BLOOM_GET_BIT(N) ( ( bloom[(N)>>3]>>((N)&7) )&1) @@ -33,6 +33,11 @@ #define BH17(N) (N[2]<<24|N[3]>> 8) #define BH18(N) (N[3]<<24|N[4]>> 8) #define BH19(N) (N[4]<<24|N[0]>> 8) +#define BH20(N) (N[0]<<16|N[1]>>24) +#define BH21(N) (N[1]<<16|N[2]>>24) +#define BH22(N) (N[2]<<16|N[3]>>24) +#define BH23(N) (N[3]<<16|N[4]>>24) +#define BH24(N) (N[4]<<16|N[0]>>24) void bloom_set_hash160(unsigned char *, uint32_t *); #pragma GCC diagnostic ignored "-Wunused-function" @@ -58,6 +63,11 @@ static unsigned int bloom_chk_hash160(unsigned char *bloom, uint32_t *h) { t = BH17(h); if (BLOOM_GET_BIT(t) == 0) { return 0; } t = BH18(h); if (BLOOM_GET_BIT(t) == 0) { return 0; } t = BH19(h); if (BLOOM_GET_BIT(t) == 0) { return 0; } + t = BH20(h); if (BLOOM_GET_BIT(t) == 0) { return 0; } + t = BH21(h); if (BLOOM_GET_BIT(t) == 0) { return 0; } + t = BH22(h); if (BLOOM_GET_BIT(t) == 0) { return 0; } + t = BH23(h); if (BLOOM_GET_BIT(t) == 0) { return 0; } + t = BH24(h); if (BLOOM_GET_BIT(t) == 0) { return 0; } return 1; } #pragma GCC diagnostic pop diff --git a/brain12.py b/brain12.py deleted file mode 100644 index 3984de9..0000000 --- a/brain12.py +++ /dev/null @@ -1,98 +0,0 @@ -#!/usr/bin/env python -# encoding: utf-8 -""" - - -# Bip39 by TheRealLordFractal 2019 - -""" - -import sys -import getopt -import random - -#sys.stdout = open('output.txt','wt') - -help_message = ''' -Bip39 12 Word Random Generator By TheRealLordFractal -Output File Saved as 12words.txt -Command Exntensions: --n or --number : Number of sample code phrases given. (Default is 5) --w or --wordlist : Uses another wordlist to generate code phrases from. -''' - -CODEWORDS = open('wordlist.txt', 'r').readlines() - -class Usage(Exception): - def __init__(self, msg): - self.msg = msg - -def generate(prefix=False, number=5): - while number > 0: - if prefix == 'TRUE': - print ("Not Supported.") - # word1 = PREFIXES[int(random.uniform(0,len(PREFIXES)))] - elif prefix: - word1 = prefix - else: - word1 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word2 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word3 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word4 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word5 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word6 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word7 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word8 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word9 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word10 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word11 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word12 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - print " %s %s %s %s %s %s %s %s %s %s %s %s " % (word1.rstrip(), word2.rstrip(), word3.rstrip(), word4.rstrip(), word5.rstrip(), word6.rstrip(), word7.rstrip(), word8.rstrip(), word9.rstrip(), word10.rstrip(), word11.rstrip(), word12.rstrip()) - - number -= 1 - - -def main(argv=None): - - number = 5 - prefix = False - - if argv is None: - argv = sys.argv - try: - try: - opts, args = getopt.getopt(argv[1:], "hn:p:i:vw:", ["help", "number=", "prefix=", "wordlist="]) - except getopt.error, msg: - raise Usage(msg) - - # option processing - for option, value in opts: - if option == "-v": - verbose = True - if option in ("-h", "--help"): - raise Usage(help_message) - if option in ("-n", "--number"): - number = int(value) - if option in ("-w", "--wordlist"): - global CODEWORDS - print "Importing: %s" % value - CODEWORDS = open(value, 'r').readlines() - if option in ("-p", "--prefixe"): - - print value - - if (value): - prefix = value - else: - prefix = 'TRUE' - - generate(prefix, number) - - except Usage, err: - print >> sys.stderr, sys.argv[0].split("/")[-1] + ": " + str(err.msg) - print >> sys.stderr, "\t for help use --help" - return 2 - - -if __name__ == "__main__": - sys.exit(main()) diff --git a/brain12words.py b/brain12words.py deleted file mode 100644 index 85d4596..0000000 --- a/brain12words.py +++ /dev/null @@ -1,103 +0,0 @@ -#!/usr/bin/env python -# encoding: utf-8 -""" - - -# Bip39 by TheRealLordFractal 2019 -# Updated by OguzDelioglu 2021 - -""" - -import sys -import getopt -import random - -help_message = ''' -Bip39 12 Word Random Generator By TheRealLordFractal -Output File Saved as 12words.txt -Command Exntensions: --n or --number : Number of sample code phrases given. (Default is 5) --w or --wordlist : Uses another wordlist to generate code phrases from. -''' - -CODEWORDS = open('wordlist.txt', 'r').readlines() - - -class Usage(Exception): - def __init__(self, msg): - self.msg = msg - - -def generate(prefix=False, number=5, lengthCount=12, isSpace=True): - while number > 0: - laststring = list() - if prefix == 'TRUE': - print("Not Supported.") - # word1 = PREFIXES[int(random.uniform(0,len(PREFIXES)))] - elif prefix: - laststring = prefix - else: - for x in range(lengthCount): - laststring.append( - CODEWORDS[int(random.uniform(0, len(CODEWORDS)))].rstrip()) - - if isSpace: - # print(" " + " ".join(laststring) + " ") - print(" ".join(laststring)) - else: - # print(" " + "".join(laststring) + " ") - print("".join(laststring)) - - number -= 1 - - -def main(argv=None): - isSpace = True - number = 5 - prefix = False - lengthCount = 1 - - if argv is None: - argv = sys.argv - try: - try: - opts, args = getopt.getopt(argv[1:], "hn:p:i:vw:l:s", [ - "help", "number=", "prefix=", "wordlist=", "length=", "nospace"]) - except getopt.error, msg: - raise Usage(msg) - - # option processing - for option, value in opts: - if option == "-v": - verbose = True - if option in ("-h", "--help"): - raise Usage(help_message) - if option in ("-n", "--number"): - number = int(value) - if option in ("-w", "--wordlist"): - global CODEWORDS - print "Importing: %s" % value - CODEWORDS = open(value, 'r').readlines() - if option in ("-s", "--nospace"): - isSpace = False - if option in ("-l", "--length"): - lengthCount = int(value) - if option in ("-p", "--prefixe"): - - print value - - if (value): - prefix = value - else: - prefix = 'TRUE' - - generate(prefix, number, lengthCount, isSpace) - - except Usage, err: - print >> sys.stderr, sys.argv[0].split("/")[-1] + ": " + str(err.msg) - print >> sys.stderr, "\t for help use --help" - return 2 - - -if __name__ == "__main__": - sys.exit(main()) diff --git a/brain24.py b/brain24.py deleted file mode 100644 index f9b0f17..0000000 --- a/brain24.py +++ /dev/null @@ -1,110 +0,0 @@ -#!/usr/bin/env python -# encoding: utf-8 -""" - - -# Bip39 by TheRealLordFractal 2019 - -""" - -import sys -import getopt -import random - -#sys.stdout = open('output.txt','wt') - -help_message = ''' -Bip39 24 Word Random Generator By TheRealLordFractal -Output File Saved as 24words.txt -Command Exntensions: --n or --number : Number of sample code phrases given. (Default is 5) --w or --wordlist : Uses another wordlist to generate code phrases from. -''' - -CODEWORDS = open('wordlist.txt', 'r').readlines() - -class Usage(Exception): - def __init__(self, msg): - self.msg = msg - -def generate(prefix=False, number=5): - while number > 0: - if prefix == 'TRUE': - print ("Not Supported.") - # word1 = PREFIXES[int(random.uniform(0,len(PREFIXES)))] - elif prefix: - word1 = prefix - else: - word1 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word2 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word3 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word4 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word5 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word6 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word7 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word8 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word9 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word10 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word11 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word12 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word13 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word14 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word15 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word16 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word17 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word18 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word19 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word20 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word21 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word22 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word23 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word24 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - print " %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s " % (word1.rstrip(), word2.rstrip(), word3.rstrip(), word4.rstrip(), word5.rstrip(), word6.rstrip(), word7.rstrip(), word8.rstrip(), word9.rstrip(), word10.rstrip(), word11.rstrip(), word12.rstrip(), word13.rstrip(), word14.rstrip(), word15.rstrip(), word16.rstrip(), word17.rstrip(), word18.rstrip(), word19.rstrip(), word20.rstrip(), word21.rstrip(), word22.rstrip(), word23.rstrip(), word24.rstrip()) - - number -= 1 - - -def main(argv=None): - - number = 5 - prefix = False - - if argv is None: - argv = sys.argv - try: - try: - opts, args = getopt.getopt(argv[1:], "hn:p:i:vw:", ["help", "number=", "prefix=", "wordlist="]) - except getopt.error, msg: - raise Usage(msg) - - # option processing - for option, value in opts: - if option == "-v": - verbose = True - if option in ("-h", "--help"): - raise Usage(help_message) - if option in ("-n", "--number"): - number = int(value) - if option in ("-w", "--wordlist"): - global CODEWORDS - print "Importing: %s" % value - CODEWORDS = open(value, 'r').readlines() - if option in ("-p", "--prefixe"): - - print value - - if (value): - prefix = value - else: - prefix = 'TRUE' - - generate(prefix, number) - - except Usage, err: - print >> sys.stderr, sys.argv[0].split("/")[-1] + ": " + str(err.msg) - print >> sys.stderr, "\t for help use --help" - return 2 - - -if __name__ == "__main__": - sys.exit(main()) diff --git a/brainflayer.c b/brainflayer.c index 38a6ef9..75641cd 100644 --- a/brainflayer.c +++ b/brainflayer.c @@ -819,6 +819,11 @@ int main(int argc, char **argv) { bit = BH17(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } bit = BH18(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } bit = BH19(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } + bit = BH20(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } + bit = BH21(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } + bit = BH22(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } + bit = BH23(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } + bit = BH24(hash160.ul); if (BLOOM_GET_BIT(bit) == 0) { continue; } if (!fopt || hsearchf(ffile, &hash160)) { if (tty) { fprintf(ofile, "\033[0K"); } diff --git a/defcoin_stealme.hex b/defcoin_stealme.hex deleted file mode 100644 index d9a4564..0000000 --- a/defcoin_stealme.hex +++ /dev/null @@ -1,809 +0,0 @@ -00e6f473c1c52ad61eaefc73d6f42ca550c06a04 -01372f20dbb6a92d46349818580eda03b280d9db -0179a1bbc995774106904039c859818274ca1c5a -01a8c414c028008da6421afd421ca5a38a84671c -022cb6a86266fd1361f227d198c5d205b123faea -02509dbaa894d3daff62ba77406718f1776ecea5 -025e9917dcc77778836f5dbff2eea0c675a12007 -02ac0e56cbd8072e9292de70bce0e09fd7d9501a -03507f87273aa1dac2200d70682594728efd720a -03c177933c53fb950811e2d7f29fa69a532b6f2f -0420764fcbb151f9d75edeff6757c5b41286a6ce -047f6de5ccd1ba98e8816e687e05c59bb53d0352 -0490f558ea069ef423225b0055f694b2512a6ad3 -04b327dd99d53f8571629afa93bd2526e891d99e -04bc95637271af4e65fbd6a73addd1ee7806efff -04ebffa6cec65543d4807eea8ca0c9e3e70bf84d -0534870eba91271f8bf2894e19d978ab29e31ea2 -0539868cefa38981f3f26a9f0872d45cbd644a79 -053e40bc4ef717a32d8ebe34f36fe521c0bd2946 -05e3eeeb2e56c13be51d7e9a2234384405a2e315 -066372810addb49b0f78bc174f2eb324a2dc0961 -0668c6388a8e269b1dd49968156923feeae76651 -06bea9ccc9c91025ebb61d683314122992b864fa -06d420fb593d00fc556cee76b5d1348690d3d798 -073062435dfd5bf69413d34169342cd04b332a4b -076bc465ff838e9ab5cbd0fa4d61bcbb0dab5c10 -079cb92a1b39961d2a03b75d18451633ef6a395a -07ee7d3cdd32ffbeb68d2b52d756fba09bd89664 -081ee7e2c422e03ef90ec0b53f7a530e9ffb50c7 -0853726dff11f3eadbd9d2b032904b50ef3754ce -08aa763483db7347c44036d8b6631c3459118fe1 -090a66ac072e1c4f33ddaf0495a4dec5612c4809 -0914c647d240d302de0185515ad9805cc68653ae -093b90a5e8a38655314c12165ad2535103641e8e -0984f33ac268f64146cd4fb042303041d3d9ac64 -09aa9b6478551d1fddcbf1a4a8a4f683463508cb -09d12abc2071b59f7dc2694079b408cbef910e3b -0b1cd22a90e63524cd2eeb95e39f770a09fde88b -0b7bcb242fbdaa9d44ea754b7804f5ca8f1d667f -0b88cfd7afea98b4570c8d9bfb25676e7c487c85 -0be9ae2920caf514caea59fa6a472a80b74b6bdc -0bea0946a89aa9e87184dad39e8ca1316cbdf238 -0c2a513c5da77310eeb8d58e10827411df26a9c9 -0cb848ecd1e680f493a69db1271d5f18e01c7b43 -0d62ced203f0b79f291046e32e4d51da0f34e5f1 -0ede2b20c9e8a71596809d83ca5874e49da830c5 -0f2fae2939bd891f3ee609048e874bf75abdd3dd -0f650c09c0a0ccf0d28348fd8bbdee9f0a68df5e -0f8543f224ff25a2a27cae2f125dbfc4ab21aa65 -1139fea84cd43c6372d8b5a4bd49b61539a815c1 -11404d189ec2a52c6d505a3e967eabae0e664428 -11e060143a0fab08e1477d17f37a48105bf7df77 -123aa174436d0f97da70f5559d69649fe0c4ec4b -12a165603df0e574310f6fd7101559f8d1c71f6b -12e7b7e853c5787678cc05e5a39ac7feb5e2a2ae -13588a15e52a03eb5e24069eb20555afad5fda2a -1462b119f26c1f118acff8c55af7adc5389cebe3 -14789ff03f7880ec4dd65d26b98516db33eadb74 -154caccc5e35273819713f59c5acd5de9fa9226b -1576e2779c188f66b7cb8942ed166b33eceeec36 -157d44238651db024829cffdd228a10e4dd5f395 -159f3b6d88c24e61b156bc7fa60fd81eaffa6856 -15e40f0c5a3443e823973d6a50e144447f87700c -15fce0f424a6c6c89fe954457b5befaefb156e19 -161dc0f9db1f5bd7635ba0ad3db31bde7bfb0b0f -16ef970070b000dc5f84fc279c09c79d167e3ee2 -172b3ee412e6866af98efb5e6b8b03386c04065a -1797c7a7c7434ddbf3d773565ab8581b614942f9 -18a606c1fe357ebfa1aa431defe666e90a131791 -18dc10bc5420937814fa29b0509010c04d799955 -193ca64b16bc2acb2bf49b6c76cf2709cdf707a0 -19758bf1ca202721e116eef6e68ff15707ed2316 -1aba81fb0cb4338657885d80c81fd6f41e4cd47e -1abc81ae2964c8966c9e9effee5d08636f98e65e -1ac0499eec8b69fe360119ceecfb841602d91df3 -1ad91e1a2345cf7bee95147549a28f84ec7a3f34 -1b2c1f0e15a30ebf64e027b3fed22a02b04a9809 -1bd51ae16a9e29903854347d8195a9e30e413e4f -1c067d4af11c8b82f21cc53b86558ed8e16c7288 -1c334d915c79d3e68fb151a8f4f188ddb0d92a2a -1c3e7526d10df06477bcc6f22a4152da206aaf3a -1cfceb6c75ccf0216dfee4906046cdbeae0ff96b -1cfe2a42113a35d320710690aed73224e7cd4ba1 -1dbc5b79f3c124b677c40f5e4b0ac8146b0453a5 -1dda96140d0489fb2b36e81350719a877d9fc7cf -1e315ed274d28a13ec03873375988f66dfbbc217 -1e7270fd075dda3659a64b36c1adcf26fa3d7f3a -1e914b0fd0fc6cf6cce773fd15f17558cee6d14a -1f0b0c7b4de6887fb1591654aefd7df43b2c90af -1f4706b12bcbb68ed9559de38d209a56714fc61f -1fabcb3ee8089ead8fe58d45d781a30f984cbcbe -1fc1ebe95a6b7e3ef64e696ff0a5dc54207d7b03 -1fd994d273715b2a55f2cc3cba6c3b04d2f42be8 -1ff5d20ba056dcaa8d3e400c1b9364bea02dc3f4 -200b8bb3af7320333159ecc372b3f41531f68965 -20cec110442a246118dadd70f850bb141d2ce88a -2175851cae31babeeb8f4b18a16f20453a0cec01 -21a7885db1e15294c6df4d34d15208ad29aed760 -2291cbefbe64e1f56b1f683cbd20623b85fb5de2 -2293bc1fa536821fb0218aebc64a977a12b90ee2 -22ae9954aa907f10ba9097855003dbc9d9dd673c -230d49e89cbc6a5f7ccef0c3cae073b9074dbb70 -23d85b3c0ca03c2ccd5f8fd9eb7f456ea9c096cc -243e7645b71cd8e4abe211945db80e5366eb7c82 -245c55b17a0a47af6a7871a905f6adccd1ff0e8a -2488d4c931668918d63a626372afe5978e4de6a6 -249ee47eac700366454b3a9d3d8841ca24eb98c2 -24e71c023ba6feb6ec131aee64634f7ebb20e02f -25051aa1a443c134bae9ba30ec0bc7c44be6cd06 -257e0a9f7077f588c9bd5865b544dc684ffcad9e -25e1bf1ddb81da4a364e5d450f9261cd3daaa74e -26e8d9a06f5e3a056b5616c20720aec925987c70 -275fb74c48ec37a087456cfe90e27d95a7cff883 -27ecbe317af4dbbca0670e135741ca188bfa7ae7 -2817d4408cb526b5b1afd2a1d4fceee63ed79503 -284138715e7e003671117fb2ebeafbe9b9d590f5 -2864f2df2ab4cc069a89c25fd1314bad92ad64ed -28b12f46afcc386fc3f28a8a3003fb586a7c0d42 -2941b701f8e30637037127eb1b0c785729c58501 -299232fda4b47319d6f63bfeae04a21a930409b0 -2a44a71fc500f66888087cc4bb6a20026c44030b -2a6490c6b082da30933d6d44779b914050adead6 -2b430c2355b36af9334a964184b0bf3e4ed5fb86 -2b4fd79a8d3f1abc5d1d65515c7184cff2c2aa2b -2bc21635b4fdfbb519a180e37ea76874fa5c0661 -2c0b3e4ce4475049baab91d6b9df7136c7c7bdd0 -2c3d3176e612499c2aa063641e8cf74802886b94 -2d1b911d15e5c09ae9e8a50978a4541c6cc514d9 -2dee3cd4286abd40aa1241ca4eb6e90a77243967 -2e1632cdd3a4386e8e630142c5330afe8487de66 -2e507dbfff0da7c2a1011a07622e720fe5e1d66b -2ec6c7695b0a3356857789a73487b30e80906241 -2ee45281cbc33ab1d374ca0d20ec662085718ef1 -2fd67e41c9715875632a4c0d58e4b14e2f2dafed -2fe9d0da1af89f7f08d1d5a78a31049cc3da2e77 -300cc182170fbde57c4c8ca1190f47de9a334176 -30828228db953aa75c45d84b03fca5f9606b054d -30c63cea1a9d1d1c805ba9f086e17cd6d06e2808 -30f289d32b8c9d7126edbc1790d2d3c37c47c0d3 -31029de8c5c70aaee16d97cfa9678d34907f05fb -31409c514c7afbad69113a72bea2459593946068 -3170e694016647b9e389ebf12da53b5b9281f1f6 -31d71fc958a615f2fc8c30de182b0ebf2a341905 -31d83dbc62bc22bb6358fb7a5fbd2f9653687f24 -325fefae213b6728ff33a51d8b52581c8f8da23b -326b01a73888b24ac355fcef750ca797993a0247 -327d14939499662304b02b1455b2f346036390b7 -329d2061bf8b8fbe79add3c84bd98f6f74dc3400 -32b6bb7e6de5e8ef72e453244eacb97555bdbe71 -32ff02c3f24313e221e4f35d34230530d2efdf2a -3356d161bd13babb0583d063734db3847fad2827 -33e0c92cb9c18c836b5c035500dbc56d0f6a9cef -343fcdbd17872b4fffc24d86fa600e5007727291 -36560037d9d79b0af02e7540cd7c4c6fac6f990a -36781edab52f6277d2766a95a34168d370fdeb5d -3751ca95e2474f7ee45d74197a0de12063e1b8ac -375207214058024761193b1a87d69e5d9107dd62 -375e5ab6701e3b2882e9f160ca0e66c14f741230 -37f12137710cf6ded482111b694c3e33b5cb767f -385cb21b05ba578ae6618c673a3de6202dd15a1e -385cb9889ed3df95aac8ea707bc650ff63e26920 -38643e198d5c75f4063b0019f7e5996469a2d2e6 -386a14968ff025d925682462fc020c302b8adcb6 -38ff761253ea2f256afdfd814c62078bba1b7d68 -39732251361c051b618ad5c6b98560456640fd6f -39b1118232042354a983b93433b157b973e74012 -3af0872e08b5634cf93962178a34c5fa01acd116 -3b3d5acbabdaed2eb1e95cfb5401fc4498905e83 -3b64c43dea0cc710ebf9440e8990775d0ca128f0 -3ba908787d126889be04ff7e812be15089bb508c -3bca718614b7c1cfaf1e272be7295a739b228422 -3beb681dc5e92cf2eada79004d64d520157190af -3c0eedfe4b7071a8b79bebd9a20432c761aee8d7 -3c2c65f08142d945bef1225d00bf8aa17d854a32 -3cc3c333ab76bfd198e2e5477bf3368842a0a947 -3ccc6e80645c07853d2735a6072b919579e7dafb -3ccc9d5d5e9abb4591d9bd26dbe8825472b00703 -3d3652d4d9415b857ad19635e6882fa1efba52ee -3d6a838e1310b7fd6702bd3b1adc1ad4fc14579e -3e7b7d6a4205b45a92416c7bfefada854be77e67 -3ea46aee1ec99764d8e832c5fb631ca677c19526 -3f48a8b21be01a8de88c89d1925aa9ccce206a96 -3f7268128c693a72a29b5d0f0edf5dbe2373a2df -3fd21d3102755c1dff2fe9ef50a70dc103774acb -406d958861ee0236f6eede1ed2c824cdcfb2c86a -408e9e830eebe3142d65fd67eb4ebfca4e3339af -40a0b0479b6a784ddcf2fab5477a55416087302e -410ec2485df0cc562259dc4fe1b067f7456fc110 -416345858540862805753fb0d942b62e069ed5cb -41be96c14be9c27d4da2ab08a4d4ab44fda2e036 -41c16792349c24144f1e24bcc26cfdeb85c2c250 -41f73ed7400e7da5bdf86310d0b3c06abd8164cd -423616e3fd007deb596e352ef9fc44a84cfac1f6 -4239cf7073eac390e409214c068b2a391f1d80c0 -428c71136710c77cd4579ca912757038a2f0c900 -42bdb83f042e76bfc43989f737d826938426d76f -42c6232dab8ab518dc9c3139b43315ccb681037c -42f07d98a6c2027fa42c246e23759a6e57f27e81 -4335a505057e00219a373854e51f4326b40a79e2 -43c6bd1217361e1047b31ed883cca73259938645 -446c131756a7678f2fd7ede6ddfdbda413103b58 -446ed9937815673ebdc946614d189606382ec109 -44f4bb6910fc4fce7d9191f58335172f4a83524c -44fcc4c6a7be52deec9793c6d00fb840d73d013c -45098517b9427e9c2eb5ea23f4f82fde7743f8df -454d4ff84d4c2487028d7fd065f26cb3dc32cb54 -456efa0b9b31c73ab4bbd0115078b7de6d972a03 -45a71df12bc36898164106a92a280bdb183ac9de -464259a9c6cc1fd71e1e7f5499ee5bf7ea5189a0 -467ad9fcf61c1b00db0ede60524ca2136b3cdfb0 -46a2bcf86a08d48f37feb3f58d7af861c86f959c -471924951e854525a342ec94a2a8240b8edeae7b -471ce9d8eabeea0fbd65e8b15a899e4f7539652b -478653d966fa8f1b046b9655e3e2e309dfe98fde -4788a55ad407fa78a1b8f1e84fe1b5803b8da582 -47b230a7d093b62b30cd59459e98bf19b824215e -47ea3d6b86fef1e7fb58a4ff6beb5bfcee9f5bcb -4846f7ab4a14da479b11453c317fd87af203aa83 -486e4e01fc2072f9dc5c54a04282c04710b73e25 -48d38a758517c7ca0dcb8cf63d477db9a123ee7a -4926245c49d895d91ed238c705aca936b4712f6a -4927ebcc1c995b5d846a7267b2b71f7c111dfe8a -493c350671e58a0b042f07d3fd3b6c966ddd75fe -49a104f5f168cf5801be0565e5add29511ef1230 -49c2eca3cd0910229b8c3debf1b3c283c148ff56 -4a31160384ce5f898422dfa18b8cfad2684b7896 -4aa0808d4b4b1156e2149848fc1513665f101da4 -4ab65408d0289672fc0c151e15bbfabff1c7b1ff -4ac7d747c0d3121267412fe1fdaefe29f0596e06 -4b17dcbd800f114de2f0b9d2940ec8b3585382ef -4b44895546bb4aab73e3a89a56f46bf9996c7717 -4b7b56b457943d732a8f79122370d026cc6b83d6 -4b8ad8ad81922a45a51bcb63664ad48b304fbbdc -4b9c08f8141199d49cac960d98c0e2ebf219af2b -4ba1e2ceae04375f96a937c329abfa810bfa3650 -4c17cdf8e3274a9906f724a0aa620784336011e3 -4c423992ec3da579a9685ace8492b83d550ac416 -4c6ea45f8c048bd6def20bc75a4335479e30fea2 -4ddba7abd0bd5a9ab4096d9fe67f27fd6051f31e -4e026d69725d0ff31909eb50b343745e065f008f -4e29c9d7bb4976fde6b2dcb189e8a671d9339833 -4e363281b7becdd45b0caec35a68dc11adaddb53 -4eb96581e1ac1c0860de6fde5591dc5c5af57b35 -4eece1c2783ea6498f137bfe8a6cd82c00ffea6b -4ef55b253ae513b5e7ceb3ebe0f17bf61c9d498e -4f200a9343e53012f578a4189825c66439a63fed -4faac40cc7b337c492f92047ab87a08600b618fe -4faaf00c812ecd3e21de7edd07f335a70f4dcf26 -4fd20d7e441190efda35a5076e94d9af72910092 -50727646ae0c2561ebdd7ca96071f67d3fc9a3d5 -50beb93fb7b8e12272ddb7fb19cbb7feaae56880 -51800f3dd9c38689efe1cef5aa34f76c6d0aea65 -519d454a8a97fbb2addc265f4fce40eb24ddf3f7 -51afcc5451a853141963450481f6ccbac4b8d870 -51b1db62e35932dce86280f32de22b56de289d45 -5218b7f5e1dc4c632cf2bfe7560d0ae5fe0e40db -5261c25a9f01e499a5d68603134b36dfa7a0c986 -532cbeda968f36211d93779be212618e9cb57d7a -53932c5b43ffb860aaf6c17cdee074f4c98505f5 -53ad4bcd3f49b589d8e78e508c1c0f988cb234ce -549788c5cd016065e9dfff5c38063fde4bb217bf -54d3fce515a2e926d704ae410bb539787d094929 -552ffd47fa8b1fab8511a21a50fb107fe037e6d6 -55517eae2608d951179fb6f00915500cd4e65b6c -55594ac71809c0f910968a9e03b645e9ca79d55e -557194b4a7392f01ea6e74d0ffbee5777d099506 -55d7dba959fc5c49ab8d14fe6ca784fa7932bdaa -561298ba435bd0456ca631403ff5b027bb0c2f4b -561513f69e978f4dd9d4c68d07420cd4888f7492 -56528d2b83fb68126ff025acca45eb4d5974e5a9 -5681c96f6dddef004368b47a5fc0c9bf66d37a2b -56a1181c3308ac29f18a6dbc4c3e2f16148492f2 -56c1e71f41c8f2a5a3e25aaa2241099c586f42af -578422373c1214f4d7aacba7fccf6781737034e7 -5797d64f832925b5b8383f70372c8d6e3b88f760 -57bc26a82ee5541c902aee48b1a48fae8e692f44 -581d67aae6c01a697e35e5ed48a31d0f17c476b7 -5891346fb2132daf17e5abef2a3af85fb8ac2100 -589f11e1bc5bab21e44ef22413544044d8fff96f -5922dbeed14b085b73ab2c7c51c2e51911a20218 -59412698fab4f46e65bf8a64743e8bcddb5b27be -5967ec2070bea1313eebc33937b6aa51bcd39d39 -59a38a56a91d0bb7608c4df0d1a6dac277851e32 -59f0eadcb268db54daab9c8cd42925507f046ef2 -5a0db452997f2a96a424dbcea4547f275ad5aca0 -5a201d223d330b2da61c3143fa606b43758ca95a -5a884795357f2ce8f3119116ccbd25c981e74f51 -5abb30235d15871cffd6288699d47cc4e692ce97 -5af6ec12352cf52f25f95ab8e5f5e677d426a12b -5b56a26f31562080efed802ec59fab8a56db6a83 -5ba8abf51e45f6575638fec608a80e1b4d153c22 -5c2512d5277d95ba934c62c5c9766c61a19e804e -5c309346d61fe15cb78a14bba1d5d020a794e3d6 -5c82745beff1ac66c327a2d63890c5418a17a424 -5cddbb40cce7eb03a47ca99f0d5068be8bc9122b -5d1d0f767460f0e1091d7162d3d851e272049d07 -5d294dfbc9d41690c55fa8f71a3e5fca245c7be8 -5dfec697915c17d6c43645631a060221b91a243e -5e4892b3ef3c70a5c0a734f5bbf3f60c63d75871 -5e6b197dec169067f45a47f2093d23af6b3b4b89 -5ec9f41475478f4aab322e0bab2a9910f794c3c0 -5f038c1fc50805285e3b3e2400639aca9d40807b -5f23ce06fb5ffac4f9a935a73f2c8d96ad7dce87 -5f4e24700582d108254e3cdbd57f8b84d0cfdb89 -5f64ea6f5847b2013cb0565f01fefc94a5b046e5 -5fa33730422e5218cbab3d77301747d51d5012d6 -5faad4062dd3673a9754d223cdfb9be8d20928cc -6057bdcdc0442260284ae53a35d7a9f484111b88 -60be46ce6246aa97d783a03bd871c6cee3163526 -61983950d05d739285ab30072fd3acf6abba0c6a -622a2b4dfe286562247b85cf672f8dc701215657 -6249a9ca1cc0ff9b1e6236054bffddfc4bfeaf2a -625c37172b9c19f99bf130aa7ba34077c281e900 -632f1af2f17f15adecf9c747bbe644d40cc43d13 -632faa0fb179ed71ef03858ef2060c5dcef74c19 -633bd0e306c97d90585a69222914662bea164693 -639f42db812f41f965d952f33cdc23602722e2d8 -64b79f64232828624d70e7536f9c42154a2f8307 -64ba65bbeaa84a24a3d0c10a4cf94fad58c8e31a -64ca062a809082d702484bca225937644a2bc2ed -64d1f38d9652755afa4b8b3f0e5b9b7d2055c4c4 -65edb77aec4af6807e497d80af0d1ece4611699d -66135aa07c1e106b699c8dbdeadfd8cc5dad41aa -663703d67d8acea9afbc69e7d4b7b51eb1a4e25a -663e5ccfd73684010ac27b6006ba1fd4b0dd2c82 -66ae8e079fb1a89beb752d673deedfaa461a681d -6737da9fedfdbbf545b238e9bbe83fc42d1d9ba0 -67719d0b0cbb8109f9897fea825f4dc6f51edfd2 -67754f5cb5fb9b3d5503f9f5acacc99d0d29ec7b -6782688bcb17d1978122c307451cd301339965ea -6798018525271ffadbcd88c7ad80ecd3165a6a45 -67c3bfb2407026c2fa5039056429cae88c499f7c -68074236662d383b3cc0c64811f5515e5bee2370 -6810378570c7158e2d4c9cddba1169ee9b75e4a0 -68289d313d20a43d575de36d2ac6cba08e8fc8ba -68404fcbf189640ac95a72bc62d51e01f6c9eef3 -687066f1d0e4a220a72fa037264272493bc438f9 -68ab83d26220d37a6a904bf7da6e2321811c7906 -68f5801fed57b28d1e873806e91c45056762303c -68faaa23c3aed06c90bb63049382a470dd20a5d8 -69aebc503d699e7fbbcdb741d4f127852ca1d7e8 -69fb46e17dd284fda99354626053a3f8067af608 -6a23229b0765a5465150bec4be3a0c399390f874 -6a542c7ec9e7193d949e728c99cd12455ea6c1bf -6add4eacd6d937f6c07afa24d16ee7d8e05d867a -6aeb64c84babdb83b388aba3c32330e659b35eb4 -6af2a96f83f4933bc54764dee13d349aba83a5f8 -6bc86e0900648e6748eb473ba874ce38e0cc9098 -6bdc0ae4c817d1889aa89a435e0d5c0f2fb38e37 -6bf2b86415c33cf3250bb57b5f535c91cd618736 -6cac4d2590ee87d0ac3f2b197d37ef8ea400b9c5 -6d90937703bacf2cfab3c7a69e11d09d1a1d813d -6d9cca97297152e7a1c6aa6a9697efe5ef0ba570 -6e24df8fc3c9da397d53ad9b9e6ff9533d21aa0d -6e4579ca34d171f0fffe485806381d636f074f5e -6efc0f20fb81e661055f6325d2666662b32ebcab -6f36b7847297aa1a414bc2e8bbeabaae00683b1a -6f828a380afa9a07178d2d324e63873c8b8de24b -700d61378420793ad499252983afb376953693a7 -701c4dfdd3a8ab28b5ce6f3a50a9584aa99ecdef -708dc73785d2a7885196bd7118f167dea7641e34 -71218a6edd1b491c95409b707d2a2b5f99c44358 -7193c8fafe902e738b6bab8d86208b77964ee18e -72beb129ed0459bf81696414f5da1708e5f643d1 -72cf65eae3116958f401786450fb74dfdbd8da83 -72de554e42d2a3448827e3ec8b5fc3e0aeeb130e -7355281fb2b317644574db0dd11c61a43224542f -7357c61e4a9e667ae93397cf29140bac6b4656a8 -7376ddbac32e016ec5ac9bb48e2ee6bff7909fe7 -73a0bfa68d0dba29e3d03c6f370b38e1acb5b39b -73e76dc7cb0edf6a879340f0c04d7268e401e853 -745a05f6305335f2cdf4f05487ba82fa96b3d2d0 -745cef9417ec7918f7ce604799db05301e909e2e -74e1bb7f72a0b71a58a6a13196209dcf71b96cab -74fc7879f36f544a95350bfa3dbe323d971b235b -75459035081a661220ec1a940f0a099992de5769 -759e1cac4a7914713dfe6330f57c1941709761cf -75f27712ada2635035c0b6a8dcf2a70a3e33cd41 -7614897996cfec307dcb22d62c161af585ac508d -762e5247bc320a410bcddf1bfecf215a402c4af5 -7677351ef968f03ec6e456c6b2e2c736d3c46885 -7770acaad680d7a19f52a7f149dfa8e335c909cc -77f0366becd14c30e900333fe2ea4b2fb81c0f15 -7851ad5d21ca8c5539e0a2227a3d416b35a8179d -788e18db69bfb95ad626872e3d7d4e988f416780 -791d2259d374d94a34ad8fc84bda62b6e0ed762c -79e5abb4fe8b8624e399b4018bfa81171c1a4347 -7a27b33d927472f1751907778180bc53e2b2c604 -7a6d04590afa75bd93d7e51644df8a0b1613232f -7b84800635ecb4b1fb60d25cf1cbcb35cbb9c92e -7bff7741a9c6f63759256d8f51147e84e05c514d -7c467854ed17a1a25537662595f25186aea731d6 -7c643a24e45a220e7436fddccba6825125c78739 -7c8d6b682ebb4a27c7b6863bd959886e79048aaf -7c98658589711fa7872cd1f8e3fea1bb1c5813ca -7cbf316e7014c8aa5dc1cf293e7c70b6bf1d0e56 -7cd65d9e5111b33be2397d25c853117f5dd68264 -7ce07506d7d61377bed08e390e5533dc5c6263dd -7ce516503617564fa262e0d27e41ded3fd8bc32e -7d0982d5665d43db57ac8706497ddb62342fcabc -7d57c38eaa15e9a6e785093c110b4f2e20681309 -7d95790d07a7a8465db6c9503b84c8468319c8b5 -7d997998653da572fd97039f3ad8746481b8f6e0 -7dcdb79ae1485347143bb6b626f46752ecce976f -7e0538fcaca3e4753beb06eb6865e73a4989ee26 -7e06d014b0df299182a6f7c76a8f36f1c267398e -7e22c1dc9a64679f2650e25a4bc558e561f8403e -7eccde770319aea19425227821a44c16337a46bd -7f3e9f7fcd7bf761595c37a90bc0d6ab66f43bc4 -7fa21c190a403fbd1837cad9f5d6d960d929214a -8052810590ece2362c026e4449d9eb8ddc2a351e -806e0cba06e96d1a1e32e2d5ca8850974378662c -807e5011892291a6f18dd17d776a5cdc10778142 -80db8be20239891a7707b2093c76fda34fdd7f32 -82378a68b0f56745cfd733dbe01845b32a96d9ab -826fef225a046e484beeb524451d13bd12066134 -82882057f42d9dd383a54e06e9477868d5f09be5 -8297d8caaab21ace548a91372a938d63baa518f2 -82debc0a459d61a86de44c18051118ef89233e47 -831444b648909d0bec18827ca1795583d4fd8670 -83ceeb648985f72ca29e4710f78811943e860e7f -83f7c0d52e448686481a40821128c314ea88e736 -8425efa062caea4710eaf88323de1a9129aad84b -84325d4ed1c1c2e3204da990a613f98df557fbc2 -844ca64706e30a660726608ca3415cfcd0b974a1 -847769de02d0973670cf38853aeff6e87ef7fabf -84947ec089f7261833192b4b2d51e9fedba3e57c -84e43b7cc65d508800dca984b2911d3c04b46003 -85707ab3a51c483b146f6fd2fdf6fbafb8d5c038 -85cdf66d2eabd417895f28338b83efd75bfd96ab -85d63207030595b476870b588557d4150923381b -85f1d93ede6cbdedf4b26bd179d1987840d98254 -87299294abd6938db759059d3bf25d02a7920a09 -874866917762959ad75c03cf4c00bd710f1fb353 -874b0ad5666e102799642768c92250fb73b71852 -87b77939988889518758edefdd9e2c0bf5f4f599 -87f81027f5b87c40bb0c73bc0a80599326ef0198 -89a114a36dadaf226b8380080966d62388f644b2 -89bfe90d84121d858537e9cc2c2fb93eb35bb4fe -8a3b49daa0c49c2b00cb52d4caae154fbc693348 -8a46f2ad6074051e2d2da4641e23e6f9918ad579 -8ab76dd05be71116daf646913bd9a96c75c66672 -8ac8a2d511c174560c2849a044d2e6894a41b446 -8acc4bea7e61ac9ef50e7ce2b867aa19fd651131 -8b10c27790ec20a7bafd48ac9bba6cd20cd3696d -8b44e4e14b5af962354714475f5b10e6c44ba4a3 -8b76267c9c4e716e3ed27a2f01a91a8be9d78dfa -8b88a4620ac6420604478070eaf59c2c2fb7aa11 -8bb2a7e69a52419c67b0979e4897d9d5608c561b -8bb7cca9585727805330cb5b4b40185ecaadd57c -8bbdd0bb7ff7be44eba4f0bc52d6ce74944635b0 -8be61eed15ce00901d14a2249c41b9617aac4a3f -8c07c250125554e662fe56d4c95a9a52e4417ad3 -8ca89efb4e3a50ee84dcde1a6f5cf82fb7076d47 -8cb26439274787fdf27cc1476514029baf796b88 -8cdba9ed0d6cfcd3ab35fe6d27462927f084dc98 -8e0890b81a118df4ea7f15feaf6c381d111d18b8 -8e2f49b6e9179a763a1b50248598fe9fa8f97ac4 -8fb744c1623e25384af11a4c8de4295bbcab049a -902546b7d2dfbd0e895b2b5a77e6699be3b5e015 -907485b3c8432ec8c8c1483798113eae2ee83aed -9074bc8095804c6e546d0f637af8d933d34e3228 -9156ea0a48afa5cfdb7cf1d4a885c64ee1d5ac7a -9189b90a6f318ab9f5e0d0ecfeca2bc95035deb4 -92020369c3cb7bcc14e33fd6cac659cc41bba7d4 -9206c4832393675370e76c97b487d273a63f997c -9230ef3cc65ebd86ff5807e1de8ef439fbd32649 -9236db1e7a025bdc2cca6a3948b98ffa8000a32b -933849458b0be027aa8fca8275b2ad44733c395f -9347c3d3c77c05ce5b44986b2576db851534382c -934b8f0dfb0e12f914cea3d12b9713543f38248a -93d74e68aef9434ca43a3b0212688ba890c8bb48 -941924d185efec0e7004da344245c5b51f58adb1 -943607f9b30e806c7bbfe9dd23c79bdfa5524cfb -9444227df8f53e3f17be0f8bcb2b468e0caa29d7 -948e37a0d79b59da511854e0b864716fc0c6a959 -953c86133fcf7406680e08cb880f6a7534448058 -957deb0aae19ac7090cf112d23da5e3855cb64a6 -95940213538a092ac2a651716284f68c07d7df34 -9598ebb8e2252c0c816651bcf42022638f9ac926 -95d6700eb290cc2354922c5c4aa64721540a77dd -95d8c5e8f509ecc113615801819826461f89ea11 -9635c6ca2c4a34e1892457fe41dfedf089e0e6b0 -96a9af02e8be2e9a9e12fba10ed36376adc4d63a -96d0def7c6dd7bb8eaad73667c5a8b87e4181485 -96d5973dfc67260791c3463743b995850a28b5d6 -9746b494b6b096387ce7a223ca968e65936e76fa -975b5f0113150b41d13ae41169704eee6377f7f4 -976e9e052a0f260fafb429f5372c0e1ec11d9fcf -97d5f1532cc75601ef813225f066b8e336ab49e1 -97d6d5513fae5c0b1416a70af1c8faf96f262de9 -98efaa2c8c2df526c00ad3605ad827f9b9aa4ac6 -98f41303760b552f3975756cafb5f4c8d4aeb951 -9a6a3a64666270d849fa2436dd10fe70554cdff9 -9c07715f8f00a793a600b9fb3f3428a2cd42e868 -9c53c9c740652664ee064925fd45efd3c3165d2e -9c7737d3ee0c575ff0bdecd9a8101e5878f8f895 -9cb63260b7c594bdf5f9ff81a3544ebf19bd2511 -9dcff6d6c75d9fb3be5d79932a05e1cc529a63c5 -9dd057d7b57a0a3b74af5fa7d5888accee4567d9 -9dfd60c4800819244d88786971f8517254e6e97b -9e4496142379d3676c0da9fa4f7b7f9563d71ed5 -9eaf088b0cb64a0c81557172bdf0ee2e9d4264a9 -9eb22032104c6100899804f999b6e370ae6ff496 -9ec20dbd9730e73cd7bf39e8ebc402d2dccfcc3a -9ee67e0c5d1db97c8885ed2216c03e4ebf7a837e -9effd0308d7057d36a47b5a2aeb7c8839c9e4a7a -9f174685af40784c147b14cef6e7d70491c7e92a -9fefefe6388534d649933edce6ce0230156ff715 -a0318b8637d0287fe5e0428675430beb43d12638 -a0c38be99fe5029be029800f8c699b54da7e098c -a0e12e25b0b041b4bf7f299f63b2bafe03f47480 -a103bd3bb6a55d753a28f2b21fc48979670f8935 -a15d6b270f7d18101aa5741b9d836c32163e451f -a2601a744b5dd5ae544dfe649c94984617a12a48 -a261b2bc0294cf25fe166dd7007003e075cddcb0 -a281b4165a29e4ef5db7bf21f053cea72f769ee7 -a29a7fc5130ad94a9e4caa63593dd9e78c071607 -a2ea3523bd7539719e03bd9003269e46af4dc257 -a3f096146a7ada8c49b5a9bb5bbb0ce3e1209183 -a4a0b0f921286ff3b3ddf8f302c46301b3961291 -a4fd8d20f5b34d12fff9c12c0e9d7d46372835ff -a5198d5d7c0ead44930d9715fb0fcb4b7a0e3ab8 -a52f86ccc8376e4d96bd77605bcbad3141760a65 -a5d2898df210a59f8234dcf401348dc892d3cd44 -a6b54a036b979ff4bd3d7e9388cd0258e3532bec -a891f17e6258f0beb9c3637b5f2ad7c6b2a1b746 -a896a4861764bab91d26e6d1b0ae666237fb2687 -a9c1f5aa3c00dcb3a7e2c64d717e5b4c0a2b48d7 -aa241d6c7c99c217debb02cd7428563de8a54958 -aa27c880134256816b8b6dfc13b0bc3299e5405d -aa3e62b44c5da4b513e5a45a404c6731f6637fa4 -aa661d79f3248e4e64cad50587e47029fc16213b -aa67bd4428549d102061abd7e321d6052fcc005c -aa9bf45cc49c526b9dc06804e2d17af658bda913 -aaa7422068eea26ab5af480b3ff6293330b14ac7 -aab361490acbba1572bcf7ac6717276fc93819e1 -aaf23c997156060819320470e7b75b4656a2d326 -aaf71d7478c9982e6cc965de1047f87e1d424821 -ab03ae2986b9e5ff9ed7bd8a1eba0aeead735577 -ab2111cf1ebf8f6e90ec05eeda6ed311d1a11370 -ab288bcc41c17fe25d8bcac7a6ee550f8c2ae149 -ab65f608aa9c1d0c3a3f46bf1711299de151c052 -ab94f479b14d6d590db6236e1a160b044eea1c46 -aba74d71ca9c457442b19de77ee2c16543c8214d -abc4704706e594147c00bfc63a831b8b07c674dd -abeb08dd280577023a61bae1ca4a62d986c4a2f2 -ac2514cbfa53deaa54aa4103a28bfb398f2cb34f -ac45b97a84e2bb9ded6c09d20e295dbae80e0366 -ac7b6bb1346324a2d09b47daa621a36b42d2506c -ac863cf9b60446c48f7f038481a41efa38fb6ea9 -acb1385b6358d99347268caed62d2d27d9a942b1 -acbb685e6d68b9a0b2548f0753d7617d01d2b79e -ad01f85ceb95e94472e6e21a02cbad02d39c97f1 -ad3f5a012dfee3b3bc9957716b9c57228bb7621c -adb2ea5921b0a7ccfed04a0457b6fa69ae207a7c -adc79b1ce7c537c64f18d44d9ef4f41fbe60ec7d -ae20bb632bea1894d6cf09e075282a742a198593 -af8d3097f7de7e5d02e2e0333a4791104a537769 -af9fc41d45395dc85d16a6defb1f2234ff6cbecf -afb69e7d4881722bbcd05a8b1e337645d4eded9f -afb7ff8b5946b2a2821314a4b2bc41c41cd051dd -afd21411ca4066cb23248c031d4429ece6d2db6c -afdddf09c954ebff6312b2622c893d9c1ce00897 -b0842d20efec61ebc4ccd95b846eea1b4e3268ed -b119d9081793f10289618668cdfebf21709f0bfb -b2175b6a4f0c385dc0750f091137939a87e073da -b222c3f895d39417cf3513d2a18c50accfac355f -b22d0e65a81ad4e9c92b0522aa27fa6a0d394c0c -b39b09f14b40796d966b9bc7d11dce1da8d3145f -b44ff2dfe405cedd677be7fa1ab4be1e88051d30 -b4609396bf37c3a938094f06dc6bb214f0ae7a75 -b48e5ef5bf92c07dc1496d3225d7f45b61d8e093 -b4a06658dc836f35d03d7daa9b247c40cea4dc86 -b4cd38d7dacd5bd8574ef34854875cfb27b5f2d4 -b502dee9a5a89baa10791956458f9d3c9a9f30c7 -b56499b11b7ee741c45be108338c242ce3c0d07c -b57a7b15a66cf652074666dc76cb5fc287612e8a -b5bd700795115c8d6ac7d6a135d25f0a763b79af -b64d78b8037dda4d74197a7952ce0fe0462c5911 -b656030cb67f4f22062a26cf3cc6c1fdf20a7f91 -b6f16f525c687d93272925021647e5edec12060f -b7990778c54d60d6c4709974b9c146baf88b6357 -b7b763c7a0ee26081e7df509f389204e2191f073 -b7ca92bff8ff257884403ce20005c27b5490cecf -b81811c8fbd0ee38e72662331b0551ec4952db6f -b850045a4ad73c56f90930051de7c0fa429d7f96 -b8d9d8f28a4913f67d997d3abfc1aa7528741764 -b91450d8c2c9454571b37e73d65bbff8de2b1a4f -b97203fc26c2e04c05ec71f4a8670e31e6613608 -b9ec3fe10154ba5fdd6071ccf27be08a8d4a0a36 -ba65cc7bd2157f1b2c4f94f31069e55fc8e10ed0 -ba82ce1238f629d2d947e2169619f457d346945d -ba8e0063f117b17fc540214452d23857fe79c64d -bae23da2ae329fad626e1752afd59a3143f0c318 -bafe5ab07cf65c52012e1f2793b71a0e5a4bc0f1 -bb3a6c3e35f41653561bc532470d9b34d9097197 -bb61c2c42e678c7201bbe687112a196eb9c73af2 -bb8558b72b5b2c1276720b83ffa40d21464a634d -bc346fa884b81e140a051e524c559c50d160342f -bc782cf1900b61fea4976b07c22a2f4c7ceed1c9 -bcc330c322d5a05526d1f826d97f732716d4626f -bcefe33ba4e514bf43f5c27ae9d6e50efabd12de -bcf620a3213034215461a9e2060c8221732339ce -bd812dbc156b902d95770c5cb344b4e2da87d416 -bdbaa2f6a9474d31a0c23a12572c428780afb956 -bddc03b11051ad4bc4c8bb685048245031e27ab5 -be3b4235ba294e5bccb45fa5400b902490dcd57a -be8c7c3f96a0d44ec9b1aabfea5f04a22264b731 -beed25700a4cdf7d23effb253fbd764d40340060 -bf5c6562294878b905c8b5e35250c7fb9a7c6733 -bf69b456c8f132523df5f2a5a86d5d5bdb17ceb8 -bf946f7b73fcdaf78efef932da61081d78447108 -c010e6e4815f9903f46ae63839537fc964dd8838 -c02ba86b60dfe91b14c010c3851c944bded7373f -c0dd0754d04b7bbc69acf3459e342dca5071ec3f -c10c4bfeb9850b960f06bab3c248053213bd4899 -c2a98bd6596f6aacc894de2c562d89caf9214ddf -c2edb328705a9759739feb79188b6fde528fcc6e -c339a1ddd8e804dd935a50f25643cf86b21540b4 -c3e3bc2583f2c98d4bd21675eb860cfa7d504f21 -c3e713d0544ae1ca75cf83976fa3a0a955b0a1d5 -c3ff432d0661f89683101f12dd0b37d6c028a799 -c427a1fbb4503b3d5b92168fcc05c900934ed16b -c4cc3876ab8898b659fcfafa48f22701e3a713d9 -c5110cd1f1d7e9ea69fc11d2871d6d4dc9130612 -c58610966bc1d767ad4c271f7c1ea2058c79a820 -c60eafe7f21bc47a6d04bc8e8b189f86402bd571 -c6351087c7e85c9b470dea2fefd7cd715d93edb2 -c6a0d979ce9d8ac191974c235c047afd1f3b2823 -c6ad668a51f4eeb151ad992c28d927b57391d740 -c6bc8682d75967be681423f31485b06bc1d31959 -c6c288c060af665b49377300cc0509e6b918af67 -c723119a4965cce4cf1edc9abb95c2b4a0875b9a -c73eb399591a33ae13d5c02f09f0ba0255c38a67 -c74ca64f2d5bbf25e108378ba2898a571e131182 -c770cccb7dab45e155497133d23dc6b590a6589b -c7bfdf3c18431a6201214fa987f0e8807bf6746f -c7cf9e9969693ad640f529a9830758362b2da550 -c83afa5d0360c37a0ca9670ce317bfcc37092cc5 -c8bcd6494c165ce91f9df489e4e0c5eb60c44622 -c8befefd6c2929ebb56c2fb70ebb729abc23ffd2 -c9911b52129cf5644ea9f7563a9349b8681d24bb -c9d4d7323bf4528ae06ad24df39e179649961b05 -ca049274163cf8981fb8d4fb510ecd305c82b64e -cb141d21b85a1d806f6ebf9ff1e2ee15a98ae7ae -cb3352ccc942eabd284d86d7c479a9dcd78d168c -cbabbe6c9ce02b67a49bd6e260fc61071f099678 -cc1c341e141744ec96f7bf52c37103e3af4cb123 -cc369822eeedff3b952e4042da7445142f6716e1 -cc80bb23845d193ce397bd5871587bdc56115e5c -ccebf8abc1c7b86e7d0473d867b08564afc433a2 -cd65bd3314be00b884611f87a8fbaacb0a9e79cb -cdd263473a61debfe4c529a241d34387e8412fc7 -cdfbe64fa7345f20def8fcfba543012c1a6683e4 -ce0981d8b50270b96421722017849b42843979d2 -ce4ce96584ad70ac1722438ebf13d7720175549e -ce7f5b30ecd2307ad22b3673c0ee49c070b6bc95 -cfe6324400b63ee78fdb7fffbe14880791532b7c -d0650c64432158ce31d77d9c282f7c47ae8c1b3d -d0979b5d38c21f8077b781f1bafe7a127dbab805 -d19b4a853e202275453831f92f6f09c698b5ff54 -d1a33aeb81b8c68d9461cb9d095b1cff33b85742 -d1a779f5e3ff13c42ad01c3e89d783c577e2a928 -d1cf57492796a1ff012cb90303f767cd270e1de3 -d1de0a75265f7917b3316a1fab608d63012ecc63 -d22b72015605e6fe484c217cf35e271858f14179 -d286d1d0d7f74023fc53dc8862565949be21e40b -d2ee18f7551a0261ffc1c239fb75fc19f2785fe2 -d3512e1ca5a64d125c2907f89afb8feeb73fe661 -d38340969feffa0092b0f073d2b938a56de27912 -d47239cf66572afac691473dc4772ab967e452da -d49da8b753d20dd2d35143c94bfefe72c263a959 -d4a86d4fe9955b17620b0efe0fbcf93b2f547516 -d4c46e321efe34cf456a36dd6c7579dfae3952ac -d4e9f26225ea163e4497be21f54f12aa14159114 -d5233edf3f811aa21f1add40254f0893ccc41e1f -d5eb3eca25ea1f2c5886a251ea1b7fe8f54949f3 -d5f783a9005a3cd5433a905bb412b02af35f17ed -d668a2543611151966599ce4ff8de9dfa9d4a98f -d670f0643e84f1e1181782992b32ce72e112cb5f -d671b4a1094aacae2e084282542b7a39c54f69a7 -d7baf225d86395df05d603927447f914c800579e -d87ec334acbde1c19eb2b270844274a9717e2342 -d8a7f9d5fdc2f87aec6f5d014c5aa3657d926230 -d8c8caf9b2c4ba12ae32ddd075084672d9388381 -d8ca0f858d7e65e960e19aefcc1615940aee39ca -d90a6f05f51c20911a3f6bfd83185dce8a3ca6c0 -d99fd6caa1476fde1aa893d7543d60bd85078312 -d9ae1c90d4fa92fff7792c4db1ce04e4ad8d5a7f -da05ab932ac156473835824f9dcbbfe0259ce83e -da078c1ad59797e72249587d26e3d0524f3d65b1 -da4cf537b1557dc84802bfa14cf793107704b450 -dabe2487c3f7b85c5679cd16bdf58c86f6b037c6 -dad968cfe5ffc58a429416ffb132f02435df8158 -daff2d23ace1451f25d1c2d6ce28632f9c026e74 -db1af9a72617082a918d4379931fe82285bbac49 -dbac4726752325e2a7574e17967a859ea12a7c8d -dc76e0e7a4d0db8219f4c6ad0aebbb353c8cc7d7 -dc9fa91904bab685d9ef2fd2ebbde8446fa90cbb -dd44078c70ab339e8eec7c42fdb827e0e193f68d -de06df27d30d646728182729c9ec4cf3f9973bb3 -de1d90d3ff2ae71002d0d10b1de897754ce292ed -de6c174e3cf09b8a0147321d0a83f63ef75dbf50 -deb303c80f190bdb4d61c5d556857f2bc1d84668 -dec271c0b701f8ded6d1017d29abf8104f9c916b -df72cd7226b79444a28eb604da729c4010d5e410 -dfa8bdeff46ee60d2122c46fcb30a573b58924fe -dfaac0365e83fe016f245666b0661e58f45ad9ef -e010bbd5eb9799eb856e12d5d3f9b15f768eb149 -e0279b01f795eb4f8464c73e5e653823344e0b89 -e062b7fb9aef3d9b29103a3ea1ab07b32b11f68c -e08aa209dce0480e099d9c16196b7441bddf5140 -e0b37fba7c820840f8cb3ec5108d5928a5911c35 -e0e745a029031f5b6357716a693745b1af02c7dc -e0f0ee71cd88e62276c91d8977b3160321a0b124 -e1d4a150441c5c58622dbe9f7365383405eb7016 -e1dd3899d930fc7b7c5a5a3d710ad487f21a1ee2 -e23d506c595a918e71cd291952a947bdaad371a6 -e259eb6d9ba7de8a8618520baac32698ad26ff65 -e2660cd0bb34ae71d01b0cbe767fda17b18961ab -e2ce388789d4f97c0714ba0081e022cf3b5a37a6 -e3c16739fc73cbe9767d1230c0363ce52aa4b7f9 -e3f251967c0def959cc78c47208f3adea3d7dc79 -e43aae66b02c69f9d6c0579ea94c3936dbc82485 -e49a4fa2ed5de49b2276fd1b0a9d252b8fb4e8cd -e524ea20d163df6e22d7280ba65029282c42ae6a -e526c1aefb4db71a23024507f2142533918ec1e8 -e597f35cfb9f12ea480383876a2d0bf9e64db9c4 -e6097c71dea461d8800ccbc9fb534473c5e21b50 -e61897c307a66f496bfd1eef29bd7f055ef2986c -e621cd1402201db6b3689ce77a49b4f755009e2a -e6800d07778e8b133b72774e87160c9f70aec907 -e680f0d56d229feeb22cf3fad9b2537011a67837 -e727bed14e99aaf75f36b45c79d9b64f45f1502c -e7324355d011e7047412185043d8d1db44382114 -e7b0bcf3654553483749535889715c4750eab111 -e8363960cc774f7ec53bd02f1da0ce30724aef21 -e90eea2fb2c5e1e8b7049856f9d354ff4c374982 -e989ebebc1109f335d462752b5f2b734af76ae12 -e9b26e22392c0e9c0a0371fc56ea61f9fd303adb -e9b33a03d2fbf45081e3e6f517a4c5d447cbc605 -e9df9df2430a9227cd67b8e2be44ceda5aaacc9e -e9f3a6cba2f2677d21dec4bb2da4fcbb05e9e012 -ea003dce02e72382114a915b8633c002c202cd10 -eb38aa7c6fcf8f58c48a68144462209c45b5a4fa -eb51158bd55153042a90e5c08da02672c0952f3f -eb8652b7a1f82fb686c2b57b47204e18d542b940 -eb91cbf4a85a8968b65cd4b951e619dd0fb0f88c -ec5ea5b749af67eab9c5bcee021a09053d54a5bf -ecbbd1f410918bbfb8a18886bbea86af3276b224 -ed221da39a39b84e861ae8bce7d2ea78fb49c6fe -ee1113df5241a574fcd70db71e54e43546f936b8 -ee33edfe8912d8e778b2656dbbbd1cc4b2c276c3 -ee5ab1d2bf6cc9406ac804a82ccfe2cad28267f6 -ef24c5ad112a36cbae5eb08ba596a6880a622574 -ef34f4063fff01ff1099d42534df87965f1a39b5 -ef3c80759d3c8c8d33e29dac3bdfafb982168802 -ef74de6b0178104b4dd80f3043eab236b1a329bd -ef9265f935e406cb97299ae134541da33dc30aed -efc8a6f58271940917672ba510486624a100770d -f0310b5acccab15841467525e305e5e33d265309 -f1173e2cfa2e9f03fa335a6b507ab7d39e2fe670 -f144ea1c169b4d02d504f2aa4cc764fd3abe855b -f163a083c683a4bf1270dcfd0e9a1468a134d600 -f1c92a133df0e4c2bbe41147f5554e00792c8c5d -f2fe19ca8542bc243bb06288571f85ed60e510c2 -f340f2eb77b17f97498bada740bd159217433e4f -f3f30aaec7bcf3a96593cf8518869533575132e3 -f5067711627a3b211937f12429a3f8e2e692c782 -f53d52c875ad1b1f9cca17b7997ef7864cb42c03 -f53fbca03fc4626ab1d45f6a58471fd85f8531c0 -f57a7d8874faa55c88d6270eb8b4dfd9374430b3 -f66c32525bddf4c3c2447e89c0860d29d4987b47 -f6822f1fcf5415bcc36c8b29c3a8f2d52ca7f378 -f6910a0b108231f2448a5367d72743710f7ce21e -f6946b666576cf8d3b2dc785cb647fc2166bc926 -f6c71089a91d89afaaeb2e1f4d2e4ed4fc026622 -f737e90e7007bc3c13168c33cc91f2267bdf1cad -f749f48cb47dc722dd93cd63cbfb1dd3913e9160 -f759f64321f8e82d59588ba3363499596274b9fd -f79e3f19fe8c03d86bab984aa9c56657975757c2 -f7a85ec802d8d735e2ed2754647769a4bc03fcfc -f7aa897ba825be23086671e9b8d601c10c673f44 -f8934ddf4be63a10ea0e9cccee7b63785934a50d -f8aa6c604de9c3036e0175ad516e9e09ca3aeb94 -f8ceeb5d87da4135d5ee44333d8e9b621090e3b2 -f98f15bc14fa2dd07fda2be0fad07827a9369062 -f992cfd90968ec891652101b9521d8306465b0bb -fa2f887101981e1d31f0f84aa02c857475681f33 -fa3b326038aae439be890e4e383bbfc85ccdebef -fae3334f7c9174a052dcd9fd1e659b8b35f4a0cc -fb17e5fd0ff7e5200567dfe91db47c749d333991 -fbc67ee235dfa8fc994b1332e3b210b822bde20f -fbd49d8ef3f95c540511460c8c645533419558aa -fc11c319e7e9822eb040f6f035f03f726fc227c5 -fc208f1fd9f481f4c63b299c7f59123b70ac301e -fc606d7191a8c407f742c6691b637a479b916d3b -fc67ed6ac1ba001c393ac446e39ed5fd7c1a56f2 -fc6d802a49b4297791e366fe481fc11c93fbeedd -fc797eb57fe5c7ef39413a83dcbc035fcc58981a -fdd50418b31a31571196ad25e28a2dfb53a95b01 -fdeac19d9726091fe7c50729db703ab322e61306 -fdee5b7a4da47a589efa3dacf8f8132a9c9e1419 -fe7081e1e191a2e83dd7fe512c2ba88d4b0a3dd5 -fe8a17a64dfe810586cf30c951ef2ed2f6c3aeca -ff2fac4be54e234bda5e716498d27a2fd6eb288f -ffdd8741adde5cc138e4e62fedbbb8be665fe20b -fff8e12d33436c33df2671938f7117f42c2e2680 diff --git a/electrum-mnemonic-1626.txt b/electrum-mnemonic-1626.txt deleted file mode 100644 index bcf10b0..0000000 --- a/electrum-mnemonic-1626.txt +++ /dev/null @@ -1,1626 +0,0 @@ -able -about -above -abuse -accept -accident -ache -acid -across -act -action -actually -add -admire -admit -adore -advice -affection -afraid -after -afternoon -again -against -age -agony -agree -ahead -aim -air -alas -alive -allow -almost -alone -along -already -also -alter -although -always -amaze -among -ancient -angel -anger -angry -animal -annoy -another -answer -any -anymore -anyone -anything -anyway -anywhere -apart -apologize -appear -apple -appreciate -approach -army -around -arrive -arrow -art -ash -ashamed -aside -ask -asleep -attack -attempt -attention -aunt -autumn -avoid -await -awake -awaken -away -awe -awkward -baby -back -bag -balance -ball -bang -bank -bar -bare -barely -bathroom -battle -beam -beard -beaten -beautiful -beauty -became -become -bedroom -bee -been -before -beg -began -begin -begun -behind -belief -believe -belly -belong -bench -beneath -beside -best -better -between -beyond -bid -bird -birth -birthday -bit -bite -bitter -black -blade -blame -blank -blanket -bleed -blend -bless -blind -blink -bliss -block -blonde -blood -bloody -bloom -blossom -blow -blue -blur -blush -board -boat -body -bold -bomb -bond -bone -book -boom -born -both -bother -bottle -bottom -bought -bounce -bound -bowl -box -boyfriend -brain -branch -brand -brave -bread -break -breast -breath -breathe -breeze -bridge -bright -bring -broke -broken -brother -brown -bruise -brush -bubble -build -built -bullet -bump -burden -burn -burst -bury -bus -busy -butterfly -button -buy -cage -calm -came -candle -canvas -cap -capture -card -careful -carefully -caress -carry -carve -cast -catch -caught -cause -cease -ceiling -cell -center -certain -certainly -chain -chair -chance -change -character -charm -chase -cheap -cheat -check -cheek -cheer -cheese -chest -child -childhood -children -chill -chin -chocolate -choice -choke -choose -church -cigarette -circle -city -claim -class -claw -clay -clean -clear -clearly -click -climb -cling -clock -close -closet -clothes -cloud -clue -clutch -coat -coffee -cold -collapse -collect -college -color -comfort -commit -common -companion -company -compare -complain -complete -completely -concern -concrete -confidence -confuse -confusion -connect -connection -consider -constant -constantly -consume -content -continue -control -conversation -cookie -cool -core -corner -cost -couch -count -country -couple -courage -course -cousin -cover -coward -crack -crap -crash -crave -crawl -crazy -creak -cream -create -creation -creator -creature -creek -creep -crime -crimson -cross -crowd -cruel -crumble -crush -cry -crystal -cup -curl -curse -curtain -curve -cute -dad -daddy -daily -damn -dance -danger -dark -darkness -darling -dart -date -daughter -dawn -deadly -deal -dear -death -decay -decide -decision -deep -deeply -defeat -defense -define -delicate -delight -demand -demon -deny -depend -depress -depression -depth -descend -describe -desert -deserve -desire -desk -despair -desperate -desperately -despite -destination -destroy -determine -devil -dew -diamond -difference -different -dig -dim -dinner -direction -dirt -dirty -disappear -discover -disguise -dish -distance -distant -doctor -dog -doll -doom -door -dot -double -doubt -dove -down -drag -dragon -drama -draw -drawn -dread -dream -dreamer -dress -drift -drink -drive -driver -drop -drove -drug -drum -drunk -dry -duck -dude -due -dull -dumb -during -dust -dusty -dwell -each -eager -early -earth -easily -easy -eat -echo -edge -effort -egg -either -embarrass -embrace -emotion -emptiness -empty -end -endless -enemy -energy -engine -enjoy -enough -enter -entire -erase -escape -especially -essence -eternal -eternity -even -evening -eventually -ever -everybody -everyday -everyone -everything -everytime -everywhere -evil -exactly -example -except -excuse -exist -existence -expect -experience -explain -explode -explore -express -expression -eye -fact -fade -fail -faint -fairy -faith -false -familiar -family -fan -fantasy -fate -father -fault -favorite -fear -feast -feather -feed -feet -felicity -few -field -figure -fill -final -finally -find -finger -finish -fire -first -fish -fist -five -fix -flag -flame -flare -flash -flat -flesh -flicker -flight -flip -flirt -float -flood -floor -flow -flower -flutter -fly -focus -foe -fog -fold -follow -foot -football -footstep -force -forehead -forest -forever -forget -forgive -forgot -forgotten -form -former -forth -forward -fought -foul -fragile -frame -freak -free -freedom -freely -freeze -fresh -friend -friendship -fright -frighten -front -frost -frown -frozen -fruit -frustrate -fully -funny -fur -further -future -gain -game -garden -gas -gasp -gather -gay -gaze -generation -gentle -gently -ghost -giant -gift -giggle -girl -girlfriend -give -given -glad -glance -glare -glass -glide -glorious -glory -glove -glow -goal -god -gone -good -goodbye -goose -got -gotta -gotten -government -grab -grace -grade -grand -grandma -grant -grasp -grass -great -green -greet -grew -grey -grief -grin -grip -ground -group -grow -grown -guard -guess -guide -guilt -guilty -guitar -gun -guy -hair -half -hallway -hand -handle -hang -happen -happiness -happy -hardly -harm -harmony -harsh -hate -hatred -haunt -heal -health -heard -heart -heartbeat -heat -heaven -heavy -heel -held -hello -help -here -hero -hey -hidden -hide -high -hill -history -hit -hollow -holy -home -honest -honey -honor -hook -hop -hope -hopefully -horizon -horrible -horse -hospital -hour -house -however -howl -hug -huge -hum -human -hundred -hunger -hungry -hunt -hurl -hurry -hurt -husband -ice -idea -idiot -ignorance -ignore -illuminate -illusion -image -imagination -imagine -important -impossible -inch -indeed -inhale -ink -inner -innocence -innocent -insane -inside -instead -insult -interest -into -invisible -invite -iron -itself -jaw -jealous -jeans -job -jock -join -joke -journey -joy -judge -juice -jump -just -keep -kept -key -kick -kid -kill -king -kingdom -kiss -kitchen -knee -knife -knock -know -knowledge -known -lace -lady -laid -land -language -large -laugh -laughter -law -lazy -lead -leaf -leap -learn -least -leave -led -left -leg -less -lesson -letter -level -lick -lifeless -lift -lightning -like -limb -limit -line -linger -lip -liquid -listen -little -lonely -long -look -loose -lord -loser -loss -lot -loud -love -lovely -lucky -lunch -lung -lust -machine -made -magic -make -mama -manage -many -march -mark -marry -mask -mass -master -match -math -matter -maybe -mean -meant -measure -meet -melody -melt -memory -men -mend -mention -mercy -mere -mess -message -metal -middle -midnight -might -mighty -milk -million -mind -mine -minute -mirror -misery -mist -mistake -mix -moan -mock -mold -mom -moment -money -monkey -monster -month -moon -moonlight -moral -more -morning -mostly -mother -motion -mountain -mourn -mouth -movement -movie -much -mud -mumble -murder -muscle -muse -music -mutter -myself -mystery -nail -naked -name -nation -natural -nature -near -nearly -neck -need -needle -neighbor -neither -nerd -nerve -nervous -never -new -next -nice -night -nightmare -nine -nobody -nod -noise -normal -north -nose -note -nothing -notice -nowhere -numb -number -object -observe -obviously -ocean -odd -ode -off -offer -often -okay -once -only -open -opinion -opposite -orange -order -other -ourselves -out -outside -over -own -pack -page -painful -paint -pair -pale -palm -pants -paper -paradise -parent -park -party -pass -passion -past -path -pathetic -patience -patient -pattern -pause -pay -peace -peaceful -peach -peel -peer -pen -pencil -people -perfect -perfection -perfectly -perhaps -person -petal -phone -physical -picture -pie -piece -pierce -pig -pile -pillow -pink -pity -place -plain -plan -planet -plant -plastic -plate -play -please -pleasure -pocket -poem -poet -poetry -point -poison -ponder -pool -poor -pop -position -possess -possible -possibly -pound -pour -power -powerful -practice -praise -pray -prayer -precious -prefer -prepare -presence -present -press -pressure -pretend -pretty -price -pride -prince -princess -probably -problem -process -promise -protect -proud -prove -puff -pull -pulse -punch -pure -purple -purpose -push -put -puzzle -queen -question -quick -quickly -quiet -quietly -quit -quite -rabbit -radio -rainbow -raise -random -rant -rape -rare -rather -raw -reach -ready -real -reality -realize -really -reason -rebel -recall -receive -red -reflect -reflection -refuse -regret -relationship -relax -release -remain -remember -remind -remove -repeat -replace -reply -respect -respond -rest -retreat -return -reveal -revenge -rhyme -rhythm -rich -ring -rip -ripple -rise -river -road -roam -roar -rock -roll -root -rope -rose -rough -royal -rub -rude -ruin -rule -run -rush -sad -sadness -safe -said -sail -salt -salty -sanctuary -sane -sanity -sat -satisfy -save -savior -scale -scar -scary -scatter -scene -scent -school -score -scrape -scratch -scream -screen -screw -sea -search -season -second -secret -seek -seem -self -selfish -sense -sent -sentence -separate -serious -serve -settle -seven -several -shade -shadow -shall -shame -shape -sharp -shatter -sheep -sheet -shelter -shield -shift -shimmer -shine -shiny -ship -shirt -shiver -shock -shoe -shook -shoot -shore -should -shoulder -shout -shove -show -shower -shown -shut -shy -sick -sigh -sign -silence -silent -silently -silly -silver -simple -simply -since -single -sink -sister -situation -six -size -skill -skin -skip -sky -slam -slap -sleep -slept -slice -slide -slight -slightly -slowly -small -smart -smell -smile -smoke -smooth -snake -snap -sneak -snow -soak -soar -sob -social -society -soft -softly -soldier -some -somebody -someday -somehow -someone -something -sometimes -somewhere -son -song -soon -soothe -sorrow -sorry -sort -soul -sound -space -speak -special -speed -spell -spend -spider -spill -spin -spine -spiral -spirit -split -spoken -sport -spot -spread -spring -square -squeeze -stab -stage -stain -stair -stand -stare -start -state -stay -steady -steal -steel -step -stick -still -sting -stir -stock -stole -stolen -stomach -stone -stood -stop -storm -story -straight -strain -strange -stranger -stray -stream -street -strength -stress -stretch -strife -strike -string -strip -stroke -strong -struggle -stubborn -stuck -student -study -stuff -stumble -stun -stupid -style -subject -such -sudden -suddenly -suffer -suffocate -suicide -suit -summer -sunlight -sunset -support -suppose -sure -surely -surface -surprise -surround -survive -suspend -swallow -sway -swear -sweat -sweet -swell -swim -swing -swirl -sword -sympathy -table -taint -take -taken -talent -talk -tangle -tap -task -taste -taught -tea -teach -teacher -team -tease -teeth -tell -tender -terrible -terror -test -thank -them -themselves -then -there -thick -thigh -thing -think -third -thorn -those -thought -thousand -thread -threaten -three -threw -throat -throne -through -throughout -throw -thrown -thump -thunder -tickle -tide -tie -tight -tightly -time -tiny -tired -today -toe -together -tomorrow -tongue -tonight -too -tool -torment -torture -toss -total -touch -tough -toward -tower -town -trace -trade -trail -train -travel -treasure -treat -tree -tremble -trick -trickle -trip -trouble -truck -true -truly -trust -truth -try -tuck -tumble -tune -turn -twenty -twice -twirl -twist -two -type -ugly -unable -uncle -under -underneath -understand -universe -unknown -unless -unlike -unseen -upon -upset -use -useless -usually -utter -vain -valley -value -vast -veil -vein -velvet -verse -very -victim -view -violence -vision -visit -voice -void -volume -waist -wait -walk -wall -wander -want -war -warm -warmth -warn -warrior -wash -waste -watch -water -wave -weak -weakness -weapon -weary -weather -weave -week -weep -weight -weird -welcome -wet -whatever -wheel -whenever -whether -whisper -whistle -white -whole -wife -wild -win -window -winter -wipe -wise -wish -witch -within -wolf -woman -women -won -wonder -wonderful -wood -work -world -worry -worse -worship -worst -worth -worthless -wound -wow -wrap -wrinkle -wrist -write -written -wrong -wrote -yard -yeah -yearn -yell -yellow -yesterday -yet -young -yours -yourself -youth diff --git a/example.hex b/example.hex deleted file mode 100644 index eccdd74..0000000 --- a/example.hex +++ /dev/null @@ -1,20 +0,0 @@ -c11e8406796ea352075234a0d50df5db7c46b3c2 -ab7e21d65f521e163884d81aea511ec69ef98e46 -462e1f7a4a5cd8492cea59d5c4d5e11932502678 -d63a5fe438b61a2bb266dff616568b5ec7b1bd8f -b99862ff6ef6b684936fe1626bda31eebbc9d3f0 -7cd9347d6e68c85cfe91ff387212d5ebd6d5370d -177a53b6eeed7c4094ea2c4c494adbe106d5d7ac -21c81a7464652486531625108df9b5728fb10110 -c8bd7e593131a86a7734f907f32dbe92b5f4fce7 -d3692ad7412becbefec7713c43e5a646cdd77b98 -0e86a4e84164e4a52572fa8e6729c9014106c8b8 -d1b0889f4670567a62d2f2ea063b9d5c1bda6d53 -83ba53b0add5a00479a791d166161244dfb25dca -d7a569c0619a5b5eb1a08f068bc265dcc89d6f07 -a93edadecca1168ded53242dec7a1d188a11e933 -626cb4e0e213e66d0036596076c9ccbf4b68d542 -6c216b2058d091a97d13af0c1f7dc85a66992f44 -8610efb039f75bd8df3e8694693a03d9d7030005 -9c0bc073af574cd7670777c401ad43b33535dc7d -975db601575895c656fdd36902bfb46a109eda09 diff --git a/generate12words.py b/generate12words.py deleted file mode 100644 index 07de127..0000000 --- a/generate12words.py +++ /dev/null @@ -1,99 +0,0 @@ -#!/usr/bin/env python -# encoding: utf-8 -""" - - -# Bip39 by TheRealLordFractal 2019 - -""" - -import sys -import getopt -import random - -#sys.stdout = open('output.txt','wt') - -help_message = ''' -Bip39 12 Word Random Generator By TheRealLordFractal -Output File Saved as 12words.txt -Command Exntensions: --n or --number : Number of sample code phrases given. (Default is 5) --w or --wordlist : Uses another wordlist to generate code phrases from. -''' - -CODEWORDS = open('wordlist.txt', 'r').readlines() -outputtxt = open('12words.txt', 'w') - -class Usage(Exception): - def __init__(self, msg): - self.msg = msg - -def generate(prefix=False, number=5): - while number > 0: - if prefix == 'TRUE': - print ("Not Supported.") - # word1 = PREFIXES[int(random.uniform(0,len(PREFIXES)))] - elif prefix: - word1 = prefix - else: - word1 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word2 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word3 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word4 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word5 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word6 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word7 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word8 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word9 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word10 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word11 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word12 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - print >> outputtxt, " %s %s %s %s %s %s %s %s %s %s %s %s " % (word1.rstrip(), word2.rstrip(), word3.rstrip(), word4.rstrip(), word5.rstrip(), word6.rstrip(), word7.rstrip(), word8.rstrip(), word9.rstrip(), word10.rstrip(), word11.rstrip(), word12.rstrip()) - - number -= 1 - - -def main(argv=None): - - number = 5 - prefix = False - - if argv is None: - argv = sys.argv - try: - try: - opts, args = getopt.getopt(argv[1:], "hn:p:i:vw:", ["help", "number=", "prefix=", "wordlist="]) - except getopt.error, msg: - raise Usage(msg) - - # option processing - for option, value in opts: - if option == "-v": - verbose = True - if option in ("-h", "--help"): - raise Usage(help_message) - if option in ("-n", "--number"): - number = int(value) - if option in ("-w", "--wordlist"): - global CODEWORDS - print "Importing: %s" % value - CODEWORDS = open(value, 'r').readlines() - if option in ("-p", "--prefixe"): - - print value - - if (value): - prefix = value - else: - prefix = 'TRUE' - - generate(prefix, number) - - except Usage, err: - print >> sys.stderr, sys.argv[0].split("/")[-1] + ": " + str(err.msg) - print >> sys.stderr, "\t for help use --help" - return 2 - - -if __name__ == "__main__": - sys.exit(main()) diff --git a/generate2words.py b/generate2words.py deleted file mode 100644 index 10db4a1..0000000 --- a/generate2words.py +++ /dev/null @@ -1,90 +0,0 @@ -#!/usr/bin/env python -# encoding: utf-8 -""" -code_phrase_geneator.py - -#Created by Scott Roberts. -#Copyright (c) 2011 TogaFoamParty Studios. All rights reserved. - -# Updated to use Bip39 by TheRealLordFractal 2019 - -""" - -import sys -import getopt -import random - - -help_message = ''' -Code Phrase Generator --n or --number : Number of sample code phrases given. (Default is 5) --p or --prefix : Uses a prefix word along with a random codeword instead of two codewords. --w or --wordlist : Uses another wordlist to generate code phrases from. -''' - -CODEWORDS = open('wordlist.txt', 'r').readlines() - - -class Usage(Exception): - def __init__(self, msg): - self.msg = msg - -def generate(prefix=False, number=5): - while number > 0: - if prefix == 'TRUE': - word1 = PREFIXES[int(random.uniform(0,len(PREFIXES)))] - elif prefix: - word1 = prefix - else: - word1 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - - word2 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - print " %s %s" % (word1.rstrip(), word2.rstrip()) - - number -= 1 - - -def main(argv=None): - - number = 5 - prefix = False - - if argv is None: - argv = sys.argv - try: - try: - opts, args = getopt.getopt(argv[1:], "hn:p:i:vw:", ["help", "number=", "prefix=", "wordlist="]) - except getopt.error, msg: - raise Usage(msg) - - # option processing - for option, value in opts: - if option == "-v": - verbose = True - if option in ("-h", "--help"): - raise Usage(help_message) - if option in ("-n", "--number"): - number = int(value) - if option in ("-w", "--wordlist"): - global CODEWORDS - print "Importing: %s" % value - CODEWORDS = open(value, 'r').readlines() - if option in ("-p", "--prefixe"): - - print value - - if (value): - prefix = value - else: - prefix = 'TRUE' - - generate(prefix, number) - - except Usage, err: - print >> sys.stderr, sys.argv[0].split("/")[-1] + ": " + str(err.msg) - print >> sys.stderr, "\t for help use --help" - return 2 - - -if __name__ == "__main__": - sys.exit(main()) diff --git a/generate3words.py b/generate3words.py deleted file mode 100644 index 26cc49d..0000000 --- a/generate3words.py +++ /dev/null @@ -1,91 +0,0 @@ -#!/usr/bin/env python -# encoding: utf-8 -""" -code_phrase_geneator.py - -#Created by Scott Roberts. -#Copyright (c) 2011 TogaFoamParty Studios. All rights reserved. - -# Updated to use Bip39 by TheRealLordFractal 2019 - -""" - -import sys -import getopt -import random - - -help_message = ''' -Code Phrase Generator --n or --number : Number of sample code phrases given. (Default is 5) --p or --prefix : Uses a prefix word along with a random codeword instead of two codewords. --w or --wordlist : Uses another wordlist to generate code phrases from. -''' - -CODEWORDS = open('wordlist.txt', 'r').readlines() - - -class Usage(Exception): - def __init__(self, msg): - self.msg = msg - -def generate(prefix=False, number=5): - while number > 0: - if prefix == 'TRUE': - word1 = PREFIXES[int(random.uniform(0,len(PREFIXES)))] - elif prefix: - word1 = prefix - else: - word1 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - - word2 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word3 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - print " %s %s %s" % (word1.rstrip(), word2.rstrip(), word3.rstrip()) - - number -= 1 - - -def main(argv=None): - - number = 5 - prefix = False - - if argv is None: - argv = sys.argv - try: - try: - opts, args = getopt.getopt(argv[1:], "hn:p:i:vw:", ["help", "number=", "prefix=", "wordlist="]) - except getopt.error, msg: - raise Usage(msg) - - # option processing - for option, value in opts: - if option == "-v": - verbose = True - if option in ("-h", "--help"): - raise Usage(help_message) - if option in ("-n", "--number"): - number = int(value) - if option in ("-w", "--wordlist"): - global CODEWORDS - print "Importing: %s" % value - CODEWORDS = open(value, 'r').readlines() - if option in ("-p", "--prefixe"): - - print value - - if (value): - prefix = value - else: - prefix = 'TRUE' - - generate(prefix, number) - - except Usage, err: - print >> sys.stderr, sys.argv[0].split("/")[-1] + ": " + str(err.msg) - print >> sys.stderr, "\t for help use --help" - return 2 - - -if __name__ == "__main__": - sys.exit(main()) diff --git a/generate6words.py b/generate6words.py deleted file mode 100644 index e716535..0000000 --- a/generate6words.py +++ /dev/null @@ -1,93 +0,0 @@ -#!/usr/bin/env python -# encoding: utf-8 -""" - - -# Bip39 by TheRealLordFractal 2019 - -""" - -import sys -import getopt -import random - -#sys.stdout = open('output.txt','wt') - -help_message = ''' -Bip39 6 Word Random Generator By TheRealLordFractal -Output File Saved as 12words.txt -Command Exntensions: --n or --number : Number of sample code phrases given. (Default is 5) --w or --wordlist : Uses another wordlist to generate code phrases from. -''' - -CODEWORDS = open('wordlist.txt', 'r').readlines() -outputtxt = open('6words.txt', 'w') - -class Usage(Exception): - def __init__(self, msg): - self.msg = msg - -def generate(prefix=False, number=5): - while number > 0: - if prefix == 'TRUE': - print ("Not Supported.") - # word1 = PREFIXES[int(random.uniform(0,len(PREFIXES)))] - elif prefix: - word1 = prefix - else: - word1 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word2 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word3 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word4 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word5 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word6 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - print >> outputtxt, " %s %s %s %s %s %s " % (word1.rstrip(), word2.rstrip(), word3.rstrip(), word4.rstrip(), word5.rstrip(), word6.rstrip()) - - number -= 1 - - -def main(argv=None): - - number = 5 - prefix = False - - if argv is None: - argv = sys.argv - try: - try: - opts, args = getopt.getopt(argv[1:], "hn:p:i:vw:", ["help", "number=", "prefix=", "wordlist="]) - except getopt.error, msg: - raise Usage(msg) - - # option processing - for option, value in opts: - if option == "-v": - verbose = True - if option in ("-h", "--help"): - raise Usage(help_message) - if option in ("-n", "--number"): - number = int(value) - if option in ("-w", "--wordlist"): - global CODEWORDS - print "Importing: %s" % value - CODEWORDS = open(value, 'r').readlines() - if option in ("-p", "--prefixe"): - - print value - - if (value): - prefix = value - else: - prefix = 'TRUE' - - generate(prefix, number) - - except Usage, err: - print >> sys.stderr, sys.argv[0].split("/")[-1] + ": " + str(err.msg) - print >> sys.stderr, "\t for help use --help" - return 2 - - -if __name__ == "__main__": - sys.exit(main()) diff --git a/generators/2.py b/generators/2.py index f99bf3c..bc4e80b 100755 --- a/generators/2.py +++ b/generators/2.py @@ -13,4 +13,4 @@ for line in file2.lines(): id_ = line.split()[0] if id_ in ids: - found.append("{} {}".format(ids[id_], line)) + found.append(f"{ids[id_]} {line}") diff --git a/hash160.py b/hash160.py deleted file mode 100644 index 31ff32f..0000000 --- a/hash160.py +++ /dev/null @@ -1,13 +0,0 @@ -import sys -from bit.base58 import b58decode_check -from bit.utils import bytes_to_hex -def address_to_hash160(address): - address_bytes = b58decode_check(address) - address_hash160 = bytes_to_hex(address_bytes)[2:] - - return address_hash160 -with open('list.txt') as textfile: - for line in textfile: - s = (line.rstrip('\n')) - h160=address_to_hash160(s) - print(h160) diff --git a/hex2blf.c b/hex2blf.c index c52db6b..7d8309c 100644 --- a/hex2blf.c +++ b/hex2blf.c @@ -19,8 +19,8 @@ #include "bloom.h" #include "hash160.h" -const double k_hashes = 20; -const double m_bits = 4294967296; +const double k_hashes = 25; +const double m_bits = 4294967296*2; int main(int argc, char **argv) { hash160_t hash; diff --git a/scripts/hash160.py b/scripts/hash160.py index 31ff32f..16d4a9f 100644 --- a/scripts/hash160.py +++ b/scripts/hash160.py @@ -3,9 +3,7 @@ from bit.utils import bytes_to_hex def address_to_hash160(address): address_bytes = b58decode_check(address) - address_hash160 = bytes_to_hex(address_bytes)[2:] - - return address_hash160 + return bytes_to_hex(address_bytes)[2:] with open('list.txt') as textfile: for line in textfile: s = (line.rstrip('\n')) From b160f390953423f132347c9d09bbe4cb48a8aaa0 Mon Sep 17 00:00:00 2001 From: dclavijo Date: Mon, 8 Jan 2024 18:31:31 -0300 Subject: [PATCH 38/40] 2to3 and blackify code --- generators/3.py | 43 +++++++------ generators/brain12.py | 80 ++++++++++++++--------- generators/brain24.py | 116 ++++++++++++++++++++++------------ generators/generate12words.py | 83 +++++++++++++++--------- generators/generate2words.py | 41 ++++++------ generators/generate3words.py | 43 +++++++------ generators/generate6words.py | 65 +++++++++++-------- scripts/hash160.py | 14 ++-- 8 files changed, 293 insertions(+), 192 deletions(-) diff --git a/generators/3.py b/generators/3.py index f5ef86d..4db4f43 100755 --- a/generators/3.py +++ b/generators/3.py @@ -15,32 +15,33 @@ import random -help_message = ''' +help_message = """ Code Phrase Generator -n or --number : Number of sample code phrases given. (Default is 5) -p or --prefix : Uses a prefix word along with a random codeword instead of two codewords. -w or --wordlist : Uses another wordlist to generate code phrases from. -''' +""" -CODEWORDS = open('wordlist.txt', 'r').readlines() +CODEWORDS = open("wordlist.txt", "r").readlines() class Usage(Exception): def __init__(self, msg): self.msg = msg + def generate(prefix=False, number=5): while number > 0: - if prefix == 'TRUE': - word1 = PREFIXES[int(random.uniform(0,len(PREFIXES)))] + if prefix == "TRUE": + word1 = PREFIXES[int(random.uniform(0, len(PREFIXES)))] elif prefix: word1 = prefix else: - word1 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] + word1 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] - word2 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word3 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - print "%s%s%s" % (word1.rstrip(), word2.rstrip(), word3.rstrip()) + word2 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + word3 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + print("%s%s%s" % (word1.rstrip(), word2.rstrip(), word3.rstrip())) number -= 1 @@ -54,8 +55,10 @@ def main(argv=None): argv = sys.argv try: try: - opts, args = getopt.getopt(argv[1:], "hn:p:i:vw:", ["help", "number=", "prefix=", "wordlist="]) - except getopt.error, msg: + opts, args = getopt.getopt( + argv[1:], "hn:p:i:vw:", ["help", "number=", "prefix=", "wordlist="] + ) + except getopt.error as msg: raise Usage(msg) # option processing @@ -67,23 +70,23 @@ def main(argv=None): if option in ("-n", "--number"): number = int(value) if option in ("-w", "--wordlist"): - global CODEWORDS - print "Importing: %s" % value - CODEWORDS = open(value, 'r').readlines() + global CODEWORDS + print("Importing: %s" % value) + CODEWORDS = open(value, "r").readlines() if option in ("-p", "--prefixe"): - print value + print(value) - if (value): + if value: prefix = value else: - prefix = 'TRUE' + prefix = "TRUE" generate(prefix, number) - except Usage, err: - print >> sys.stderr, sys.argv[0].split("/")[-1] + ": " + str(err.msg) - print >> sys.stderr, "\t for help use --help" + except Usage as err: + print(sys.argv[0].split("/")[-1] + ": " + str(err.msg), file=sys.stderr) + print("\t for help use --help", file=sys.stderr) return 2 diff --git a/generators/brain12.py b/generators/brain12.py index 3984de9..fdee9d2 100755 --- a/generators/brain12.py +++ b/generators/brain12.py @@ -11,43 +11,61 @@ import getopt import random -#sys.stdout = open('output.txt','wt') +# sys.stdout = open('output.txt','wt') -help_message = ''' +help_message = """ Bip39 12 Word Random Generator By TheRealLordFractal Output File Saved as 12words.txt Command Exntensions: -n or --number : Number of sample code phrases given. (Default is 5) -w or --wordlist : Uses another wordlist to generate code phrases from. -''' +""" + +CODEWORDS = open("wordlist.txt", "r").readlines() -CODEWORDS = open('wordlist.txt', 'r').readlines() class Usage(Exception): def __init__(self, msg): self.msg = msg + def generate(prefix=False, number=5): while number > 0: - if prefix == 'TRUE': - print ("Not Supported.") - # word1 = PREFIXES[int(random.uniform(0,len(PREFIXES)))] + if prefix == "TRUE": + print("Not Supported.") + # word1 = PREFIXES[int(random.uniform(0,len(PREFIXES)))] elif prefix: word1 = prefix else: - word1 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word2 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word3 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word4 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word5 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word6 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word7 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word8 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word9 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word10 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word11 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word12 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - print " %s %s %s %s %s %s %s %s %s %s %s %s " % (word1.rstrip(), word2.rstrip(), word3.rstrip(), word4.rstrip(), word5.rstrip(), word6.rstrip(), word7.rstrip(), word8.rstrip(), word9.rstrip(), word10.rstrip(), word11.rstrip(), word12.rstrip()) + word1 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + word2 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + word3 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + word4 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + word5 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + word6 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + word7 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + word8 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + word9 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + word10 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + word11 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + word12 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + print( + " %s %s %s %s %s %s %s %s %s %s %s %s " + % ( + word1.rstrip(), + word2.rstrip(), + word3.rstrip(), + word4.rstrip(), + word5.rstrip(), + word6.rstrip(), + word7.rstrip(), + word8.rstrip(), + word9.rstrip(), + word10.rstrip(), + word11.rstrip(), + word12.rstrip(), + ) + ) number -= 1 @@ -61,8 +79,10 @@ def main(argv=None): argv = sys.argv try: try: - opts, args = getopt.getopt(argv[1:], "hn:p:i:vw:", ["help", "number=", "prefix=", "wordlist="]) - except getopt.error, msg: + opts, args = getopt.getopt( + argv[1:], "hn:p:i:vw:", ["help", "number=", "prefix=", "wordlist="] + ) + except getopt.error as msg: raise Usage(msg) # option processing @@ -75,22 +95,22 @@ def main(argv=None): number = int(value) if option in ("-w", "--wordlist"): global CODEWORDS - print "Importing: %s" % value - CODEWORDS = open(value, 'r').readlines() + print("Importing: %s" % value) + CODEWORDS = open(value, "r").readlines() if option in ("-p", "--prefixe"): - print value + print(value) - if (value): + if value: prefix = value else: - prefix = 'TRUE' + prefix = "TRUE" generate(prefix, number) - except Usage, err: - print >> sys.stderr, sys.argv[0].split("/")[-1] + ": " + str(err.msg) - print >> sys.stderr, "\t for help use --help" + except Usage as err: + print(sys.argv[0].split("/")[-1] + ": " + str(err.msg), file=sys.stderr) + print("\t for help use --help", file=sys.stderr) return 2 diff --git a/generators/brain24.py b/generators/brain24.py index f9b0f17..89efd74 100755 --- a/generators/brain24.py +++ b/generators/brain24.py @@ -11,55 +11,85 @@ import getopt import random -#sys.stdout = open('output.txt','wt') +# sys.stdout = open('output.txt','wt') -help_message = ''' +help_message = """ Bip39 24 Word Random Generator By TheRealLordFractal Output File Saved as 24words.txt Command Exntensions: -n or --number : Number of sample code phrases given. (Default is 5) -w or --wordlist : Uses another wordlist to generate code phrases from. -''' +""" + +CODEWORDS = open("wordlist.txt", "r").readlines() -CODEWORDS = open('wordlist.txt', 'r').readlines() class Usage(Exception): def __init__(self, msg): self.msg = msg + def generate(prefix=False, number=5): while number > 0: - if prefix == 'TRUE': - print ("Not Supported.") - # word1 = PREFIXES[int(random.uniform(0,len(PREFIXES)))] + if prefix == "TRUE": + print("Not Supported.") + # word1 = PREFIXES[int(random.uniform(0,len(PREFIXES)))] elif prefix: word1 = prefix else: - word1 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word2 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word3 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word4 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word5 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word6 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word7 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word8 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word9 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word10 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word11 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word12 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word13 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word14 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word15 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word16 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word17 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word18 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word19 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word20 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word21 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word22 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word23 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word24 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - print " %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s " % (word1.rstrip(), word2.rstrip(), word3.rstrip(), word4.rstrip(), word5.rstrip(), word6.rstrip(), word7.rstrip(), word8.rstrip(), word9.rstrip(), word10.rstrip(), word11.rstrip(), word12.rstrip(), word13.rstrip(), word14.rstrip(), word15.rstrip(), word16.rstrip(), word17.rstrip(), word18.rstrip(), word19.rstrip(), word20.rstrip(), word21.rstrip(), word22.rstrip(), word23.rstrip(), word24.rstrip()) + word1 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + word2 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + word3 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + word4 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + word5 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + word6 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + word7 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + word8 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + word9 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + word10 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + word11 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + word12 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + word13 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + word14 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + word15 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + word16 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + word17 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + word18 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + word19 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + word20 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + word21 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + word22 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + word23 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + word24 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + print( + " %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s " + % ( + word1.rstrip(), + word2.rstrip(), + word3.rstrip(), + word4.rstrip(), + word5.rstrip(), + word6.rstrip(), + word7.rstrip(), + word8.rstrip(), + word9.rstrip(), + word10.rstrip(), + word11.rstrip(), + word12.rstrip(), + word13.rstrip(), + word14.rstrip(), + word15.rstrip(), + word16.rstrip(), + word17.rstrip(), + word18.rstrip(), + word19.rstrip(), + word20.rstrip(), + word21.rstrip(), + word22.rstrip(), + word23.rstrip(), + word24.rstrip(), + ) + ) number -= 1 @@ -73,8 +103,10 @@ def main(argv=None): argv = sys.argv try: try: - opts, args = getopt.getopt(argv[1:], "hn:p:i:vw:", ["help", "number=", "prefix=", "wordlist="]) - except getopt.error, msg: + opts, args = getopt.getopt( + argv[1:], "hn:p:i:vw:", ["help", "number=", "prefix=", "wordlist="] + ) + except getopt.error as msg: raise Usage(msg) # option processing @@ -87,22 +119,22 @@ def main(argv=None): number = int(value) if option in ("-w", "--wordlist"): global CODEWORDS - print "Importing: %s" % value - CODEWORDS = open(value, 'r').readlines() + print("Importing: %s" % value) + CODEWORDS = open(value, "r").readlines() if option in ("-p", "--prefixe"): - print value + print(value) - if (value): + if value: prefix = value else: - prefix = 'TRUE' + prefix = "TRUE" generate(prefix, number) - except Usage, err: - print >> sys.stderr, sys.argv[0].split("/")[-1] + ": " + str(err.msg) - print >> sys.stderr, "\t for help use --help" + except Usage as err: + print(sys.argv[0].split("/")[-1] + ": " + str(err.msg), file=sys.stderr) + print("\t for help use --help", file=sys.stderr) return 2 diff --git a/generators/generate12words.py b/generators/generate12words.py index 6ef2bc5..88dc970 100755 --- a/generators/generate12words.py +++ b/generators/generate12words.py @@ -11,44 +11,63 @@ import getopt import random -#sys.stdout = open('output.txt','wt') +# sys.stdout = open('output.txt','wt') -help_message = ''' +help_message = """ Bip39 12 Word Random Generator By TheRealLordFractal Output File Saved as 12words.txt Command Exntensions: -n or --number : Number of sample code phrases given. (Default is 5) -w or --wordlist : Uses another wordlist to generate code phrases from. -''' +""" + +CODEWORDS = open("wordlist.txt", "r").readlines() +outputtxt = open("12words.txt", "w") -CODEWORDS = open('wordlist.txt', 'r').readlines() -outputtxt = open('12words.txt', 'w') class Usage(Exception): def __init__(self, msg): self.msg = msg + def generate(prefix=False, number=5): while number > 0: - if prefix == 'TRUE': - print ("Not Supported.") - # word1 = PREFIXES[int(random.uniform(0,len(PREFIXES)))] + if prefix == "TRUE": + print("Not Supported.") + # word1 = PREFIXES[int(random.uniform(0,len(PREFIXES)))] elif prefix: word1 = prefix else: - word1 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word2 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word3 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word4 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word5 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word6 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word7 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word8 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word9 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word10 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word11 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word12 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - print >> outputtxt, "%s %s %s %s %s %s %s %s %s %s %s %s" % (word1.rstrip(), word2.rstrip(), word3.rstrip(), word4.rstrip(), word5.rstrip(), word6.rstrip(), word7.rstrip(), word8.rstrip(), word9.rstrip(), word10.rstrip(), word11.rstrip(), word12.rstrip()) + word1 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + word2 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + word3 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + word4 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + word5 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + word6 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + word7 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + word8 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + word9 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + word10 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + word11 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + word12 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + print( + "%s %s %s %s %s %s %s %s %s %s %s %s" + % ( + word1.rstrip(), + word2.rstrip(), + word3.rstrip(), + word4.rstrip(), + word5.rstrip(), + word6.rstrip(), + word7.rstrip(), + word8.rstrip(), + word9.rstrip(), + word10.rstrip(), + word11.rstrip(), + word12.rstrip(), + ), + file=outputtxt, + ) number -= 1 @@ -62,8 +81,10 @@ def main(argv=None): argv = sys.argv try: try: - opts, args = getopt.getopt(argv[1:], "hn:p:i:vw:", ["help", "number=", "prefix=", "wordlist="]) - except getopt.error, msg: + opts, args = getopt.getopt( + argv[1:], "hn:p:i:vw:", ["help", "number=", "prefix=", "wordlist="] + ) + except getopt.error as msg: raise Usage(msg) # option processing @@ -76,22 +97,22 @@ def main(argv=None): number = int(value) if option in ("-w", "--wordlist"): global CODEWORDS - print "Importing: %s" % value - CODEWORDS = open(value, 'r').readlines() + print("Importing: %s" % value) + CODEWORDS = open(value, "r").readlines() if option in ("-p", "--prefixe"): - print value + print(value) - if (value): + if value: prefix = value else: - prefix = 'TRUE' + prefix = "TRUE" generate(prefix, number) - except Usage, err: - print >> sys.stderr, sys.argv[0].split("/")[-1] + ": " + str(err.msg) - print >> sys.stderr, "\t for help use --help" + except Usage as err: + print(sys.argv[0].split("/")[-1] + ": " + str(err.msg), file=sys.stderr) + print("\t for help use --help", file=sys.stderr) return 2 diff --git a/generators/generate2words.py b/generators/generate2words.py index 2421cf2..4fb21a9 100755 --- a/generators/generate2words.py +++ b/generators/generate2words.py @@ -15,31 +15,32 @@ import random -help_message = ''' +help_message = """ Code Phrase Generator -n or --number : Number of sample code phrases given. (Default is 5) -p or --prefix : Uses a prefix word along with a random codeword instead of two codewords. -w or --wordlist : Uses another wordlist to generate code phrases from. -''' +""" -CODEWORDS = open('wordlist.txt', 'r').readlines() +CODEWORDS = open("wordlist.txt", "r").readlines() class Usage(Exception): def __init__(self, msg): self.msg = msg + def generate(prefix=False, number=5): while number > 0: - if prefix == 'TRUE': - word1 = PREFIXES[int(random.uniform(0,len(PREFIXES)))] + if prefix == "TRUE": + word1 = PREFIXES[int(random.uniform(0, len(PREFIXES)))] elif prefix: word1 = prefix else: - word1 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] + word1 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] - word2 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - print "%s %s" % (word1.rstrip(), word2.rstrip()) + word2 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + print("%s %s" % (word1.rstrip(), word2.rstrip())) number -= 1 @@ -53,8 +54,10 @@ def main(argv=None): argv = sys.argv try: try: - opts, args = getopt.getopt(argv[1:], "hn:p:i:vw:", ["help", "number=", "prefix=", "wordlist="]) - except getopt.error, msg: + opts, args = getopt.getopt( + argv[1:], "hn:p:i:vw:", ["help", "number=", "prefix=", "wordlist="] + ) + except getopt.error as msg: raise Usage(msg) # option processing @@ -66,23 +69,23 @@ def main(argv=None): if option in ("-n", "--number"): number = int(value) if option in ("-w", "--wordlist"): - global CODEWORDS - print "Importing: %s" % value - CODEWORDS = open(value, 'r').readlines() + global CODEWORDS + print("Importing: %s" % value) + CODEWORDS = open(value, "r").readlines() if option in ("-p", "--prefixe"): - print value + print(value) - if (value): + if value: prefix = value else: - prefix = 'TRUE' + prefix = "TRUE" generate(prefix, number) - except Usage, err: - print >> sys.stderr, sys.argv[0].split("/")[-1] + ": " + str(err.msg) - print >> sys.stderr, "\t for help use --help" + except Usage as err: + print(sys.argv[0].split("/")[-1] + ": " + str(err.msg), file=sys.stderr) + print("\t for help use --help", file=sys.stderr) return 2 diff --git a/generators/generate3words.py b/generators/generate3words.py index 1b701a0..1ed0b41 100755 --- a/generators/generate3words.py +++ b/generators/generate3words.py @@ -15,32 +15,33 @@ import random -help_message = ''' +help_message = """ Code Phrase Generator -n or --number : Number of sample code phrases given. (Default is 5) -p or --prefix : Uses a prefix word along with a random codeword instead of two codewords. -w or --wordlist : Uses another wordlist to generate code phrases from. -''' +""" -CODEWORDS = open('wordlist.txt', 'r').readlines() +CODEWORDS = open("wordlist.txt", "r").readlines() class Usage(Exception): def __init__(self, msg): self.msg = msg + def generate(prefix=False, number=5): while number > 0: - if prefix == 'TRUE': - word1 = PREFIXES[int(random.uniform(0,len(PREFIXES)))] + if prefix == "TRUE": + word1 = PREFIXES[int(random.uniform(0, len(PREFIXES)))] elif prefix: word1 = prefix else: - word1 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] + word1 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] - word2 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word3 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - print "%s %s %s" % (word1.rstrip(), word2.rstrip(), word3.rstrip()) + word2 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + word3 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + print("%s %s %s" % (word1.rstrip(), word2.rstrip(), word3.rstrip())) number -= 1 @@ -54,8 +55,10 @@ def main(argv=None): argv = sys.argv try: try: - opts, args = getopt.getopt(argv[1:], "hn:p:i:vw:", ["help", "number=", "prefix=", "wordlist="]) - except getopt.error, msg: + opts, args = getopt.getopt( + argv[1:], "hn:p:i:vw:", ["help", "number=", "prefix=", "wordlist="] + ) + except getopt.error as msg: raise Usage(msg) # option processing @@ -67,23 +70,23 @@ def main(argv=None): if option in ("-n", "--number"): number = int(value) if option in ("-w", "--wordlist"): - global CODEWORDS - print "Importing: %s" % value - CODEWORDS = open(value, 'r').readlines() + global CODEWORDS + print("Importing: %s" % value) + CODEWORDS = open(value, "r").readlines() if option in ("-p", "--prefixe"): - print value + print(value) - if (value): + if value: prefix = value else: - prefix = 'TRUE' + prefix = "TRUE" generate(prefix, number) - except Usage, err: - print >> sys.stderr, sys.argv[0].split("/")[-1] + ": " + str(err.msg) - print >> sys.stderr, "\t for help use --help" + except Usage as err: + print(sys.argv[0].split("/")[-1] + ": " + str(err.msg), file=sys.stderr) + print("\t for help use --help", file=sys.stderr) return 2 diff --git a/generators/generate6words.py b/generators/generate6words.py index a75c054..aed6843 100755 --- a/generators/generate6words.py +++ b/generators/generate6words.py @@ -11,38 +11,51 @@ import getopt import random -#sys.stdout = open('output.txt','wt') +# sys.stdout = open('output.txt','wt') -help_message = ''' +help_message = """ Bip39 6 Word Random Generator By TheRealLordFractal Output File Saved as 12words.txt Command Exntensions: -n or --number : Number of sample code phrases given. (Default is 5) -w or --wordlist : Uses another wordlist to generate code phrases from. -''' +""" + +CODEWORDS = open("wordlist.txt", "r").readlines() +outputtxt = open("6words.txt", "w") -CODEWORDS = open('wordlist.txt', 'r').readlines() -outputtxt = open('6words.txt', 'w') class Usage(Exception): def __init__(self, msg): self.msg = msg + def generate(prefix=False, number=5): while number > 0: - if prefix == 'TRUE': - print ("Not Supported.") - # word1 = PREFIXES[int(random.uniform(0,len(PREFIXES)))] + if prefix == "TRUE": + print("Not Supported.") + # word1 = PREFIXES[int(random.uniform(0,len(PREFIXES)))] elif prefix: word1 = prefix else: - word1 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word2 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word3 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word4 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word5 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - word6 = CODEWORDS[int(random.uniform(0,len(CODEWORDS)))] - print >> outputtxt, "%s %s %s %s %s %s" % (word1.rstrip(), word2.rstrip(), word3.rstrip(), word4.rstrip(), word5.rstrip(), word6.rstrip()) + word1 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + word2 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + word3 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + word4 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + word5 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + word6 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] + print( + "%s %s %s %s %s %s" + % ( + word1.rstrip(), + word2.rstrip(), + word3.rstrip(), + word4.rstrip(), + word5.rstrip(), + word6.rstrip(), + ), + file=outputtxt, + ) number -= 1 @@ -56,8 +69,10 @@ def main(argv=None): argv = sys.argv try: try: - opts, args = getopt.getopt(argv[1:], "hn:p:i:vw:", ["help", "number=", "prefix=", "wordlist="]) - except getopt.error, msg: + opts, args = getopt.getopt( + argv[1:], "hn:p:i:vw:", ["help", "number=", "prefix=", "wordlist="] + ) + except getopt.error as msg: raise Usage(msg) # option processing @@ -70,22 +85,22 @@ def main(argv=None): number = int(value) if option in ("-w", "--wordlist"): global CODEWORDS - print "Importing: %s" % value - CODEWORDS = open(value, 'r').readlines() + print("Importing: %s" % value) + CODEWORDS = open(value, "r").readlines() if option in ("-p", "--prefixe"): - print value + print(value) - if (value): + if value: prefix = value else: - prefix = 'TRUE' + prefix = "TRUE" generate(prefix, number) - except Usage, err: - print >> sys.stderr, sys.argv[0].split("/")[-1] + ": " + str(err.msg) - print >> sys.stderr, "\t for help use --help" + except Usage as err: + print(sys.argv[0].split("/")[-1] + ": " + str(err.msg), file=sys.stderr) + print("\t for help use --help", file=sys.stderr) return 2 diff --git a/scripts/hash160.py b/scripts/hash160.py index 16d4a9f..2ea3e31 100644 --- a/scripts/hash160.py +++ b/scripts/hash160.py @@ -1,11 +1,15 @@ import sys from bit.base58 import b58decode_check from bit.utils import bytes_to_hex + + def address_to_hash160(address): address_bytes = b58decode_check(address) return bytes_to_hex(address_bytes)[2:] -with open('list.txt') as textfile: - for line in textfile: - s = (line.rstrip('\n')) - h160=address_to_hash160(s) - print(h160) + + +with open("list.txt") as textfile: + for line in textfile: + s = line.rstrip("\n") + h160 = address_to_hash160(s) + print(h160) From 250062c802718e3bc4e01caec04366ce408ebf01 Mon Sep 17 00:00:00 2001 From: Sourcery AI <> Date: Mon, 8 Jan 2024 21:32:25 +0000 Subject: [PATCH 39/40] 'Refactored by Sourcery' --- generators/3.py | 10 +++------- generators/brain12.py | 24 +++-------------------- generators/brain24.py | 36 +++-------------------------------- generators/generate12words.py | 24 +++-------------------- generators/generate2words.py | 10 +++------- generators/generate3words.py | 10 +++------- generators/generate6words.py | 18 +++--------------- 7 files changed, 21 insertions(+), 111 deletions(-) diff --git a/generators/3.py b/generators/3.py index 4db4f43..961a6fd 100755 --- a/generators/3.py +++ b/generators/3.py @@ -41,7 +41,7 @@ def generate(prefix=False, number=5): word2 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] word3 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] - print("%s%s%s" % (word1.rstrip(), word2.rstrip(), word3.rstrip())) + print(f"{word1.rstrip()}{word2.rstrip()}{word3.rstrip()}") number -= 1 @@ -71,17 +71,13 @@ def main(argv=None): number = int(value) if option in ("-w", "--wordlist"): global CODEWORDS - print("Importing: %s" % value) + print(f"Importing: {value}") CODEWORDS = open(value, "r").readlines() if option in ("-p", "--prefixe"): print(value) - if value: - prefix = value - else: - prefix = "TRUE" - + prefix = value if value else "TRUE" generate(prefix, number) except Usage as err: diff --git a/generators/brain12.py b/generators/brain12.py index fdee9d2..2e247af 100755 --- a/generators/brain12.py +++ b/generators/brain12.py @@ -50,21 +50,7 @@ def generate(prefix=False, number=5): word11 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] word12 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] print( - " %s %s %s %s %s %s %s %s %s %s %s %s " - % ( - word1.rstrip(), - word2.rstrip(), - word3.rstrip(), - word4.rstrip(), - word5.rstrip(), - word6.rstrip(), - word7.rstrip(), - word8.rstrip(), - word9.rstrip(), - word10.rstrip(), - word11.rstrip(), - word12.rstrip(), - ) + f" {word1.rstrip()} {word2.rstrip()} {word3.rstrip()} {word4.rstrip()} {word5.rstrip()} {word6.rstrip()} {word7.rstrip()} {word8.rstrip()} {word9.rstrip()} {word10.rstrip()} {word11.rstrip()} {word12.rstrip()} " ) number -= 1 @@ -95,17 +81,13 @@ def main(argv=None): number = int(value) if option in ("-w", "--wordlist"): global CODEWORDS - print("Importing: %s" % value) + print(f"Importing: {value}") CODEWORDS = open(value, "r").readlines() if option in ("-p", "--prefixe"): print(value) - if value: - prefix = value - else: - prefix = "TRUE" - + prefix = value if value else "TRUE" generate(prefix, number) except Usage as err: diff --git a/generators/brain24.py b/generators/brain24.py index 89efd74..284bda2 100755 --- a/generators/brain24.py +++ b/generators/brain24.py @@ -62,33 +62,7 @@ def generate(prefix=False, number=5): word23 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] word24 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] print( - " %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s " - % ( - word1.rstrip(), - word2.rstrip(), - word3.rstrip(), - word4.rstrip(), - word5.rstrip(), - word6.rstrip(), - word7.rstrip(), - word8.rstrip(), - word9.rstrip(), - word10.rstrip(), - word11.rstrip(), - word12.rstrip(), - word13.rstrip(), - word14.rstrip(), - word15.rstrip(), - word16.rstrip(), - word17.rstrip(), - word18.rstrip(), - word19.rstrip(), - word20.rstrip(), - word21.rstrip(), - word22.rstrip(), - word23.rstrip(), - word24.rstrip(), - ) + f" {word1.rstrip()} {word2.rstrip()} {word3.rstrip()} {word4.rstrip()} {word5.rstrip()} {word6.rstrip()} {word7.rstrip()} {word8.rstrip()} {word9.rstrip()} {word10.rstrip()} {word11.rstrip()} {word12.rstrip()} {word13.rstrip()} {word14.rstrip()} {word15.rstrip()} {word16.rstrip()} {word17.rstrip()} {word18.rstrip()} {word19.rstrip()} {word20.rstrip()} {word21.rstrip()} {word22.rstrip()} {word23.rstrip()} {word24.rstrip()} " ) number -= 1 @@ -119,17 +93,13 @@ def main(argv=None): number = int(value) if option in ("-w", "--wordlist"): global CODEWORDS - print("Importing: %s" % value) + print(f"Importing: {value}") CODEWORDS = open(value, "r").readlines() if option in ("-p", "--prefixe"): print(value) - if value: - prefix = value - else: - prefix = "TRUE" - + prefix = value if value else "TRUE" generate(prefix, number) except Usage as err: diff --git a/generators/generate12words.py b/generators/generate12words.py index 88dc970..d03eb90 100755 --- a/generators/generate12words.py +++ b/generators/generate12words.py @@ -51,21 +51,7 @@ def generate(prefix=False, number=5): word11 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] word12 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] print( - "%s %s %s %s %s %s %s %s %s %s %s %s" - % ( - word1.rstrip(), - word2.rstrip(), - word3.rstrip(), - word4.rstrip(), - word5.rstrip(), - word6.rstrip(), - word7.rstrip(), - word8.rstrip(), - word9.rstrip(), - word10.rstrip(), - word11.rstrip(), - word12.rstrip(), - ), + f"{word1.rstrip()} {word2.rstrip()} {word3.rstrip()} {word4.rstrip()} {word5.rstrip()} {word6.rstrip()} {word7.rstrip()} {word8.rstrip()} {word9.rstrip()} {word10.rstrip()} {word11.rstrip()} {word12.rstrip()}", file=outputtxt, ) @@ -97,17 +83,13 @@ def main(argv=None): number = int(value) if option in ("-w", "--wordlist"): global CODEWORDS - print("Importing: %s" % value) + print(f"Importing: {value}") CODEWORDS = open(value, "r").readlines() if option in ("-p", "--prefixe"): print(value) - if value: - prefix = value - else: - prefix = "TRUE" - + prefix = value if value else "TRUE" generate(prefix, number) except Usage as err: diff --git a/generators/generate2words.py b/generators/generate2words.py index 4fb21a9..bb23d1c 100755 --- a/generators/generate2words.py +++ b/generators/generate2words.py @@ -40,7 +40,7 @@ def generate(prefix=False, number=5): word1 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] word2 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] - print("%s %s" % (word1.rstrip(), word2.rstrip())) + print(f"{word1.rstrip()} {word2.rstrip()}") number -= 1 @@ -70,17 +70,13 @@ def main(argv=None): number = int(value) if option in ("-w", "--wordlist"): global CODEWORDS - print("Importing: %s" % value) + print(f"Importing: {value}") CODEWORDS = open(value, "r").readlines() if option in ("-p", "--prefixe"): print(value) - if value: - prefix = value - else: - prefix = "TRUE" - + prefix = value if value else "TRUE" generate(prefix, number) except Usage as err: diff --git a/generators/generate3words.py b/generators/generate3words.py index 1ed0b41..01a2d5e 100755 --- a/generators/generate3words.py +++ b/generators/generate3words.py @@ -41,7 +41,7 @@ def generate(prefix=False, number=5): word2 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] word3 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] - print("%s %s %s" % (word1.rstrip(), word2.rstrip(), word3.rstrip())) + print(f"{word1.rstrip()} {word2.rstrip()} {word3.rstrip()}") number -= 1 @@ -71,17 +71,13 @@ def main(argv=None): number = int(value) if option in ("-w", "--wordlist"): global CODEWORDS - print("Importing: %s" % value) + print(f"Importing: {value}") CODEWORDS = open(value, "r").readlines() if option in ("-p", "--prefixe"): print(value) - if value: - prefix = value - else: - prefix = "TRUE" - + prefix = value if value else "TRUE" generate(prefix, number) except Usage as err: diff --git a/generators/generate6words.py b/generators/generate6words.py index aed6843..ec56944 100755 --- a/generators/generate6words.py +++ b/generators/generate6words.py @@ -45,15 +45,7 @@ def generate(prefix=False, number=5): word5 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] word6 = CODEWORDS[int(random.uniform(0, len(CODEWORDS)))] print( - "%s %s %s %s %s %s" - % ( - word1.rstrip(), - word2.rstrip(), - word3.rstrip(), - word4.rstrip(), - word5.rstrip(), - word6.rstrip(), - ), + f"{word1.rstrip()} {word2.rstrip()} {word3.rstrip()} {word4.rstrip()} {word5.rstrip()} {word6.rstrip()}", file=outputtxt, ) @@ -85,17 +77,13 @@ def main(argv=None): number = int(value) if option in ("-w", "--wordlist"): global CODEWORDS - print("Importing: %s" % value) + print(f"Importing: {value}") CODEWORDS = open(value, "r").readlines() if option in ("-p", "--prefixe"): print(value) - if value: - prefix = value - else: - prefix = "TRUE" - + prefix = value if value else "TRUE" generate(prefix, number) except Usage as err: From 07cc8e32e9bb7d451277c4b598e7d17c815d981a Mon Sep 17 00:00:00 2001 From: kenorb Date: Sun, 3 Nov 2024 18:29:02 +0000 Subject: [PATCH 40/40] Fixes Check workflow --- .github/workflows/check.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 4b75e7b..4b3a33d 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -10,12 +10,10 @@ jobs: Pre-commit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/cache@v1 + - uses: actions/checkout@v3 + - uses: actions/cache@v3 with: path: ~/.cache/pre-commit key: pre-commit|${{ hashFiles('.pre-commit-config.yaml') }} - - uses: actions/setup-python@v2 - with: - python-version: 3.9.10 - - uses: pre-commit/action@v2.0.3 + - uses: actions/setup-python@v3 + - uses: pre-commit/action@v3.0.0