richardkiss / pycoin

Python-based Bitcoin and alt-coin utility library.
MIT License
1.4k stars 497 forks source link

cant parse - cat 1.txt | xargs -n1 ku | grep hash160 #379

Open IKramsaev opened 3 years ago

IKramsaev commented 3 years ago

1

richardkiss commented 3 years ago

Note all base58 sequences are valid addresses. The last four bytes of the uudecoded binary form a checksum, which if it fails, rejects the address. There's not enough information here for me to know if that's what's happening due to truncation (and inability to cut-and-paste text from a graphic and my being too lazy to retype addresses if they were full anyway).

IKramsaev commented 3 years ago

All addresses are valid. if it scans 5 addresses it will find 1 hash160 if it scans 25 addresses it will find 1 hash160 It always finds hash160 only from the last address in the list Безымянный 1G9i9giLZvuXs7o2adW9giEUA2HcLg7xKw 1MZ56N697LL9ezMQisV3L4moBtdKxQHtHc 177oX4LY2YBAMyefEYLV22yZhk6RKMSt3b 133fVVzMYAvfJmkcxJFyeuwEjt31a2Ykkz 14AuCUvRo1SHMpmZvPYBPQf2NwME65GdLw 124SYEutPX6WVeVxpoXDrW1WhUbmZ4hnEu 17gSWG4ayADVNK61fwm7dsDnaNfLpqpPQv 1NYNShWCYtjm89QeSteuv7m8fMq4inYsT5 1H6UUoxAD9UEyB4bk6kTPihBDMSdccjK9x 1FJ6DQML4JzV4DyzM4Jz3UZZVHtJBtLgdc 1Mm7A3ixKYD9VxwSUFb2rD8Fyz3fGjHKM4 1HjL3QSVjnZmPefFfJfMmawd6qAPazGEkA

IKramsaev commented 3 years ago

Можете закрыть вопрос , я нашел аналогичное решение

skoroneos commented 3 years ago

i copied/paste the text addresses you posted and worked for me

cat tmp.txt | xargs -n1 ku | grep hash160 hash160 : a62f908471a871595394c750d154abb6bb7aae57 hash160 : e1733e203f9f1793f77416c17e512265ea13cc47 hash160 : 431a14f9f49bfcac2f5d43b03d43c4dcd461ebdf hash160 : 167136e7bfd19f308e739f0ef0b4a4abc67c3230 hash160 : 22c7b1941a03daf8676dfc9a429b70c10fd67f16 hash160 : 0b9eb1364093d960323989ad95b039f246138d26 hash160 : 4946446c54735a3871636148375934315848424d hash160 : ec496fa11d5f8da59c6fc455e9286ccc43e80e65 hash160 : b08b07f37f2fa1043f1ac6feac57e34831c87197 hash160 : 9ccd2f42fdb7df899a8f0fb4ad7569ef5bc9c348 hash160 : e3b9f4ed84ae67176762f00a83c63ace949badb2 hash160 : b78360c08be3905eff64549537a2ed5107311bdb

my guess is that there is a cr/lf issue with your file. Did you created in windows?

IKramsaev commented 3 years ago

yes , i create in windows

skoroneos commented 3 years ago

Use something like to this to convert the file to unix/linux format tr -d '\015' "windows-file" | xargs -n1 ku | grep hash160