Quickseller
Copper Member
Legendary
Offline
Activity: 2968
Merit: 2370
|
I understood this, the balance part is consulted in the blockchain api at the endpoint https://blockchain.info/balance?active passing the page addresses. What I still don't understand is how it manages to display these private keys of these addresses so quickly. I believe it is not via a database, because it would not be possible to record all the private keys and their addresses in a database and return this information so fast. The website starts with the private key, not the address. The website will start with the hex representation of a number, and will calculate the address based on that number being the private key. Look at the below function that prints the SHA hash of 60 numbers: import hashlib import time
def print_sha_hashes(page): start_time = time.time() start_number = page * 60 + 1 for i in range(60): number = start_number + i hex_value = hex(number)[2:].zfill(64) # Convert number to 64-digit hexadecimal string sha_hash = hashlib.sha256(hex_value.encode()).hexdigest() print(f"Number: {number}, Hex Value: {hex_value}, SHA Hash: {sha_hash}") end_time = time.time() execution_time = end_time - start_time print(f"\nExecution time: {execution_time:.6f} seconds")
print_sha_hashes(0)
Number: 1, Hex Value: 0000000000000000000000000000000000000000000000000000000000000001, SHA Hash: c386d8e8d07342f2e39e189c8e6c57bb205bb373fe4e3a6f69404a8bb767b417 Number: 2, Hex Value: 0000000000000000000000000000000000000000000000000000000000000002, SHA Hash: 68e4d75d23e31bd23f43266f769567b2588d9f3d3010fa7cacae7efd6f5ce0ad Number: 3, Hex Value: 0000000000000000000000000000000000000000000000000000000000000003, SHA Hash: ac7edb97166f7d682720aca18fea15cdd5d15242dad38297a48633a806236c4f Number: 4, Hex Value: 0000000000000000000000000000000000000000000000000000000000000004, SHA Hash: 1fb497d126f59b0448178d04f0a33ca8ff9460874d90018821d3f5872bd9a735 Number: 5, Hex Value: 0000000000000000000000000000000000000000000000000000000000000005, SHA Hash: f3ce024b388cdb11d0fa5f9f6981cef239040b17b67ca2dd77847e15bce5bc2f Number: 6, Hex Value: 0000000000000000000000000000000000000000000000000000000000000006, SHA Hash: 7908e999d34f7da8aa441b81bff818a7c89d7dbcb754def7bb3f70744c557b11 Number: 7, Hex Value: 0000000000000000000000000000000000000000000000000000000000000007, SHA Hash: 77982011336d915790e77d8301a52da5654857a870de65fb16d0cb1a44820b9c Number: 8, Hex Value: 0000000000000000000000000000000000000000000000000000000000000008, SHA Hash: db5a1efda6e8c581987be91c9a48b94ee39bd299b34c1d781ff1f6774e81503e Number: 9, Hex Value: 0000000000000000000000000000000000000000000000000000000000000009, SHA Hash: 1da5073ab17a3392066ca1b3049c07d043f374bcd69dc68362c21f98e3f6db8c Number: 10, Hex Value: 000000000000000000000000000000000000000000000000000000000000000a, SHA Hash: 20de310de6a82c906fbd35cc837c81ececd066e4ccb63353926f8cf629e9006f Number: 11, Hex Value: 000000000000000000000000000000000000000000000000000000000000000b, SHA Hash: 2307f77f4efd7b73db57a22478647fcfa9ad6a6a89a4b8ba6e73544b77d7f6d3 Number: 12, Hex Value: 000000000000000000000000000000000000000000000000000000000000000c, SHA Hash: c9e3c1590462415e49831a0fcb56701686e745bb936f5946dfb01a9075f2a6df Number: 13, Hex Value: 000000000000000000000000000000000000000000000000000000000000000d, SHA Hash: 6cac6fb7b1d694a47536b6c7d7cf7843cc3526b63b9cbc85f73ab9af611bd03a Number: 14, Hex Value: 000000000000000000000000000000000000000000000000000000000000000e, SHA Hash: 6e136befd04b2b460a0cd329a016e7935a7584c68a64c0964be379f96429e2be Number: 15, Hex Value: 000000000000000000000000000000000000000000000000000000000000000f, SHA Hash: 3a80cd661828bbcbc352b7253aa4913d66bb9fbf0e86c80d72635b64cfb7a112 Number: 16, Hex Value: 0000000000000000000000000000000000000000000000000000000000000010, SHA Hash: 2db2ff724c9b7f7bcd175e6f6bd52e5af3a9ceb1ec98375bdf96c67b5e3d3f72 Number: 17, Hex Value: 0000000000000000000000000000000000000000000000000000000000000011, SHA Hash: e9ec13ffcb3917b042d999a0b6753258669fdf3700b529dcc11a4f5ee8a927a0 Number: 18, Hex Value: 0000000000000000000000000000000000000000000000000000000000000012, SHA Hash: b23a54d1c46d853b8c19fa6ea951f35ebb46af286b793d73fa45b02574c7243a Number: 19, Hex Value: 0000000000000000000000000000000000000000000000000000000000000013, SHA Hash: 983d8d5716ccf6e6e8642c6ace259eabced2697be23406cce4b848b7159cde74 Number: 20, Hex Value: 0000000000000000000000000000000000000000000000000000000000000014, SHA Hash: 087bee4b25350ee462142f6270ae6f453ee5bcbd2d7ccb5f0a2223602897c088 Number: 21, Hex Value: 0000000000000000000000000000000000000000000000000000000000000015, SHA Hash: 3c02342f671786b080e65cda12266248d6565a74e61c701cd0255111da148489 Number: 22, Hex Value: 0000000000000000000000000000000000000000000000000000000000000016, SHA Hash: d785a54aabc39a9eef45b3e38ac0e598d44b45756e9a610ef851f77aa324e895 Number: 23, Hex Value: 0000000000000000000000000000000000000000000000000000000000000017, SHA Hash: d02c3b01349ac19c5f08219c9231b0ce7ad4ecb03ef008a9c228a65759eb89b8 Number: 24, Hex Value: 0000000000000000000000000000000000000000000000000000000000000018, SHA Hash: d8707b923173c07643a1dc6e640f87dbdb22613648217abc8004574411f62b9d Number: 25, Hex Value: 0000000000000000000000000000000000000000000000000000000000000019, SHA Hash: 094e2c66cbe2d084d9e1acba523f9c737d84db8b413c9625a2f29fe90639bad0 Number: 26, Hex Value: 000000000000000000000000000000000000000000000000000000000000001a, SHA Hash: 7eeff6966e9270ad30801318e59df577d335aeb5c603a03eaa910201f79e77a7 Number: 27, Hex Value: 000000000000000000000000000000000000000000000000000000000000001b, SHA Hash: 6841d4809ddd8364456b40123b0135806998081c92e4f833af56bc19003005c4 Number: 28, Hex Value: 000000000000000000000000000000000000000000000000000000000000001c, SHA Hash: 1c1af531d4845f1d73b06d69451008a254426d6a84919238a05c77de5f7824f9 Number: 29, Hex Value: 000000000000000000000000000000000000000000000000000000000000001d, SHA Hash: d70263a76849be1187728e413a6fe67d7cdd52d084423901a3e1f4d3f850bc2f Number: 30, Hex Value: 000000000000000000000000000000000000000000000000000000000000001e, SHA Hash: 83426ed6d7305298bccd709f5a430d5c82356c3205d72b836087968fd8bbb9aa Number: 31, Hex Value: 000000000000000000000000000000000000000000000000000000000000001f, SHA Hash: d282932b1fdef0787196b67cd318fc9546e01a3929d366fb3a4741478c45e4be Number: 32, Hex Value: 0000000000000000000000000000000000000000000000000000000000000020, SHA Hash: e9019e823952019da872ad7d73708876f4490ba86a8d5d040c264b11b5feb881 Number: 33, Hex Value: 0000000000000000000000000000000000000000000000000000000000000021, SHA Hash: d513972e27b822b76c6aeb654a4a6fa1c28593a38cdc62692314d5c3973ce6d8 Number: 34, Hex Value: 0000000000000000000000000000000000000000000000000000000000000022, SHA Hash: 4e6233ba6fc3917f250eccb0e3b8dbf6c7035da15af01e2064c0ca9be9799a66 Number: 35, Hex Value: 0000000000000000000000000000000000000000000000000000000000000023, SHA Hash: 1ca9ca3b178461811d537baeb4669a5ecaa4d0f15075b0b695a406f4b5d6e80e Number: 36, Hex Value: 0000000000000000000000000000000000000000000000000000000000000024, SHA Hash: 55fa8ece78cfff15ec5c8b8dc6a54d498c6ad5b67ca6d28855cb9ea87329f543 Number: 37, Hex Value: 0000000000000000000000000000000000000000000000000000000000000025, SHA Hash: 9c7f3aa0075af1b660381a12493b22464d1690f3908d5371db0e5998ec72711b Number: 38, Hex Value: 0000000000000000000000000000000000000000000000000000000000000026, SHA Hash: 7fb2de2c94cba16f6120c318fa84a22d51215f770ccd40e06b89f2fbf9d3fc25 Number: 39, Hex Value: 0000000000000000000000000000000000000000000000000000000000000027, SHA Hash: fa27334831692fc07ca1cf81e8ebbc585eb7f6ef06732bb97ea19cd3e29143e5 Number: 40, Hex Value: 0000000000000000000000000000000000000000000000000000000000000028, SHA Hash: 7673e529930d3d67ed30888e1ecc1a4db1bcfd56b55cad81ce963437af395abd Number: 41, Hex Value: 0000000000000000000000000000000000000000000000000000000000000029, SHA Hash: aad3988244df8219f78a9fd16999f6d0ec862ef95da4c6841aad1fbc404cd229 Number: 42, Hex Value: 000000000000000000000000000000000000000000000000000000000000002a, SHA Hash: 9cf49eeaaa45bd96bd47cf2cfeaeb0df96b82897144c8db521cc1330cc495761 Number: 43, Hex Value: 000000000000000000000000000000000000000000000000000000000000002b, SHA Hash: ca0af82b7371f98d130b06157f3f265fe23a090070ba4d4b0f597efd00c8db3e Number: 44, Hex Value: 000000000000000000000000000000000000000000000000000000000000002c, SHA Hash: 7bdeaebb086d0db991b7edf40221b35d9edc7068593528560c95cf0c403928b2 Number: 45, Hex Value: 000000000000000000000000000000000000000000000000000000000000002d, SHA Hash: 71de674921d8ea8fd3ba1abdb5f1ba504941d6095a37638d5be15c5a70d17469 Number: 46, Hex Value: 000000000000000000000000000000000000000000000000000000000000002e, SHA Hash: aba0bb46f05d94c27e3a2a0ce95671d1d5efdd21b128dedfc9293a8f9f8b4ff3 Number: 47, Hex Value: 000000000000000000000000000000000000000000000000000000000000002f, SHA Hash: 04d8cc205b85289843a4bf05e7c48ae646b1a0df90470b0fd03f1579487dc25d Number: 48, Hex Value: 0000000000000000000000000000000000000000000000000000000000000030, SHA Hash: 8da82336d5f76b112afc9f8d9c2d3f098445b98496b682cac2318ea465de9c29 Number: 49, Hex Value: 0000000000000000000000000000000000000000000000000000000000000031, SHA Hash: 41b7b7675f7199195a6f49862f87b4587ffeaf7437abe989853e1b366ced5856 Number: 50, Hex Value: 0000000000000000000000000000000000000000000000000000000000000032, SHA Hash: 7f6559d1d398dddee0f5682abcd7559a379bb5c871c2a8801f62d1e9a43b2b29 Number: 51, Hex Value: 0000000000000000000000000000000000000000000000000000000000000033, SHA Hash: 91e3a19c01e28046d97aed51648f9156700acf805a63d1f659629e47974e403e Number: 52, Hex Value: 0000000000000000000000000000000000000000000000000000000000000034, SHA Hash: 1e45a68b9086981e9cc8d1b972acfb24cb4f58ce8bad3e631091c75828cdafce Number: 53, Hex Value: 0000000000000000000000000000000000000000000000000000000000000035, SHA Hash: e00ea15d5da7615f6e8cb29bbb3bfaa9e787b90cfe1e3149432f1983ecc50075 Number: 54, Hex Value: 0000000000000000000000000000000000000000000000000000000000000036, SHA Hash: edaa1004b94bb526a61310aeba46084eab3cbc1a4bb2be18f0b0f9c7cd1d67c8 Number: 55, Hex Value: 0000000000000000000000000000000000000000000000000000000000000037, SHA Hash: c5368b8592df1a03a171b6031f5223668366b5eeef5540638566e6ee5636c1d2 Number: 56, Hex Value: 0000000000000000000000000000000000000000000000000000000000000038, SHA Hash: 73eb5fe6034e7055a004a8c4baba5a315070f6b3f6bc18365898af5ac338a842 Number: 57, Hex Value: 0000000000000000000000000000000000000000000000000000000000000039, SHA Hash: f8a19c7c24a1bd5e7a186caa8189d860093450a39aeeb30e28551b359f393978 Number: 58, Hex Value: 000000000000000000000000000000000000000000000000000000000000003a, SHA Hash: feccc5ff2ec0756f8499515b8a96dcab927b1fcbe4bf17ff7c30aea53dfef428 Number: 59, Hex Value: 000000000000000000000000000000000000000000000000000000000000003b, SHA Hash: 58a244088e6db8d1ea3eabb10a58585151170f7dcc3e430cdbf38bd6ea7a2a68 Number: 60, Hex Value: 000000000000000000000000000000000000000000000000000000000000003c, SHA Hash: d96bdf4a036f6ed21ddf42c3510a0d68dc4491127f6603630340382ebc026e1a
Execution time: 0.001308 seconds
The website you have visited does something similar, except instead of calculating the SHA256 hash, it calculates the address.
|