## Proof of Concept for Hetzner's "Heray" PoW Captcha This is a proof of concept (PoC) for Hetzner's "Heray" Proof of Work (PoW) Captcha. Please note that this is neither functional nor the original code. It simply demonstrates how the system **could** work based on observed patterns and assumptions. ### Overview Hetzner's "Heray" PoW Captcha likely requires the client to solve a computational puzzle as a form of CAPTCHA, where a specific condition must be met for the challenge to be accepted. The solution involves generating a specific `mainbytes` value based on given `uuid` and `hsum` values. ### Process 1. **UUID Generation**: A UUID is generated or provided by the server. 2. **Random String Generation**: A random string is created. 3. **SHA-256 Hashing**: The combination of UUID, `hsum`, and the random string is encoded and hashed using SHA-256. 4. **Challenge Solution**: The script continuously hashes different values until a hash meeting a specific condition is found. 5. **WASM Computation**: The system leverages WebAssembly (WASM) for efficient computation, although the actual WASM code is not part of this PoC. ### Explanation of the Code (_a.js, _b.js, _c.js, _index.html) 1. **Random String and UUID Generation**: Functions are provided to generate random strings and UUIDs. 2. **UTF-8 Encoding and SHA-256 Hashing**: Functions are implemented to encode strings in UTF-8 and hash them using the Web Crypto API. 3. **Combining Values**: Combines the `uuid`, `hsum`, and a random string, then hashes the combined value to create `mainbytes`. 4. **Setting Values**: On page load, the script sets the generated `uuid` and `mainbytes` values in the appropriate fields. ### Note on WebAssembly (WASM) The actual implementation of Hetzner's "Heray" PoW Captcha likely involves leveraging WebAssembly (WASM) for efficient computation of the hash values. The JavaScript code provided here simulates the logic but does not include the WASM code due to its complexity and binary nature. In a real implementation, the WASM module would be loaded and utilized to perform the computationally intensive hashing operations. ### Disclaimer This repo is purely a demonstration based on assumptions and observed patterns. It is not functional and does not represent the actual implementation of Hetzner's "Heray" PoW Captcha.