diff --git a/TensionUniverse/WFGY-SHA256-Verification-Tool.ipynb b/TensionUniverse/WFGY-SHA256-Verification-Tool.ipynb new file mode 100644 index 00000000..92d7af64 --- /dev/null +++ b/TensionUniverse/WFGY-SHA256-Verification-Tool.ipynb @@ -0,0 +1,110 @@ +{ + "nbformat": 4, + "nbformat_minor": 0, + "metadata": { + "colab": { + "provenance": [] + }, + "kernelspec": { + "name": "python3", + "display_name": "Python 3" + }, + "language_info": { + "name": "python" + } + }, + "cells": [ + { + "cell_type": "code", + "source": [ + "# Manual SHA256 Verification Tool for WFGY TXT File\n", + "# ==================================================\n", + "# Purpose:\n", + "# - Upload your local TXT file (e.g. WFGY-3.0_Singularity-Demo_AutoBoot_SHA256-Verifiable.txt)\n", + "# - Compute its SHA256 hash manually\n", + "# - Compare it with the official hash published on GitHub\n", + "#\n", + "# When to use this:\n", + "# - When an AI assistant cannot verify the file hash directly (e.g. no direct file access)\n", + "# - To double-check file integrity yourself in a trusted environment\n", + "# - Useful if filenames differ but you suspect the content is the same\n", + "#\n", + "# Official reference (from https://github.com/onestardao/WFGY README):\n", + "# - Expected SHA256: 58dbd432db3e6494364557257f7ce068eb59bdd039995dff4c281d655f7d464f\n", + "#\n", + "# Instructions:\n", + "# 1. Run this cell\n", + "# 2. Click \"Choose Files\" to upload your TXT\n", + "# 3. Wait for the hash to be computed and compared\n", + "# 4. If hashes match → your file content is identical to the official one (byte-for-byte)\n", + "# 5. If not → content differs (possible reasons: edits, different line endings, encoding changes)\n", + "#\n", + "# ==================================================\n", + "\n", + "from google.colab import files\n", + "import hashlib\n", + "\n", + "print(\"=== Manual SHA256 Verification for WFGY TXT File ===\")\n", + "print(\"Upload your TXT file now...\\n\")\n", + "\n", + "# Step 1: Upload the file\n", + "uploaded = files.upload()\n", + "\n", + "# Get the filename of the uploaded file (takes the first one if multiple)\n", + "filename = list(uploaded.keys())[0]\n", + "print(f\"\\nUploaded file: {filename}\")\n", + "\n", + "# Step 2: Compute SHA256 hash\n", + "def compute_sha256(file_path):\n", + " sha256 = hashlib.sha256()\n", + " with open(file_path, \"rb\") as f:\n", + " # Read in chunks to handle large files safely\n", + " for chunk in iter(lambda: f.read(65536), b\"\"):\n", + " sha256.update(chunk)\n", + " return sha256.hexdigest()\n", + "\n", + "file_hash = compute_sha256(filename)\n", + "print(\"\\nYour file's SHA256 hash:\")\n", + "print(file_hash)\n", + "\n", + "# Step 3: Official hash from GitHub (do NOT change this value manually)\n", + "official_hash = \"58dbd432db3e6494364557257f7ce068eb59bdd039995dff4c281d655f7d464f\"\n", + "\n", + "print(\"\\nOfficial SHA256 from GitHub README:\")\n", + "print(official_hash)\n", + "\n", + "# Step 4: Comparison result\n", + "print(\"\\nResult:\")\n", + "if file_hash == official_hash:\n", + " print(\"✅ MATCH! Your uploaded file has exactly the same content as the official version.\")\n", + " print(\" (Even if the filename is different, the raw bytes are identical.)\")\n", + "else:\n", + " print(\"❌ DO NOT MATCH!\")\n", + " print(\" Possible reasons:\")\n", + " print(\" - The file was edited or modified\")\n", + " print(\" - Different line endings (CRLF vs LF)\")\n", + " print(\" - Encoding issues or extra spaces/characters\")\n", + " print(\" - It's a different version of the file\")\n", + " print(\"\\nRecommendation:\")\n", + " print(\" Download the latest official raw file from:\")\n", + " print(\" https://raw.githubusercontent.com/onestardao/WFGY/main/TensionUniverse/WFGY-3.0_Singularity-Demo_AutoBoot_SHA256-Verifiable.txt\")\n", + " print(\" Then re-run this notebook with the fresh download.\")\n", + "\n", + "print(\"\\n=== Verification complete ===\")\n", + "print(\"If the checksum matches, you are now ready to challenge the\")\n", + "print(\"WFGY 3.0 · Singularity Demo and explore the system yourself.\")\n", + "print(\"\")\n", + "print(\"If you find this project interesting or useful,\")\n", + "print(\"consider giving it a ⭐ on GitHub to help more people discover it:\")\n", + "print(\"https://github.com/onestardao/WFGY\")\n", + "print(\"\")\n", + "print(\"Open, verifiable, reproducible. See what happens when more observers join.\")\n" + ], + "metadata": { + "id": "Rk571CHgCEA8" + }, + "execution_count": null, + "outputs": [] + } + ] +} \ No newline at end of file