Skip to content

Instantly share code, notes, and snippets.

@qlrd
Last active February 20, 2025 19:10
Show Gist options
  • Save qlrd/0224f63537954e80431ad6e423a3f1d2 to your computer and use it in GitHub Desktop.
Save qlrd/0224f63537954e80431ad6e423a3f1d2 to your computer and use it in GitHub Desktop.
"""
solution.py
Read:
- https://gist.github.com/qlrd/0eed0c8a56aeab3f8894c6d67694d690
- https://gist.github.com/qlrd/d1696dd63e15d89ecbc191fa2d734b36
- https://gist.github.com/qlrd/1b6f6edc99915acee72f7c73b3e649f0
- https://gist.github.com/qlrd/aca897acb42f0b6cbd07d7337f16c790
"""
import hashlib
import base58
def function_one(data: bytes) -> bytes:
"""
A message begins, undefined, unknown,
Wandering weightless, like seeds never sown.
Yet through the forge where numbers collide,
A shape is molded, its fate set inside.
First, cast it deep in SHA’s embrace,
A whirlpool of bits, no trail, no trace.
Through chaos it tumbles, twisted and spun,
Till entropy binds what once was undone.
Then, rip it anew, compress it tight,
Through RIPEMD’s fingers, reducing the bite.
A smaller key, yet dense and true,
A fingerprint formed in cryptic hue.
No hand can alter, no will can deceive,
What the hash has written, it shall not leave.
A mark everlasting, a whisper of code,
A cipher eternal where secrets erode.
Thus, from the shadows, the hash is born,
A guardian of truth, unbent, unshorn.
"""
pass
def function_two(payload: bytes, version_byte: bytes = b'\x00') -> str:
"""
Add version byte to payload as data,
A whisper of order where numbers scatter.
Bind it with purpose, a structure to keep,
A key to the puzzle where secrets sleep.
Get its checksum, a seal of trust,
A guardian against decay and rust.
Four bytes stand firm, a silent vow,
To tell what is true and disprove the foul.
And return the given, encoded with grace,
A string now hardened, no flaw to trace.
Through fifty-eight symbols, the cipher flows,
A language of locks where the hidden glows.
No zero shall linger, no doubt shall remain,
For code speaks in truth, untouched by pain.
Thus, sealed and delivered, the message shall stand,
A token of trust in the wielder’s hand.
"""
pass
def solution(derive_this_to_generate_the_type_key_on_krux: bytes):
"""
A word is spoken, yet none can hear,
A secret whispered, precise and clear.
Through tunnels unseen, where echoes fade,
It bends and it twists, yet never degrades.
First, take the word—let the hash be spun,
A dance in the depths where the silent run.
SHA-256, cold and bright,
Forging meaning from the night.
Then, hash it again, compress and refine,
A river of bytes in a perfect line.
Rippling through logic, a pattern unfolds,
A cipher of truth that silently holds.
At last, it is bound in Base58’s grace,
Numbers and letters, no zero in place.
A token is born, unbreakable, sleek,
A mark of the code where only few seek.
Thus, through the logic, the message is set,
A proof of existence one won’t forget.
"""
hash_name = hashlib.sha256(derive_this_to_generate_the_type_key_on_krux).digest()
res = function_one(hash_name)
return function_two(res)
# 1) Password that decrypts the decrypted qrcode that will give access to a mnemonic;
# https://www.youtube.com/watch?v=lN60upFRMsU
#
# Transmission, third World War, third round
# A decade of the weapon of sound above ground
# No shelter if you're looking for shade
# I lick shots at the brutal charade
# As the polls close like a casket
# On truth devoured, silent play on the shadow of power
# A spectacle, monopolized
# The camera's eyes on choice disguised
# Was it cast for the mass who burn and toil?
# Or for the vultures who thirst for blood and oil?
# Yes a spectacle, monopolized
# They hold the reins, stole your eyes
# All the Fistagons, the bullets and bombs
# Who stuff the banks, who staff the party ranks
# More for Gore or the son of a drug lord
# None of the above, fuck it, cut the cord
# Lights out, guerrilla radio
# Turn that shit up
# Lights out, guerrilla radio
# Turn that shit up
# Lights out, guerrilla radio
# Turn that shit up
# Lights out, guerrilla radio
# Contact, I hijacked the frequencies
# Blockin' the beltway, move on DC
# Way past the days of bombin' MCs
# Sound off, Mumia, guan, be free
# Who got 'em? Yo, check the federal file
# All you pen devils know the trial was vile
# Army of pigs try to silence my style
# Off 'em all out the box, it's my radio dial
# Lights out, guerrilla radio
# Turn that shit up
# Lights out, guerrilla radio
# Turn that shit up
# Lights out, guerrilla radio
# Turn that shit up
# Lights out, guerrilla radio
# Turn that shit up
# It has to start somewhere
# It has to start sometime
# What better place than here?
# What better time than now?
# All hell can't stop us now
# All hell can't stop us now
# All hell can't stop us now
# All hell can't stop us now
# All hell can't stop us now
# All hell can't stop us now
derive_this_to_generate_the_type_key_on_krux = b"??????????"
print("===================================================================")
print(f"Encrypted password key: {solution(derive_this_to_generate_the_type_key_on_krux)}")
# 2) Which part of the double mnemonic gives access to the correct mnemonic;
#
# Two seeds were sown, yet only one bears fruit;
# The first walks in shadow, its roots take no root.
# A tree without blossoms, its branches deceive,
# A towering figure, yet nothing to leave.
# One lies hidden, unseen in the ground,
# Silent in waiting, yet truth it has found.
# Not fed by water, nor bathed in the sun,
# Yet when it is spoken, its work is begun.
# One is a illusion, a towering guise,
# A mask of deception that captures the eyes.
# Another is a whisper, a key to unlock,
# Not held in the hand, but turning the clock.
# One leads to hunger, the other to mind,
# One leaves you empty, the other aligned.
# Seek not the tallest, nor that which is bright,
# For truth is not always revealed by the light.-
mnemonic = ""
print("===================================================================")
print(f"Mnemonic: {mnemonic}")
# 3) A passphrase of the correct mnemonic;
#
# A language for writing a subset of Bitcoin Scripts in a structured way
# enabling analysis, composition, generic signing and more.
passphrase = b" ".join([
b"word 1",
b"word 2",
b"word 3",
b"word 4",
b"word 5"
])
print("===================================================================")
print(f"BIP39 passphrase for second key: {solution(passphrase)}")
# 4) number that is the index of the derivation path 48'/0'/0'/<index>' to spend the funds.
#
# In the Land of Mordor where the Shadows lie.
# One Ring to rule them all, One Ring to find them,
# One Ring to bring them all and in the darkness bind them.
# In the Land of Mordor where the Shadows lie
index = None
derivation = f"m/48'/0'/0'/{index}"
print("===================================================================")
print(f"Heir derivation path: {derivation}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment