Created
April 5, 2021 12:36
-
-
Save tbbooher/7323fb42e88e544d3d50086785294b52 to your computer and use it in GitHub Desktop.
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
| ltrs = "灩捯䍔䙻ㄶ形楴獟楮獴㌴摟潦弸弰㑣〷㘰摽" | |
| nums = [ord(l) for l in ltrs] | |
| # picoCTF 2021 | |
| # ''.join([chr((ord(flag[i]) << 8) + ord(flag[i + 1])) for i in range(0, len(flag), 2)]) | |
| # cf https://play.picoctf.org/practice/challenge/104?originalEvent=34&page=1&search= | |
| chars = [] | |
| for l in ltrs: | |
| int_char = ord(l) | |
| offset = (int_char >> 8) | |
| char1 = chr(offset) | |
| chars.append(char1) | |
| char2 = chr(int_char - (offset << 8)) | |
| chars.append(char2) | |
| # print(chr(ord(l) >> 8),chr(ord(l))) | |
| # ''.join([chr((ord(flag[i]) << 8) + ord(flag[i + 1])) for i in range(0, len(flag), 2)]) | |
| print(''.join(chars)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment