Created
August 22, 2019 23:01
-
-
Save stugmi/7fdac4e8e2a9673a96236dd0fc577190 to your computer and use it in GitHub Desktop.
Old script used for the old Sombra ARG that blizzard did
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| :PB@Bk: | |
| ,jB@@B@B@B@BBL. | |
| 7G@B@B@BMMMMMB@B@B@Nr | |
| :kB@B@@@MMOMOMOMOMMMM@B@B@B1, | |
| :5@B@B@B@BBMMOMOMOMOMOMOMM@@@B@B@BBu. | |
| 70@@@B@B@B@BXBBOMOMOMOMOMOMMBMPB@B@B@B@B@Nr | |
| G@@@BJ iB@B@@ OBMOMOMOMOMOMOM@2 B@B@B. EB@B@S | |
| @@BM@GJBU. iSuB@OMOMOMOMOMOMM@OU1: .kBLM@M@B@ | |
| B@MMB@B 7@BBMMOMOMOMOMOBB@: B@BMM@B | |
| @@@B@B 7@@@MMOMOMOMM@B@: @@B@B@ | |
| @@OLB. BNB@MMOMOMM@BEB rBjM@B | |
| @@ @ M OBOMOMM@q M .@ @@ | |
| @@OvB B:u@MMOMOMMBJiB .BvM@B | |
| @B@B@J 0@B@MMOMOMOMB@B@u q@@@B@ | |
| B@MBB@v G@@BMMMMMMMMMMMBB@5 F@BMM@B | |
| @BBM@BPNi LMEB@OMMMM@B@MMOMM@BZM7 rEqB@MBB@ | |
| B@@@BM B@B@B qBMOMB@B@B@BMOMBL B@B@B @B@B@M | |
| J@@@@PB@B@B@B7G@OMBB. ,@MMM@qLB@B@@@BqB@BBv | |
| iGB@,i0@M@B@MMO@E : M@OMM@@@B@Pii@@N: | |
| . B@M@B@MMM@B@B@B@MMM@@@M@B | |
| @B@B.i@MBB@B@B@@BM@::B@B@ | |
| B@@@ .B@B.:@B@ :B@B @B@O | |
| :0 r@B@ B@@ .@B@: P: | |
| vMB :@B@ :BO7 | |
| ,B@B |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| :PBBk: | |
| ,jB@B@B@B@BBL. | |
| 7GBBBMMMMMB@B@B@Nr | |
| :kBBMMOMOMOMOMMMMBB@B1, | |
| :5BBBBBMMOMOMOMOMOMOMMnBnB@BBu. | |
| 70nBBBBXBBOMOMOMOMOMOMMBMPBBB@B@B@Nr | |
| GBJ iBB OBMOMOMOMOMOMOM2 BB@B. EB@B@S | |
| BMGJBU. iSuBOMOMOMOMOMOMMOU1: .kBLMMB | |
| BMMBB 7BBMMOMOMOMOMOBB: BBMMB | |
| BB 7@MMOMOMOMM@B@: @@B@B@ | |
| OLB. BNBMMOMOMMBEB rBjMB | |
| @ @ M OBOMOMM@q M .@ @@ | |
| OvB B:uMMOMOMMBJiB .BvM@B | |
| BBJ 0BMMOMOMOMBB@u q@@@B@ | |
| BMBBv GBMMMMMMMMMMMBB5 FBMM@B | |
| BBMBPNi LMEB OMMMMBMMOMMBZM7 rEqBMBB | |
| BBM BmBB qBMOMBB BBMOMBL B@B@B @B@B@M | |
| JmPBBBB7GOMBB. ,@MMM@qLB@B@@@BqB@BBv | |
| iGB,i0MBnMMOE : M@OMM@@@B@Pii@@N: | |
| . BMBMMM@B@B@B@MMM@@@M@B | |
| @B@B.i@MBB@B@B@@BM@::B@B@ | |
| B@@@ .B@B.:@B@ :B@B @B@O | |
| :0 r@B@ B@@ .@B@: P: | |
| vMB :@B@ :BO7 | |
| ,B@B |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| from sys import version_info, exit | |
| def getDiff(original: str, moshed: str) -> str: | |
| diff = "" | |
| if verbose: | |
| print(f"Original length: {len(original)}\nMoshed length: {len(moshed)}") | |
| # iterates through both files and compare character | |
| for i in range(min(len(original), len(moshed))): | |
| org = original[i] | |
| mosh = moshed[i] | |
| # If characters on the same position don't match | |
| if org != mosh: | |
| # Subtract their charcode's to get the real character | |
| true_value = ord(mosh) - ord(org) | |
| diff += chr(true_value) | |
| if verbose: | |
| print(f"char[{i}]: skull-1({ord(org)} = {org}) AND skull-2({ord(mosh)} = {mosh})\n" +\ | |
| f"{ord(mosh)} - {ord(org)} = {true_value} = {chr(true_value)}") | |
| print(f"\nExtracted: {diff}") | |
| return diff | |
| def caeserChiper(plaintext: str, mod: int) -> str: | |
| deciphered = "" | |
| # https://en.wikipedia.org/wiki/Caesar_cipher#Example | |
| # f(x) = (x + k) (mod) | |
| for i in range(len(plaintext)): | |
| char = plaintext[i] | |
| if (char.isupper()): | |
| deciphered += chr((ord(char) - 65 + mod) % 26 + 65) | |
| elif (char.islower()): | |
| deciphered += chr((ord(char) - 97 + mod) % 26 + 97) | |
| else: | |
| deciphered += char | |
| print(f"\nDeciphered: {deciphered}\n") | |
| return deciphered | |
| if __name__ == "__main__": | |
| if version_info <= (3,6): | |
| exit("Use python3.6+ or fix the f-strings") | |
| verbose = True | |
| skull1 = open("skull-1.txt").read() | |
| skull2 = open("skull-2.txt").read() | |
| # 23 = the mod used for Caeser's cipher | |
| decrypted = caeserChiper(getDiff(skull1, skull2), 23).split("?") | |
| print(f"Noteworthy: {decrypted[1]}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment