Skip to content

Commit

Permalink
Create nope.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Stalin-143 authored Dec 13, 2024
1 parent 6c0fb39 commit 6f5d347
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions nope.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import gmpy2
import hashlib

# Example function that tries to find the valid nonce (proof of work)
def solve_pow(challenge_string, difficulty):
for i in range(1000000): # Adjust this range as needed
test_string = f"{challenge_string}{i}"
hashed = hashlib.sha256(test_string.encode()).hexdigest()

# Example condition (check for leading zeros or any other PoW condition)
if hashed.startswith("0000"): # Change the condition based on difficulty
print(f"Found solution: {test_string}")
print(f"Hash: {hashed}")
break

# Example usage
challenge = "s.ACcQ.AAAWFevRT4AGFKDFvcfIyE5U"
difficulty = 1337
solve_pow(challenge, difficulty)

0 comments on commit 6f5d347

Please sign in to comment.