fork download
  1. arr = [
  2. "00111111", "01010010", "01101001", "00000100", "00111000", "01010101", "01111101",
  3. "00010010", "00010011", "00011111", "01101101", "01100110", "00111111", "00100111",
  4. "00110011", "00100011", "00001110", "00100011", "00010010", "00101000", "01111100",
  5. "01010101", "00011101", "00100010", "01101000", "01111110", "01111011", "01101100",
  6. "01101011", "01000101", "00001101", "00100010", "01101000", "00000000", "01000111",
  7. "00010100", "00001101", "00111100", "01100111", "01101101", "01101001", "01111011",
  8. "00111010", "00111110", "00011001", "00000001", "00110000", "00101000", "00001001",
  9. "00001110", "00111110", "00010011", "00001001", "00111011", "00110000", "00110100",
  10. "00111000", "00101000", "00101000", "00001110", "00111100", "00010110", "00101000",
  11. "00101011", "00001010", "01110010", "01010011", "00110011", "01100111", "01111111",
  12. "00110101", "00100010", "00001101", "01100010", "01011111", "00110000", "00000010",
  13. "01101000", "00001101",
  14. ]
  15.  
  16. flag = "T"
  17. # result = ""
  18. # print(format(ord("N"), "08b"))
  19. # print(chr(int(format(ord("N"), "08b"),2)^int(arr[0], 2)))
  20.  
  21. for i, bin_str in enumerate(arr):
  22. # Get binary of current flag character (cyclic if needed)
  23. flag_bin = format(ord(flag[i]), "08b")
  24.  
  25. # XOR as integers
  26. xor_result = int(flag_bin, 2) ^ int(bin_str, 2)
  27.  
  28. # Append XORed character
  29. flag += chr(xor_result)
  30.  
  31.  
  32. print(flag)
Success #stdin #stdout 0.03s 63656KB
stdin
Standard input is empty
stdout
Tk9PTl9DVEZ7QnIzYWtfN2gzX0N5Y2wzX00wcnR5X1JpNWVfNGIwdmVfRjBjdXNfMG5fU2MxZW5jZX0=