Skip to content

Commit

Permalink
Electrum format: Check for "zprv" in addition to "xprv"
Browse files Browse the repository at this point in the history
See #4556
  • Loading branch information
solardiz committed Mar 19, 2024
1 parent fae4325 commit 0a307ff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/electrum_fmt_plug.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,10 +302,10 @@ static int crypt_all(int *pcount, struct db_salt *salt)
else
cracked[index+i] = 1;
} else if (cur_salt->type == 2) {
// check if starting 4 bytes are "xprv"
if (strncmp((const char*)outbuf, "xprv", 4))
// check if starting 4 bytes are "xprv" or "zprv"
if (memcmp(outbuf, "xprv", 4) && memcmp(outbuf, "zprv", 4)) {
cracked[index+i] = 0;
else {
} else {
// check if remaining 12 bytes are in base58 set [1-9A-HJ-NP-Za-km-z]
for (j = 0; j < 12; j++) {
unsigned char c = outbuf[4 + j];
Expand Down

0 comments on commit 0a307ff

Please sign in to comment.