Rating:

```python
import gzip

lines = []
with gzip.open('whatThe.py.gz','rt') as f:
for line in f:
lines.append(line)
```

```python
def deblob(text):
values = line.split("'")
results = []
for v in values:
try:
results.append((bytearray.fromhex(v)).decode())
except:
continue
return results
```

```python
lines[0][:1000]
```

"blob = ['626c6f62203d205b273632366336663632323033643230356232373336333233363633333636363336333233323330333336343332333033353632333233373333333633333332333333363336333333333336333633363333333633333332333333323333333033333333333633343333333233333330333333353336333233333332333333373333333333333336333333333333333233333333333333363333333633333333333333333333333633333336333333363333333333333336333333333333333233333333333333323333333333333330333333333333333333333336333333343333333333333332333333333333333033333333333333353333333633333332333333333333333233333333333333373333333333333333333333333333333633333333333333333333333333333332333333333333333333333333333333363333333333333336333333333333333333333333333333333333333333333336333333333333333633333333333333363333333333333333333333333333333633333333333333333333333333333332333333333333333333333333333333323333333333333333333333333333333033333333333333333333333333333333333333333333333633333333333333343333333333333333333333333333333233333333333333333"

```python
from copy import deepcopy

lines_copy = deepcopy(lines)
for i in range(50):
for line in lines_copy:
if line.strip():
print(len(line))
results = deblob(line)
for r in results:
if r.strip():
print(r[:100])
if 'blob = ' in r:
lines_copy = results
```

1113653066
blob = ['626c6f62203d205b273632366336663632323033643230356232373336333233363633333636363336333233323
whySoEagerToSolve

for i in blob:

print((bytearray.fromhex(i)).decode())

18
15
43
556826442
blob = ['626c6f62203d205b273632366336663632323033643230356232373336333233363633333636363336333233323
whySoEagerToSolve

for i in blob:

print((bytearray.fromhex(i)).decode())

18
15
43
278413130
blob = ['626c6f62203d205b273632366336663632323033643230356232373336333233363633333636363336333233323
whySoEagerToSolve

for i in blob:

print((bytearray.fromhex(i)).decode())

18
15
43
139206474
blob = ['626c6f62203d205b273632366336663632323033643230356232373336333233363633333636363336333233323
whySoEagerToSolve

for i in blob:

print((bytearray.fromhex(i)).decode())

18
15
43
69603146
blob = ['626c6f62203d205b273632366336663632323033643230356232373336333233363633333636363336333233323
whySoEagerToSolve

for i in blob:

print((bytearray.fromhex(i)).decode())

18
15
43
34801482
blob = ['626c6f62203d205b273632366336663632323033643230356232373336333233363633333636363336333233323
whySoEagerToSolve

for i in blob:

print((bytearray.fromhex(i)).decode())

18
15
43
17400650
blob = ['626c6f62203d205b273632366336663632323033643230356232373336333233363633333636363336333233323
whySoEagerToSolve

for i in blob:

print((bytearray.fromhex(i)).decode())

18
15
43
8700234
blob = ['626c6f62203d205b273632366336663632323033643230356232373336333233363633333636363336333233323
whySoEagerToSolve

for i in blob:

print((bytearray.fromhex(i)).decode())

18
15
43
4350026
blob = ['626c6f62203d205b273632366336663632323033643230356232373336333233363633333636363336333233323
whySoEagerToSolve

for i in blob:

print((bytearray.fromhex(i)).decode())

18
15
43
2174922
blob = ['626c6f62203d205b273632366336663632323033643230356232373336333233363633333636363336333233323
whySoEagerToSolve

for i in blob:

print((bytearray.fromhex(i)).decode())

18
15
43
1087370
blob = ['626c6f62203d205b273632366336663632323033643230356232373336333233363633333636363336333233323
whySoEagerToSolve

for i in blob:

print((bytearray.fromhex(i)).decode())

18
15
43
543594
blob = ['626c6f62203d205b273632366336663632323033643230356232373336333433363335333633363332333033373
whySoEagerToSolve

for i in blob:

print((bytearray.fromhex(i)).decode())

18
15
43
271706
blob = ['626c6f62203d205b273634363536363230373336663664363535333666373237343466363634353665363337323
whySoEagerToSolve

for i in blob:

print((bytearray.fromhex(i)).decode())

18
15
43
135762
blob = ['64656620736f6d65536f72744f66456e6372797074696f6e28666c6167293a0a', '2020202023206469646e742
whySoEagerToSolve

for i in blob:

print((bytearray.fromhex(i)).decode())

18
15
43
67790
def someSortOfEncryption(flag):

# didnt't have time to make my cpp file a shared library. Now i cannot use

# the encryption function from my cpp code :(

blob = [11111, 10001011, 1000, 0, 1001100, 10011011, 10111100, 1100010, 10, 11111111, 10101101,
# ok, i will have my cpp code here just for a while

return "broken_function"

eval(''+eval('str(str)[+all([])]')+eval('str(str'+eval('str('+str(eval)[eval(str((+all([])))+str((+a
18
15
43
32
79
50
3931
56
29
29694
32
79
50
3931
56
29
29694
32
79
50
3931
56
29
29694
32
79
50
3931
56
29
29694
32
79
50
3931
56
29
29694
32
79
50
3931
56
29
29694
32
79
50
3931
56
29
29694
32
79
50
3931
56
29
29694
32
79
50
3931
56
29
29694
32
79
50
3931
56
29
29694
32
79
50
3931
56
29
29694
32
79
50
3931
56
29
29694
32
79
50
3931
56
29
29694
32
79
50
3931
56
29
29694
32
79
50
3931
56
29
29694
32
79
50
3931
56
29
29694
32
79
50
3931
56
29
29694
32
79
50
3931
56
29
29694
32
79
50
3931
56
29
29694
32
79
50
3931
56
29
29694
32
79
50
3931
56
29
29694
32
79
50
3931
56
29
29694
32
79
50
3931
56
29
29694
32
79
50
3931
56
29
29694
32
79
50
3931
56
29
29694
32
79
50
3931
56
29
29694
32
79
50
3931
56
29
29694
32
79
50
3931
56
29
29694
32
79
50
3931
56
29
29694
32
79
50
3931
56
29
29694
32
79
50
3931
56
29
29694
32
79
50
3931
56
29
29694
32
79
50
3931
56
29
29694
32
79
50
3931
56
29
29694
32
79
50
3931
56
29
29694

```python
for line in lines_copy:
print(line[:1000])
```

def someSortOfEncryption(flag):

# didnt't have time to make my cpp file a shared library. Now i cannot use

# the encryption function from my cpp code :(

blob = [11111, 10001011, 1000, 0, 1001100, 10011011, 10111100, 1100010, 10, 11111111, 10101101, 1010011, 11000001, 10001110, 11010011, 110000, 10100, 10111100, 11100111, 101011, 1000110, 1000101, 1010100, 11001001, 10000110, 11010010, 1010010, 10100000, 10101000, 1001001, 1010011, 1001, 1110001, 11100010, 10, 11111, 10000000, 1010000, 11100101, 1110101, 1011110, 110110, 10000110, 11000100, 10001110, 1101100, 1000111, 10110000, 10101100, 11110110, 11011111, 1111001, 110110, 1011001, 11010, 10100000, 1001000, 11100, 10010000, 1110010, 10001000, 11100111, 11001101, 11011, 11001111, 10110011, 11000111, 11001001, 100011, 10100101, 1100101, 110111, 11010110, 10000100, 10000011, 110010, 11001110, 1011011, 10010, 11111101, 110001, 11001, 10011101, 11010010, 110111, 11010000, 10100010, 100111, 110111, 1000, 1001001, 1000101, 11100001, 1111100, 1011101, 1000010, 1110110, 11000010, 111001, 11001000, 1010110, 11011000, 11010111, 11010110, 10001010, 1011011, 11011100, 1100001, 11000, 10101111,
# ok, i will have my cpp code here just for a while

return "broken_function"



eval(''+eval('str(str)[+all([])]')+eval('str(str'+eval('str('+str(eval)[eval(str((+all([])))+str((+all([[]]))))]+'l'+str(eval)[eval(str((+all([])))+str((all([])+all([])+all([])+all([])+all([])+all([]))))]+'at((+all([]))))[(+all([]))]')+str(str)[+all([])]+str(eval)[eval(str((+all([])))+str((all([])+all([])+all([])+all([])+all([])+all([]))))]+str(eval)[(all([])+all([]))]+str(eval)[(all([])+all([])+all([])+all([])+all([])+all([])+all([])+all([]))]+'t)[(all([])+all([])+all([])+all([]))]')+'r('+str((+all([])))+str((+all([])))+str((all([])+all([])))+')')+'r'+eval(''+eval('str(str)[+all([])]')+eval('str(str'+eval('str('+str(eval)[eval(str((+all([])))+str((+all([[]]))))]+'l'+str(eval)[eval(str((+all([])))+str((all([])+all([])+all([])+all([])+all([])+all([]))))]+'at((+all([]))))[(+all([]))]')+str(str)[+all([])]+str(eval)[eval(str((+all([])))+str((all([])+all([])+all([])+all([])+all([])+all([]))))]+str(eval)[(all([])+all([]))]+str(eval)[(all([])+all([])+all([])+all([])+all([])+all([])+all([])+al

```python
blob = [11111, 10001011, 1000, 0, 1001100, 10011011, 10111100, 1100010, 10, 11111111, 10101101, 1010011, 11000001, 10001110, 11010011, 110000, 10100, 10111100, 11100111, 101011, 1000110, 1000101, 1010100, 11001001, 10000110, 11010010, 1010010, 10100000, 10101000, 1001001, 1010011, 1001, 1110001, 11100010, 10, 11111, 10000000, 1010000, 11100101, 1110101, 1011110, 110110, 10000110, 11000100, 10001110, 1101100, 1000111, 10110000, 10101100, 11110110, 11011111, 1111001, 110110, 1011001, 11010, 10100000, 1001000, 11100, 10010000, 1110010, 10001000, 11100111, 11001101, 11011, 11001111, 10110011, 11000111, 11001001, 100011, 10100101, 1100101, 110111, 11010110, 10000100, 10000011, 110010, 11001110, 1011011, 10010, 11111101, 110001, 11001, 10011101, 11010010, 110111, 11010000, 10100010, 100111, 110111, 1000, 1001001, 1000101, 11100001, 1111100, 1011101, 1000010, 1110110, 11000010, 111001, 11001000, 1010110, 11011000, 11010111, 11010110, 10001010, 1011011, 11011100, 1100001, 11000, 10101111, 111011, 100101, 10001011, 10001000, 1011101, 1000001, 110010, 1011100, 1000010, 1101001, 10001111, 10001110, 11110100, 10001101, 1101111, 1001011, 11011100, 10010111, 10010011, 11100100, 10010, 1100110, 100000, 101011, 10111100, 10110001, 111000, 11100, 10010000, 10011110, 11010001, 11010001, 111111, 10011001, 101001, 10001010, 11110111, 11010111, 10011111, 110010, 11010110, 1101, 11010, 10110101, 1110010, 11, 10101010, 1000, 111101, 1111101, 11010000, 1011, 1001100, 1100, 10010110, 11001011, 1101111, 11111000, 10101111, 11000100, 10010111, 1010110, 1110101, 10010100, 1000110, 11100110, 10001, 10011011, 11010000, 11111001, 10110011, 11001000, 10101101, 1010111, 1101001, 1101100, 1110, 10110110, 10010000, 11001111, 10000101, 10110000, 10001010, 11101010, 11001, 10011011, 1101101, 10010000, 10100110, 11100111, 10011110, 1100011, 10000101, 11011101, 11001011, 1100, 11001011, 100101, 1100110, 11100000, 10100001, 11000010, 1111110, 10010011, 1000101, 1011011, 11001101, 1100, 11001111, 10100111, 1101101, 11110111, 1111111, 11101100, 10011011, 11111110, 1000110, 11001010, 11110000, 111000, 10110010, 1110010, 11101100, 1011110, 10010100, 1100001, 11100100, 1110000, 110, 10110011, 101001, 11101110, 10101001, 1110011, 110100, 10010111, 11001000, 10101011, 11101000, 11101111, 100010, 10010111, 111111, 100, 11111110, 101, 11101011, 11111011, 1010111, 10111, 10101100, 111111, 11011011, 1101110, 11111111, 11101110, 111101, 10100, 11111111, 11000001, 1111100, 10100100, 11100101, 11011000, 11101111, 11111110, 10011111, 11111011, 10111011, 11001011, 11010101, 11101000, 1101011, 11000101, 10101110, 11100011, 1101010, 10100010, 101100, 10010010, 1000101, 1001, 1001011, 1111110, 10110100, 111010, 1000000, 10100001, 10100, 10, 11010010, 1011, 10100101, 11010011, 1100000, 111111, 10100110, 100010, 11011100, 11110010, 10000111, 11101101, 11110011, 10001111, 111100, 11000010, 11100010, 10101101, 11110, 1000110, 1111111, 1101010, 10101100, 11101001, 1001111, 11000011, 10101101, 1101111, 10001101, 111110, 1001001, 1010011, 10011, 10001011, 10101100, 11010111, 11100000, 11000, 111010, 10100011, 1000101, 11110111, 11001110, 1111000, 101010, 110000, 1110100, 100100, 11011000, 10001101, 10101000, 1101011, 11111000, 10010110, 1000000, 1011111, 10000101, 11110100, 10000, 10111101, 11001, 1011001, 11011111, 110100, 1010001, 10011001, 10001, 1101110, 10000001, 110111, 10111100, 11100001, 1100111, 10001010, 110100, 1001110, 1101111, 1111000, 11111, 1000101, 10000110, 11100100, 11010111, 11101100, 10010110, 111000, 100111, 10101110, 10011010, 11011110, 11000011, 111100, 1110111, 1111100, 10111100, 1001110, 1111101, 100011, 11010011, 10100100, 10100001, 10010110, 1100001, 10001101, 10000111, 100101, 11001011, 11110000, 110101, 10101101, 11000010, 11100000, 1110010, 11010, 11111011, 10000111, 11100000, 110100, 11110111, 10000110, 10100111, 1001110, 10111110, 11, 10, 10110011, 10010010, 11110001, 10101100, 11, 0, 0]
```

```python
[int(str(b), 2) for b in blob][:10]
```

[31, 139, 8, 0, 76, 155, 188, 98, 2, 255]

```python
blob_bytes = bytes([int(str(b), 2) for b in blob])
blob_bytes
```

b'\x1f\x8b\x08\x00L\x9b\xbcb\x02\xff\xadS\xc1\x8e\xd30\x14\xbc\xe7+FET\xc9\x86\xd2R\xa0\xa8IS\tq\xe2\x02\x1f\x80P\xe5u^6\x86\xc4\x8elG\xb0\xac\xf6\xdfy6Y\x1a\xa0H\x1c\x90r\x88\xe7\xcd\x1b\xcf\xb3\xc7\xc9#\xa5e7\xd6\x84\x832\xce[\x12\xfd1\x19\x9d\xd27\xd0\xa2\'7\x08IE\xe1|]Bv\xc29\xc8V\xd8\xd7\xd6\x8a[\xdca\x18\xaf;%\x8b\x88]A2\\Bi\x8f\x8e\xf4\x8doK\xdc\x97\x93\xe4\x12f +\xbc\xb18\x1c\x90\x9e\xd1\xd1?\x99)\x8a\xf7\xd7\x9f2\xd6\r\x1a\xb5r\x03\xaa\x08=}\xd0\x0bL\x0c\x96\xcbo\xf8\xaf\xc4\x97Vu\x94F\xe6\x11\x9b\xd0\xf9\xb3\xc8\xadWil\x0e\xb6\x90\xcf\x85\xb0\x8a\xea\x19\x9bm\x90\xa6\xe7\x9ec\x85\xdd\xcb\x0c\xcb%f\xe0\xa1\xc2~\x93E[\xcd\x0c\xcf\xa7m\xf7\x7f\xec\x9b\xfeF\xca\xf08\xb2r\xec^\x94a\xe4p\x06\xb3)\xee\xa9s4\x97\xc8\xab\xe8\xef"\x97?\x04\xfe\x05\xeb\xfbW\x17\xac?\xdbn\xff\xee=\x14\xff\xc1|\xa4\xe5\xd8\xef\xfe\x9f\xfb\xbb\xcb\xd5\xe8k\xc5\xae\xe3j\xa2,\x92E\tK~\xb4:@\xa1\x14\x02\xd2\x0b\xa5\xd3`?\xa6"\xdc\xf2\x87\xed\xf3\x8f<\xc2\xe2\xad\x1eF\x7fj\xac\xe9O\xc3\xado\x8d>IS\x13\x8b\xac\xd7\xe0\x18:\xa3E\xf7\xcex*0t$\xd8\x8d\xa8k\xf8\x96@_\x85\xf4\x10\xbd\x19Y\xdf4Q\x99\x11n\x817\xbc\xe1g\x8a4Nox\x1fE\x86\xe4\xd7\xec\x968\'\xae\x9a\xde\xc3<w|\xbcN}#\xd3\xa4\xa1\x96a\x8d\x87%\xcb\xf05\xad\xc2\xe0r\x1a\xfb\x87\xe04\xf7\x86\xa7N\xbe\x03\x02\xb3\x92\xf1\xac\x03\x00\x00'

```python
import gzip

print(gzip.decompress(blob_bytes).decode())
```


#include <iostream>
using namespace::std; class charArray { public: char* cArr; int length; };ostream& operator << (ostream& out, charArray aObj) { int disp = aObj.length; char printChar; while(disp > 0) { printChar = *(aObj.cArr + aObj.length - disp); if ((printChar >= 65) && (printChar <= 90)) { if (printChar+disp > 90) { printChar = ((printChar+disp) % 90) + 64; out << printChar; }else{ printChar += disp; out << printChar; }; } else if ((printChar >= 97) && (printChar <= 122)) { if (printChar+disp > 122) { printChar = ((printChar+disp) % 122) + 96; out << printChar; }else{ printChar += disp; out << printChar; }; } else { out << printChar; }; disp -= 1; }; out << "
"; return out; };int main() { char cArr[23] = "Input_from_python_code"; // personalNote: please add the exact amount of characters to make the string :)
charArray aObj; aObj.cArr = cArr; aObj.length = (sizeof(cArr) / sizeof(char)) - 1; cout << aObj; return 0; }

```python
shortened = lines_copy[-2].replace("""eval('str(str)[+all([])]')""", "'c'").replace('all([])', 'True')
len(shortened)
shortened[:100]
```

"eval(''+'c'+eval('str(str'+eval('str('+str(eval)[eval(str((+True))+str((+all([[]]))))]+'l'+str(eval)"

```python
eval(shortened)
```

"print('Passing the flag inside someSortOfEncryption will give esb{ikjebf_axbqm_wjl_gy_pg}')"

```python

```

```python
flag_format = "dsc{[a-zA-Z0-9_]+}"
```

```python
# ChatGPT translated from C++

class CharArray:
def __init__(self, c_arr):
self.c_arr = c_arr
self.length = len(c_arr)

def __str__(self):
disp = self.length
result = []
for i in range(self.length):
print_char = ord(self.c_arr[self.length - disp])
if 65 <= print_char <= 90:
if print_char + disp > 90:
print_char = ((print_char + disp) % 90) + 64
result.append(chr(print_char))
else:
print_char += disp
result.append(chr(print_char))
elif 97 <= print_char <= 122:
if print_char + disp > 122:
print_char = ((print_char + disp) % 122) + 96
result.append(chr(print_char))
else:
print_char += disp
result.append(chr(print_char))
else:
result.append(chr(print_char))
disp -= 1
return "".join(result) + "\n"
```

```python
# ChatGPT wrote inverse function
def decrypt(encrypted):
decrypted = []
disp = len(encrypted)
for i in range(len(encrypted)):
char = ord(encrypted[i])
if 65 <= char <= 90:
char -= disp
if char < 65:
char = 90 - (64 - char)
elif 97 <= char <= 122:
char -= disp
if char < 97:
char = 122 - (96 - char)
decrypted.append(chr(char))
disp -= 1
return ''.join(decrypted)

encrypted = "esb{ikjebf_axbqm_wjl_gy_pg}"
original_string = decrypt(encrypted)
print(f"Original string: {original_string}")
```

Original string: dsc{lookin_kinda_mad_at_me}

```python
a_obj = CharArray(original_string)
print(a_obj)
```

esb{ikjebf_axbqm_wjl_gy_pg}

```python

```

Original writeup (http://144.76.26.107:7652/notebooks/competitions/CTF/Deconstruct/whatThePy.ipynb).