Tags: misc coding ppc miscellaneous 

Rating:

# DarkCTF 2020 – Minesweeper

* **Category:** misc
* **Points:** 463

## Challenge

> I'm lucky to be surrounded by even-minded people from all around. Flag is not in the regular format.
>
> Submit flag in darkCTF{flag} format.

## Solution

The challege gives you a [text file](https://raw.githubusercontent.com/m3ssap0/CTF-Writeups/master/DarkCTF%202020/Minesweeper/minesweeper).

```
I'am lucky to be surrounded by even-minded people from all directions.
Flag is not in the regular format.
array = [[93, 91, 95, 88, 42, 78, 93, 91, 93, 93, 83, 73, 75, 67, 79, 93, 79, 75, 97, 85, 83, 85, 79, 87, 93, 83, 69, 87, 77, 89, 79, 81, 67, 69, 75, 95, 89, 89, 93, 95], [75, 85, 75, 96, 69, 70, 85, 95, 81, 97, 95, 75, 75, 85, 79, 77, 87, 69, 95, 77, 81, 81, 89, 79, 73, 93, 73, 93, 91, 97, 85, 85, 67, 87, 67, 89, 85, 95, 75, 71], [83, 89, 73, 80, 76, 72, 79, 73, 71, 71, 79, 91, 91, 69, 83, 89, 73, 67, 67, 85, 69, 85, 81, 89, 93, 75, 97, 77, 75, 83, 85, 79, 73, 75, 73, 79, 75, 83, 83, 69], [79, 67, 91, 71, 89, 97, 97, 67, 95, 67, 77, 95, 67, 79, 81, 87, 95, 69, 76, 90, 94, 92, 76, 80, 75, 89, 85, 73, 91, 81, 75, 81, 91, 95, 73, 73, 86, 82, 94, 79], [79, 69, 83, 71, 95, 73, 75, 83, 97, 83, 97, 91, 75, 97, 79, 87, 87, 95, 90, 69, 90, 90, 67, 72, 67, 75, 89, 83, 91, 81, 89, 95, 69, 97, 69, 89, 70, 78, 62, 97], [95, 85, 87, 97, 71, 67, 85, 83, 83, 67, 67, 93, 81, 87, 71, 87, 71, 83, 82, 66, 97, 80, 74, 46, 77, 81, 77, 87, 75, 89, 91, 77, 67, 83, 87, 67, 78, 62, 82, 87], [89, 79, 91, 96, 82, 92, 91, 85, 69, 79, 67, 91, 82, 78, 92, 89, 83, 95, 73, 68, 76, 76, 89, 87, 77, 97, 77, 94, 82, 94, 91, 77, 85, 81, 71, 95, 95, 93, 97, 95], [89, 77, 79, 72, 69, 84, 73, 91, 73, 77, 83, 81, 80, 73, 96, 89, 89, 93, 93, 92, 84, 82, 79, 77, 69, 97, 97, 88, 97, 86, 85, 67, 77, 91, 67, 73, 81, 93, 81, 97], [69, 73, 67, 68, 92, 90, 71, 83, 79, 95, 91, 67, 86, 62, 78, 89, 85, 67, 81, 66, 92, 94, 93, 79, 89, 69, 85, 80, 88, 66, 87, 83, 69, 91, 81, 77, 95, 93, 69, 73], [73, 75, 97, 77, 75, 83, 67, 81, 75, 73, 91, 79, 89, 93, 71, 91, 69, 77, 75, 93, 85, 87, 69, 97, 73, 85, 85, 81, 95, 91, 81, 67, 97, 71, 83, 97, 83, 71, 93, 77], [81, 91, 95, 89, 90, 86, 78, 67, 79, 67, 91, 89, 69, 95, 89, 97, 85, 85, 89, 82, 94, 84, 79, 71, 73, 77, 71, 85, 73, 95, 77, 77, 77, 95, 97, 83, 67, 83, 67, 93], [75, 83, 77, 95, 68, 80, 94, 85, 73, 91, 89, 91, 75, 93, 95, 85, 91, 93, 83, 86, 68, 76, 77, 85, 81, 79, 67, 71, 89, 89, 85, 93, 71, 87, 91, 93, 83, 95, 93, 81], [69, 77, 97, 77, 82, 90, 70, 87, 93, 87, 97, 97, 89, 71, 69, 91, 95, 87, 67, 78, 78, 70, 67, 91, 71, 69, 77, 85, 85, 81, 81, 97, 71, 69, 87, 91, 91, 69, 81, 77], [69, 97, 69, 79, 69, 87, 67, 85, 81, 85, 73, 85, 69, 81, 89, 73, 93, 69, 93, 87, 83, 69, 83, 73, 95, 79, 79, 73, 81, 79, 97, 93, 95, 81, 69, 69, 87, 81, 67, 81], [83, 83, 87, 77, 67, 97, 67, 91, 71, 81, 67, 83, 73, 77, 77, 67, 83, 83, 85, 77, 81, 91, 89, 67, 95, 87, 95, 87, 81, 93, 97, 77, 83, 91, 71, 89, 83, 71, 77, 69], [67, 89, 85, 81, 86, 90, 78, 85, 71, 85, 93, 95, 69, 81, 89, 73, 75, 70, 68, 88, 67, 87, 93, 67, 67, 77, 89, 95, 67, 83, 79, 79, 98, 96, 76, 79, 91, 93, 71, 91], [81, 81, 83, 85, 76, 78, 80, 67, 85, 75, 93, 89, 95, 79, 91, 91, 75, 96, 97, 82, 85, 91, 69, 85, 75, 73, 83, 93, 89, 83, 91, 69, 72, 78, 72, 89, 73, 95, 67, 89], [89, 91, 77, 97, 76, 68, 98, 67, 91, 91, 89, 89, 89, 87, 67, 75, 83, 84, 88, 98, 85, 77, 89, 89, 69, 77, 89, 81, 69, 91, 85, 95, 88, 70, 88, 87, 91, 91, 69, 83], [83, 84, 60, 82, 79, 91, 95, 67, 69, 73, 67, 97, 77, 75, 93, 71, 73, 75, 95, 87, 75, 95, 73, 93, 95, 80, 82, 88, 85, 77, 73, 75, 69, 95, 85, 77, 68, 78, 92, 81], [71, 42, 79, 86, 97, 75, 75, 81, 79, 87, 85, 87, 73, 81, 87, 75, 91, 67, 91, 67, 93, 77, 87, 91, 67, 76, 73, 72, 97, 83, 95, 73, 71, 69, 79, 89, 92, 84, 82, 69], [67, 78, 74, 88, 77, 91, 67, 85, 87, 97, 69, 89, 69, 85, 85, 89, 81, 67, 97, 91, 71, 85, 91, 85, 75, 98, 82, 70, 69, 79, 75, 97, 97, 85, 95, 97, 94, 80, 64, 79], [73, 81, 79, 79, 71, 97, 79, 77, 93, 79, 95, 85, 85, 95, 79, 91, 77, 91, 81, 67, 93, 75, 89, 87, 67, 77, 93, 89, 67, 77, 77, 77, 91, 77, 67, 81, 79, 73, 87, 91], [93, 92, 82, 88, 85, 95, 69, 79, 93, 89, 67, 72, 76, 88, 85, 77, 81, 87, 75, 83, 75, 95, 97, 77, 91, 93, 87, 87, 88, 62, 90, 85, 79, 93, 75, 89, 85, 64, 62, 98], [83, 82, 97, 62, 91, 77, 81, 67, 85, 67, 87, 88, 86, 94, 77, 89, 73, 77, 67, 81, 75, 95, 87, 79, 85, 77, 93, 89, 74, 82, 78, 77, 79, 89, 83, 95, 77, 70, 69, 94], [85, 94, 92, 90, 71, 71, 89, 83, 77, 73, 93, 72, 98, 90, 83, 97, 89, 93, 95, 91, 77, 95, 93, 93, 69, 75, 75, 69, 74, 78, 72, 85, 97, 69, 83, 75, 75, 88, 90, 72], [73, 67, 82, 74, 66, 87, 85, 89, 71, 97, 77, 93, 81, 69, 78, 82, 92, 81, 81, 91, 67, 71, 79, 79, 69, 81, 84, 82, 88, 91, 85, 69, 95, 84, 70, 88, 89, 81, 71, 77], [95, 87, 94, 83, 84, 69, 69, 97, 79, 73, 69, 91, 83, 89, 80, 66, 84, 93, 97, 77, 77, 91, 83, 69, 91, 91, 80, 79, 98, 91, 67, 91, 91, 70, 69, 72, 89, 77, 71, 83], [93, 83, 94, 78, 82, 78, 66, 74, 79, 95, 93, 89, 79, 87, 90, 74, 76, 85, 67, 93, 77, 81, 67, 83, 90, 70, 72, 86, 76, 91, 79, 89, 71, 82, 72, 88, 91, 67, 67, 95], [85, 89, 73, 95, 83, 72, 86, 70, 91, 81, 81, 69, 87, 97, 97, 77, 77, 77, 87, 97, 91, 81, 93, 69, 66, 97, 84, 89, 89, 95, 77, 71, 85, 91, 95, 75, 67, 97, 71, 71], [81, 97, 75, 67, 73, 92, 74, 78, 81, 91, 75, 93, 73, 75, 87, 95, 67, 83, 75, 71, 97, 91, 89, 71, 82, 80, 82, 87, 77, 95, 91, 93, 79, 73, 73, 69, 75, 75, 93, 79], [89, 71, 87, 89, 76, 70, 88, 83, 91, 73, 83, 91, 91, 93, 76, 84, 62, 75, 91, 69, 97, 93, 73, 95, 75, 73, 77, 67, 81, 72, 88, 80, 73, 73, 87, 75, 73, 75, 91, 95], [75, 67, 87, 79, 72, 72, 96, 69, 85, 85, 81, 95, 81, 81, 76, 85, 80, 97, 75, 77, 91, 79, 75, 91, 73, 69, 81, 77, 81, 98, 79, 62, 87, 85, 69, 89, 67, 97, 67, 81], [77, 85, 73, 77, 82, 74, 90, 95, 69, 81, 71, 69, 73, 83, 80, 88, 84, 73, 75, 87, 70, 68, 84, 77, 83, 83, 77, 71, 85, 86, 80, 84, 93, 89, 73, 69, 85, 89, 91, 79], [81, 77, 87, 69, 87, 95, 69, 79, 69, 71, 71, 75, 91, 93, 97, 95, 83, 81, 67, 83, 92, 89, 96, 95, 97, 93, 81, 79, 71, 69, 93, 75, 89, 71, 77, 69, 91, 97, 79, 69], [69, 87, 87, 85, 69, 83, 85, 77, 97, 89, 83, 67, 73, 83, 82, 74, 64, 95, 93, 87, 72, 68, 80, 92, 68, 92, 87, 85, 91, 85, 79, 91, 97, 97, 71, 93, 85, 89, 85, 85], [85, 81, 77, 95, 81, 89, 77, 73, 85, 87, 71, 73, 83, 95, 92, 83, 68, 71, 73, 69, 87, 81, 97, 72, 73, 98, 91, 89, 81, 71, 85, 77, 95, 95, 69, 81, 77, 79, 67, 97], [69, 93, 75, 97, 67, 93, 77, 67, 75, 77, 79, 89, 71, 67, 76, 94, 80, 75, 81, 95, 67, 75, 71, 90, 74, 76, 87, 79, 71, 73, 79, 75, 73, 87, 81, 91, 95, 75, 95, 69], [67, 85, 87, 72, 66, 82, 95, 69, 87, 73, 91, 93, 72, 70, 92, 83, 93, 89, 95, 67, 72, 76, 78, 85, 87, 97, 91, 75, 89, 85, 83, 85, 77, 89, 94, 80, 78, 69, 77, 95], [71, 95, 73, 76, 71, 66, 67, 97, 95, 75, 95, 87, 70, 97, 80, 77, 91, 91, 95, 87, 82, 76, 66, 93, 97, 69, 71, 91, 83, 89, 67, 93, 77, 85, 62, 70, 78, 97, 81, 93], [85, 97, 87, 72, 86, 92, 97, 79, 67, 73, 69, 81, 92, 90, 82, 79, 77, 77, 67, 81, 80, 66, 78, 75, 81, 83, 69, 83, 67, 89, 97, 93, 95, 95, 76, 78, 70, 97, 83, 55], [93, 69, 87, 103, 99, 127, 65, 107, 93, 113, 97, 81, 125, 127, 103, 97, 71, 125, 111, 127, 101, 73, 127, 93, 83, 105, 97, 119, 113, 109, 73, 81, 101, 83, 73, 87, 71, 93, 73, 67], [101, 115, 65, 83, 95, 95, 109, 123, 89, 83, 97, 107, 101, 123, 123, 71, 71, 87, 75, 73, 65, 121, 67, 77, 87, 73, 69, 99, 87, 99, 125, 81, 79, 65, 127, 101, 117, 95, 115, 95], [107, 99, 83, 75, 113, 109, 71, 127, 127, 85, 71, 125, 67, 69, 113, 111, 79, 111, 123, 113, 93, 107, 127, 113, 105, 73, 65, 67, 91, 113, 87, 113, 79, 89, 105, 95, 73, 95, 79, 71], [117, 115, 93, 69, 85, 65, 83, 101, 75, 127, 99, 93, 99, 113, 81, 91, 77, 93, 81, 87, 117, 93, 109, 121, 105, 127, 85, 79, 79, 117, 79, 125, 125, 69, 117, 95, 73, 121, 107, 107], [117, 115, 93, 69, 85, 65, 83, 101, 75, 127, 99, 93, 99, 113, 81, 91, 77, 93, 81, 87, 117, 93, 109, 121, 105, 127, 85, 79, 79, 117, 79, 125, 125, 69, 117, 95, 73, 121, 107, 107], [117, 115, 93, 69, 85, 65, 83, 101, 75, 127, 99, 93, 99, 113, 81, 91, 77, 93, 81, 87, 117, 93, 109, 121, 105, 127, 85, 79, 79, 117, 79, 125, 125, 69, 117, 95, 73, 121, 107, 107], [117, 115, 93, 69, 85, 65, 83, 101, 75, 127, 99, 93, 99, 113, 81, 91, 77, 93, 81, 87, 117, 93, 109, 121, 105, 127, 85, 79, 79, 117, 79, 125, 125, 69, 117, 95, 73, 121, 107, 107], [93, 69, 87, 103, 99, 127, 65, 107, 93, 113, 97, 81, 125, 127, 103, 97, 71, 125, 111, 127, 101, 73, 127, 93, 83, 105, 97, 119, 113, 109, 73, 81, 101, 83, 73, 87, 71, 93, 73, 67], [93, 69, 87, 103, 99, 127, 65, 107, 93, 113, 97, 81, 125, 127, 103, 97, 71, 125, 111, 127, 101, 73, 127, 93, 83, 105, 97, 119, 113, 109, 73, 81, 101, 83, 73, 87, 71, 93, 73, 67], [93, 69, 87, 103, 99, 127, 65, 107, 93, 113, 97, 81, 125, 127, 103, 97, 71, 125, 111, 127, 101, 73, 127, 93, 83, 105, 97, 119, 113, 109, 73, 81, 101, 83, 73, 87, 71, 93, 73, 67], [93, 69, 87, 103, 99, 127, 65, 107, 93, 113, 97, 81, 125, 127, 103, 97, 71, 125, 111, 127, 101, 73, 127, 93, 83, 105, 97, 119, 113, 109, 73, 81, 101, 83, 73, 87, 71, 93, 73, 67], [93, 69, 87, 103, 99, 127, 65, 107, 93, 113, 97, 81, 125, 127, 103, 97, 71, 125, 111, 127, 101, 73, 127, 93, 83, 105, 97, 119, 113, 109, 73, 81, 101, 83, 73, 87, 71, 93, 73, 67]]
```

The file contains a hint and a bi-directional array. You have to check for each position in the array all the numbers in the sorrounding, considering only values sorrounded by *even* numbers.

You can write a [script](https://raw.githubusercontent.com/m3ssap0/CTF-Writeups/master/DarkCTF%202020/Minesweeper/minesweeper.py) to solve it.

```python
array = [[93, 91, 95, 88, 42, 78, 93, 91, 93, 93, 83, 73, 75, 67, 79, 93, 79, 75, 97, 85, 83, 85, 79, 87, 93, 83, 69, 87, 77, 89, 79, 81, 67, 69, 75, 95, 89, 89, 93, 95], [75, 85, 75, 96, 69, 70, 85, 95, 81, 97, 95, 75, 75, 85, 79, 77, 87, 69, 95, 77, 81, 81, 89, 79, 73, 93, 73, 93, 91, 97, 85, 85, 67, 87, 67, 89, 85, 95, 75, 71], [83, 89, 73, 80, 76, 72, 79, 73, 71, 71, 79, 91, 91, 69, 83, 89, 73, 67, 67, 85, 69, 85, 81, 89, 93, 75, 97, 77, 75, 83, 85, 79, 73, 75, 73, 79, 75, 83, 83, 69], [79, 67, 91, 71, 89, 97, 97, 67, 95, 67, 77, 95, 67, 79, 81, 87, 95, 69, 76, 90, 94, 92, 76, 80, 75, 89, 85, 73, 91, 81, 75, 81, 91, 95, 73, 73, 86, 82, 94, 79], [79, 69, 83, 71, 95, 73, 75, 83, 97, 83, 97, 91, 75, 97, 79, 87, 87, 95, 90, 69, 90, 90, 67, 72, 67, 75, 89, 83, 91, 81, 89, 95, 69, 97, 69, 89, 70, 78, 62, 97], [95, 85, 87, 97, 71, 67, 85, 83, 83, 67, 67, 93, 81, 87, 71, 87, 71, 83, 82, 66, 97, 80, 74, 46, 77, 81, 77, 87, 75, 89, 91, 77, 67, 83, 87, 67, 78, 62, 82, 87], [89, 79, 91, 96, 82, 92, 91, 85, 69, 79, 67, 91, 82, 78, 92, 89, 83, 95, 73, 68, 76, 76, 89, 87, 77, 97, 77, 94, 82, 94, 91, 77, 85, 81, 71, 95, 95, 93, 97, 95], [89, 77, 79, 72, 69, 84, 73, 91, 73, 77, 83, 81, 80, 73, 96, 89, 89, 93, 93, 92, 84, 82, 79, 77, 69, 97, 97, 88, 97, 86, 85, 67, 77, 91, 67, 73, 81, 93, 81, 97], [69, 73, 67, 68, 92, 90, 71, 83, 79, 95, 91, 67, 86, 62, 78, 89, 85, 67, 81, 66, 92, 94, 93, 79, 89, 69, 85, 80, 88, 66, 87, 83, 69, 91, 81, 77, 95, 93, 69, 73], [73, 75, 97, 77, 75, 83, 67, 81, 75, 73, 91, 79, 89, 93, 71, 91, 69, 77, 75, 93, 85, 87, 69, 97, 73, 85, 85, 81, 95, 91, 81, 67, 97, 71, 83, 97, 83, 71, 93, 77], [81, 91, 95, 89, 90, 86, 78, 67, 79, 67, 91, 89, 69, 95, 89, 97, 85, 85, 89, 82, 94, 84, 79, 71, 73, 77, 71, 85, 73, 95, 77, 77, 77, 95, 97, 83, 67, 83, 67, 93], [75, 83, 77, 95, 68, 80, 94, 85, 73, 91, 89, 91, 75, 93, 95, 85, 91, 93, 83, 86, 68, 76, 77, 85, 81, 79, 67, 71, 89, 89, 85, 93, 71, 87, 91, 93, 83, 95, 93, 81], [69, 77, 97, 77, 82, 90, 70, 87, 93, 87, 97, 97, 89, 71, 69, 91, 95, 87, 67, 78, 78, 70, 67, 91, 71, 69, 77, 85, 85, 81, 81, 97, 71, 69, 87, 91, 91, 69, 81, 77], [69, 97, 69, 79, 69, 87, 67, 85, 81, 85, 73, 85, 69, 81, 89, 73, 93, 69, 93, 87, 83, 69, 83, 73, 95, 79, 79, 73, 81, 79, 97, 93, 95, 81, 69, 69, 87, 81, 67, 81], [83, 83, 87, 77, 67, 97, 67, 91, 71, 81, 67, 83, 73, 77, 77, 67, 83, 83, 85, 77, 81, 91, 89, 67, 95, 87, 95, 87, 81, 93, 97, 77, 83, 91, 71, 89, 83, 71, 77, 69], [67, 89, 85, 81, 86, 90, 78, 85, 71, 85, 93, 95, 69, 81, 89, 73, 75, 70, 68, 88, 67, 87, 93, 67, 67, 77, 89, 95, 67, 83, 79, 79, 98, 96, 76, 79, 91, 93, 71, 91], [81, 81, 83, 85, 76, 78, 80, 67, 85, 75, 93, 89, 95, 79, 91, 91, 75, 96, 97, 82, 85, 91, 69, 85, 75, 73, 83, 93, 89, 83, 91, 69, 72, 78, 72, 89, 73, 95, 67, 89], [89, 91, 77, 97, 76, 68, 98, 67, 91, 91, 89, 89, 89, 87, 67, 75, 83, 84, 88, 98, 85, 77, 89, 89, 69, 77, 89, 81, 69, 91, 85, 95, 88, 70, 88, 87, 91, 91, 69, 83], [83, 84, 60, 82, 79, 91, 95, 67, 69, 73, 67, 97, 77, 75, 93, 71, 73, 75, 95, 87, 75, 95, 73, 93, 95, 80, 82, 88, 85, 77, 73, 75, 69, 95, 85, 77, 68, 78, 92, 81], [71, 42, 79, 86, 97, 75, 75, 81, 79, 87, 85, 87, 73, 81, 87, 75, 91, 67, 91, 67, 93, 77, 87, 91, 67, 76, 73, 72, 97, 83, 95, 73, 71, 69, 79, 89, 92, 84, 82, 69], [67, 78, 74, 88, 77, 91, 67, 85, 87, 97, 69, 89, 69, 85, 85, 89, 81, 67, 97, 91, 71, 85, 91, 85, 75, 98, 82, 70, 69, 79, 75, 97, 97, 85, 95, 97, 94, 80, 64, 79], [73, 81, 79, 79, 71, 97, 79, 77, 93, 79, 95, 85, 85, 95, 79, 91, 77, 91, 81, 67, 93, 75, 89, 87, 67, 77, 93, 89, 67, 77, 77, 77, 91, 77, 67, 81, 79, 73, 87, 91], [93, 92, 82, 88, 85, 95, 69, 79, 93, 89, 67, 72, 76, 88, 85, 77, 81, 87, 75, 83, 75, 95, 97, 77, 91, 93, 87, 87, 88, 62, 90, 85, 79, 93, 75, 89, 85, 64, 62, 98], [83, 82, 97, 62, 91, 77, 81, 67, 85, 67, 87, 88, 86, 94, 77, 89, 73, 77, 67, 81, 75, 95, 87, 79, 85, 77, 93, 89, 74, 82, 78, 77, 79, 89, 83, 95, 77, 70, 69, 94], [85, 94, 92, 90, 71, 71, 89, 83, 77, 73, 93, 72, 98, 90, 83, 97, 89, 93, 95, 91, 77, 95, 93, 93, 69, 75, 75, 69, 74, 78, 72, 85, 97, 69, 83, 75, 75, 88, 90, 72], [73, 67, 82, 74, 66, 87, 85, 89, 71, 97, 77, 93, 81, 69, 78, 82, 92, 81, 81, 91, 67, 71, 79, 79, 69, 81, 84, 82, 88, 91, 85, 69, 95, 84, 70, 88, 89, 81, 71, 77], [95, 87, 94, 83, 84, 69, 69, 97, 79, 73, 69, 91, 83, 89, 80, 66, 84, 93, 97, 77, 77, 91, 83, 69, 91, 91, 80, 79, 98, 91, 67, 91, 91, 70, 69, 72, 89, 77, 71, 83], [93, 83, 94, 78, 82, 78, 66, 74, 79, 95, 93, 89, 79, 87, 90, 74, 76, 85, 67, 93, 77, 81, 67, 83, 90, 70, 72, 86, 76, 91, 79, 89, 71, 82, 72, 88, 91, 67, 67, 95], [85, 89, 73, 95, 83, 72, 86, 70, 91, 81, 81, 69, 87, 97, 97, 77, 77, 77, 87, 97, 91, 81, 93, 69, 66, 97, 84, 89, 89, 95, 77, 71, 85, 91, 95, 75, 67, 97, 71, 71], [81, 97, 75, 67, 73, 92, 74, 78, 81, 91, 75, 93, 73, 75, 87, 95, 67, 83, 75, 71, 97, 91, 89, 71, 82, 80, 82, 87, 77, 95, 91, 93, 79, 73, 73, 69, 75, 75, 93, 79], [89, 71, 87, 89, 76, 70, 88, 83, 91, 73, 83, 91, 91, 93, 76, 84, 62, 75, 91, 69, 97, 93, 73, 95, 75, 73, 77, 67, 81, 72, 88, 80, 73, 73, 87, 75, 73, 75, 91, 95], [75, 67, 87, 79, 72, 72, 96, 69, 85, 85, 81, 95, 81, 81, 76, 85, 80, 97, 75, 77, 91, 79, 75, 91, 73, 69, 81, 77, 81, 98, 79, 62, 87, 85, 69, 89, 67, 97, 67, 81], [77, 85, 73, 77, 82, 74, 90, 95, 69, 81, 71, 69, 73, 83, 80, 88, 84, 73, 75, 87, 70, 68, 84, 77, 83, 83, 77, 71, 85, 86, 80, 84, 93, 89, 73, 69, 85, 89, 91, 79], [81, 77, 87, 69, 87, 95, 69, 79, 69, 71, 71, 75, 91, 93, 97, 95, 83, 81, 67, 83, 92, 89, 96, 95, 97, 93, 81, 79, 71, 69, 93, 75, 89, 71, 77, 69, 91, 97, 79, 69], [69, 87, 87, 85, 69, 83, 85, 77, 97, 89, 83, 67, 73, 83, 82, 74, 64, 95, 93, 87, 72, 68, 80, 92, 68, 92, 87, 85, 91, 85, 79, 91, 97, 97, 71, 93, 85, 89, 85, 85], [85, 81, 77, 95, 81, 89, 77, 73, 85, 87, 71, 73, 83, 95, 92, 83, 68, 71, 73, 69, 87, 81, 97, 72, 73, 98, 91, 89, 81, 71, 85, 77, 95, 95, 69, 81, 77, 79, 67, 97], [69, 93, 75, 97, 67, 93, 77, 67, 75, 77, 79, 89, 71, 67, 76, 94, 80, 75, 81, 95, 67, 75, 71, 90, 74, 76, 87, 79, 71, 73, 79, 75, 73, 87, 81, 91, 95, 75, 95, 69], [67, 85, 87, 72, 66, 82, 95, 69, 87, 73, 91, 93, 72, 70, 92, 83, 93, 89, 95, 67, 72, 76, 78, 85, 87, 97, 91, 75, 89, 85, 83, 85, 77, 89, 94, 80, 78, 69, 77, 95], [71, 95, 73, 76, 71, 66, 67, 97, 95, 75, 95, 87, 70, 97, 80, 77, 91, 91, 95, 87, 82, 76, 66, 93, 97, 69, 71, 91, 83, 89, 67, 93, 77, 85, 62, 70, 78, 97, 81, 93], [85, 97, 87, 72, 86, 92, 97, 79, 67, 73, 69, 81, 92, 90, 82, 79, 77, 77, 67, 81, 80, 66, 78, 75, 81, 83, 69, 83, 67, 89, 97, 93, 95, 95, 76, 78, 70, 97, 83, 55], [93, 69, 87, 103, 99, 127, 65, 107, 93, 113, 97, 81, 125, 127, 103, 97, 71, 125, 111, 127, 101, 73, 127, 93, 83, 105, 97, 119, 113, 109, 73, 81, 101, 83, 73, 87, 71, 93, 73, 67], [101, 115, 65, 83, 95, 95, 109, 123, 89, 83, 97, 107, 101, 123, 123, 71, 71, 87, 75, 73, 65, 121, 67, 77, 87, 73, 69, 99, 87, 99, 125, 81, 79, 65, 127, 101, 117, 95, 115, 95], [107, 99, 83, 75, 113, 109, 71, 127, 127, 85, 71, 125, 67, 69, 113, 111, 79, 111, 123, 113, 93, 107, 127, 113, 105, 73, 65, 67, 91, 113, 87, 113, 79, 89, 105, 95, 73, 95, 79, 71], [117, 115, 93, 69, 85, 65, 83, 101, 75, 127, 99, 93, 99, 113, 81, 91, 77, 93, 81, 87, 117, 93, 109, 121, 105, 127, 85, 79, 79, 117, 79, 125, 125, 69, 117, 95, 73, 121, 107, 107], [117, 115, 93, 69, 85, 65, 83, 101, 75, 127, 99, 93, 99, 113, 81, 91, 77, 93, 81, 87, 117, 93, 109, 121, 105, 127, 85, 79, 79, 117, 79, 125, 125, 69, 117, 95, 73, 121, 107, 107], [117, 115, 93, 69, 85, 65, 83, 101, 75, 127, 99, 93, 99, 113, 81, 91, 77, 93, 81, 87, 117, 93, 109, 121, 105, 127, 85, 79, 79, 117, 79, 125, 125, 69, 117, 95, 73, 121, 107, 107], [117, 115, 93, 69, 85, 65, 83, 101, 75, 127, 99, 93, 99, 113, 81, 91, 77, 93, 81, 87, 117, 93, 109, 121, 105, 127, 85, 79, 79, 117, 79, 125, 125, 69, 117, 95, 73, 121, 107, 107], [93, 69, 87, 103, 99, 127, 65, 107, 93, 113, 97, 81, 125, 127, 103, 97, 71, 125, 111, 127, 101, 73, 127, 93, 83, 105, 97, 119, 113, 109, 73, 81, 101, 83, 73, 87, 71, 93, 73, 67], [93, 69, 87, 103, 99, 127, 65, 107, 93, 113, 97, 81, 125, 127, 103, 97, 71, 125, 111, 127, 101, 73, 127, 93, 83, 105, 97, 119, 113, 109, 73, 81, 101, 83, 73, 87, 71, 93, 73, 67], [93, 69, 87, 103, 99, 127, 65, 107, 93, 113, 97, 81, 125, 127, 103, 97, 71, 125, 111, 127, 101, 73, 127, 93, 83, 105, 97, 119, 113, 109, 73, 81, 101, 83, 73, 87, 71, 93, 73, 67], [93, 69, 87, 103, 99, 127, 65, 107, 93, 113, 97, 81, 125, 127, 103, 97, 71, 125, 111, 127, 101, 73, 127, 93, 83, 105, 97, 119, 113, 109, 73, 81, 101, 83, 73, 87, 71, 93, 73, 67], [93, 69, 87, 103, 99, 127, 65, 107, 93, 113, 97, 81, 125, 127, 103, 97, 71, 125, 111, 127, 101, 73, 127, 93, 83, 105, 97, 119, 113, 109, 73, 81, 101, 83, 73, 87, 71, 93, 73, 67]]

def check_n(r, c):
if r - 1 > 0:
if array[r - 1][c] % 2 == 0:
return 1
else:
return 0
else:
return 1

def check_ne(r, c):
if r - 1 > 0 and c + 1 < len(array[0]):
if array[r - 1][c + 1] % 2 == 0:
return 1
else:
return 0
else:
return 1

def check_e(r, c):
if c + 1 < len(array[0]):
if array[r][c + 1] % 2 == 0:
return 1
else:
return 0
else:
return 1

def check_se(r, c):
if r + 1 < len(array) and c + 1 < len(array[0]):
if array[r + 1][c + 1] % 2 == 0:
return 1
else:
return 0
else:
return 1

def check_s(r, c):
if r + 1 < len(array):
if array[r + 1][c] % 2 == 0:
return 1
else:
return 0
else:
return 1

def check_sw(r, c):
if r + 1 < len(array) and c - 1 > 0:
if array[r + 1][c - 1] % 2 == 0:
return 1
else:
return 0
else:
return 1

def check_w(r, c):
if c - 1 > 0:
if array[r][c - 1] % 2 == 0:
return 1
else:
return 0
else:
return 1

def check_nw(r, c):
if r - 1 > 0 and c - 1 > 0:
if array[r - 1][c - 1] % 2 == 0:
return 1
else:
return 0
else:
return 1

# Main execution.
if __name__ == "__main__":

print("Misc/Minesweeper solver.")
print("[*] Matrix {}x{}.".format(len(array), len(array[0])))
values = []
for r in range(len(array)):
for c in range(len(array[r])):
print("{} ".format(f"{array[r][c]:>3}"), end="")
all_directions_even = check_n(r, c) & check_ne(r, c) & check_e(r, c) & check_se(r, c) & check_s(r, c) & check_sw(r, c) & check_w(r, c) & check_nw(r, c)
if all_directions_even > 0:
values.append(array[r][c])
print()
print("[*] Values are: {}.".format(values))
converted = list(map(chr, values))
print("[*] Converted values are: {}.".format(converted))
converted.reverse()
flag_content = "".join(converted)
print("[*] Flag content is: {}.".format(flag_content))
flag_content = flag_content.replace("FLaGIS", "")
print("[*] Flag is: darkCTF{{{}}}.".format(flag_content))
```

It will give you the flag.

```
$ python minesweeper.py
Misc/Minesweeper solver.
[*] Matrix 52x40.
93 91 95 88 42 78 93 91 93 93 83 73 75 67 79 93 79 75 97 85 83 85 79 87 93 83 69 87 77 89 79 81 67 69 75 95 89 89 93 95
75 85 75 96 69 70 85 95 81 97 95 75 75 85 79 77 87 69 95 77 81 81 89 79 73 93 73 93 91 97 85 85 67 87 67 89 85 95 75 71
83 89 73 80 76 72 79 73 71 71 79 91 91 69 83 89 73 67 67 85 69 85 81 89 93 75 97 77 75 83 85 79 73 75 73 79 75 83 83 69
79 67 91 71 89 97 97 67 95 67 77 95 67 79 81 87 95 69 76 90 94 92 76 80 75 89 85 73 91 81 75 81 91 95 73 73 86 82 94 79
79 69 83 71 95 73 75 83 97 83 97 91 75 97 79 87 87 95 90 69 90 90 67 72 67 75 89 83 91 81 89 95 69 97 69 89 70 78 62 97
95 85 87 97 71 67 85 83 83 67 67 93 81 87 71 87 71 83 82 66 97 80 74 46 77 81 77 87 75 89 91 77 67 83 87 67 78 62 82 87
89 79 91 96 82 92 91 85 69 79 67 91 82 78 92 89 83 95 73 68 76 76 89 87 77 97 77 94 82 94 91 77 85 81 71 95 95 93 97 95
89 77 79 72 69 84 73 91 73 77 83 81 80 73 96 89 89 93 93 92 84 82 79 77 69 97 97 88 97 86 85 67 77 91 67 73 81 93 81 97
69 73 67 68 92 90 71 83 79 95 91 67 86 62 78 89 85 67 81 66 92 94 93 79 89 69 85 80 88 66 87 83 69 91 81 77 95 93 69 73
73 75 97 77 75 83 67 81 75 73 91 79 89 93 71 91 69 77 75 93 85 87 69 97 73 85 85 81 95 91 81 67 97 71 83 97 83 71 93 77
81 91 95 89 90 86 78 67 79 67 91 89 69 95 89 97 85 85 89 82 94 84 79 71 73 77 71 85 73 95 77 77 77 95 97 83 67 83 67 93
75 83 77 95 68 80 94 85 73 91 89 91 75 93 95 85 91 93 83 86 68 76 77 85 81 79 67 71 89 89 85 93 71 87 91 93 83 95 93 81
69 77 97 77 82 90 70 87 93 87 97 97 89 71 69 91 95 87 67 78 78 70 67 91 71 69 77 85 85 81 81 97 71 69 87 91 91 69 81 77
69 97 69 79 69 87 67 85 81 85 73 85 69 81 89 73 93 69 93 87 83 69 83 73 95 79 79 73 81 79 97 93 95 81 69 69 87 81 67 81
83 83 87 77 67 97 67 91 71 81 67 83 73 77 77 67 83 83 85 77 81 91 89 67 95 87 95 87 81 93 97 77 83 91 71 89 83 71 77 69
67 89 85 81 86 90 78 85 71 85 93 95 69 81 89 73 75 70 68 88 67 87 93 67 67 77 89 95 67 83 79 79 98 96 76 79 91 93 71 91
81 81 83 85 76 78 80 67 85 75 93 89 95 79 91 91 75 96 97 82 85 91 69 85 75 73 83 93 89 83 91 69 72 78 72 89 73 95 67 89
89 91 77 97 76 68 98 67 91 91 89 89 89 87 67 75 83 84 88 98 85 77 89 89 69 77 89 81 69 91 85 95 88 70 88 87 91 91 69 83
83 84 60 82 79 91 95 67 69 73 67 97 77 75 93 71 73 75 95 87 75 95 73 93 95 80 82 88 85 77 73 75 69 95 85 77 68 78 92 81
71 42 79 86 97 75 75 81 79 87 85 87 73 81 87 75 91 67 91 67 93 77 87 91 67 76 73 72 97 83 95 73 71 69 79 89 92 84 82 69
67 78 74 88 77 91 67 85 87 97 69 89 69 85 85 89 81 67 97 91 71 85 91 85 75 98 82 70 69 79 75 97 97 85 95 97 94 80 64 79
73 81 79 79 71 97 79 77 93 79 95 85 85 95 79 91 77 91 81 67 93 75 89 87 67 77 93 89 67 77 77 77 91 77 67 81 79 73 87 91
93 92 82 88 85 95 69 79 93 89 67 72 76 88 85 77 81 87 75 83 75 95 97 77 91 93 87 87 88 62 90 85 79 93 75 89 85 64 62 98
83 82 97 62 91 77 81 67 85 67 87 88 86 94 77 89 73 77 67 81 75 95 87 79 85 77 93 89 74 82 78 77 79 89 83 95 77 70 69 94
85 94 92 90 71 71 89 83 77 73 93 72 98 90 83 97 89 93 95 91 77 95 93 93 69 75 75 69 74 78 72 85 97 69 83 75 75 88 90 72
73 67 82 74 66 87 85 89 71 97 77 93 81 69 78 82 92 81 81 91 67 71 79 79 69 81 84 82 88 91 85 69 95 84 70 88 89 81 71 77
95 87 94 83 84 69 69 97 79 73 69 91 83 89 80 66 84 93 97 77 77 91 83 69 91 91 80 79 98 91 67 91 91 70 69 72 89 77 71 83
93 83 94 78 82 78 66 74 79 95 93 89 79 87 90 74 76 85 67 93 77 81 67 83 90 70 72 86 76 91 79 89 71 82 72 88 91 67 67 95
85 89 73 95 83 72 86 70 91 81 81 69 87 97 97 77 77 77 87 97 91 81 93 69 66 97 84 89 89 95 77 71 85 91 95 75 67 97 71 71
81 97 75 67 73 92 74 78 81 91 75 93 73 75 87 95 67 83 75 71 97 91 89 71 82 80 82 87 77 95 91 93 79 73 73 69 75 75 93 79
89 71 87 89 76 70 88 83 91 73 83 91 91 93 76 84 62 75 91 69 97 93 73 95 75 73 77 67 81 72 88 80 73 73 87 75 73 75 91 95
75 67 87 79 72 72 96 69 85 85 81 95 81 81 76 85 80 97 75 77 91 79 75 91 73 69 81 77 81 98 79 62 87 85 69 89 67 97 67 81
77 85 73 77 82 74 90 95 69 81 71 69 73 83 80 88 84 73 75 87 70 68 84 77 83 83 77 71 85 86 80 84 93 89 73 69 85 89 91 79
81 77 87 69 87 95 69 79 69 71 71 75 91 93 97 95 83 81 67 83 92 89 96 95 97 93 81 79 71 69 93 75 89 71 77 69 91 97 79 69
69 87 87 85 69 83 85 77 97 89 83 67 73 83 82 74 64 95 93 87 72 68 80 92 68 92 87 85 91 85 79 91 97 97 71 93 85 89 85 85
85 81 77 95 81 89 77 73 85 87 71 73 83 95 92 83 68 71 73 69 87 81 97 72 73 98 91 89 81 71 85 77 95 95 69 81 77 79 67 97
69 93 75 97 67 93 77 67 75 77 79 89 71 67 76 94 80 75 81 95 67 75 71 90 74 76 87 79 71 73 79 75 73 87 81 91 95 75 95 69
67 85 87 72 66 82 95 69 87 73 91 93 72 70 92 83 93 89 95 67 72 76 78 85 87 97 91 75 89 85 83 85 77 89 94 80 78 69 77 95
71 95 73 76 71 66 67 97 95 75 95 87 70 97 80 77 91 91 95 87 82 76 66 93 97 69 71 91 83 89 67 93 77 85 62 70 78 97 81 93
85 97 87 72 86 92 97 79 67 73 69 81 92 90 82 79 77 77 67 81 80 66 78 75 81 83 69 83 67 89 97 93 95 95 76 78 70 97 83 55
93 69 87 103 99 127 65 107 93 113 97 81 125 127 103 97 71 125 111 127 101 73 127 93 83 105 97 119 113 109 73 81 101 83 73 87 71 93 73 67
101 115 65 83 95 95 109 123 89 83 97 107 101 123 123 71 71 87 75 73 65 121 67 77 87 73 69 99 87 99 125 81 79 65 127 101 117 95 115 95
107 99 83 75 113 109 71 127 127 85 71 125 67 69 113 111 79 111 123 113 93 107 127 113 105 73 65 67 91 113 87 113 79 89 105 95 73 95 79 71
117 115 93 69 85 65 83 101 75 127 99 93 99 113 81 91 77 93 81 87 117 93 109 121 105 127 85 79 79 117 79 125 125 69 117 95 73 121 107 107
117 115 93 69 85 65 83 101 75 127 99 93 99 113 81 91 77 93 81 87 117 93 109 121 105 127 85 79 79 117 79 125 125 69 117 95 73 121 107 107
117 115 93 69 85 65 83 101 75 127 99 93 99 113 81 91 77 93 81 87 117 93 109 121 105 127 85 79 79 117 79 125 125 69 117 95 73 121 107 107
117 115 93 69 85 65 83 101 75 127 99 93 99 113 81 91 77 93 81 87 117 93 109 121 105 127 85 79 79 117 79 125 125 69 117 95 73 121 107 107
93 69 87 103 99 127 65 107 93 113 97 81 125 127 103 97 71 125 111 127 101 73 127 93 83 105 97 119 113 109 73 81 101 83 73 87 71 93 73 67
93 69 87 103 99 127 65 107 93 113 97 81 125 127 103 97 71 125 111 127 101 73 127 93 83 105 97 119 113 109 73 81 101 83 73 87 71 93 73 67
93 69 87 103 99 127 65 107 93 113 97 81 125 127 103 97 71 125 111 127 101 73 127 93 83 105 97 119 113 109 73 81 101 83 73 87 71 93 73 67
93 69 87 103 99 127 65 107 93 113 97 81 125 127 103 97 71 125 111 127 101 73 127 93 83 105 97 119 113 109 73 81 101 83 73 87 71 93 73 67
93 69 87 103 99 127 65 107 93 113 97 81 125 127 103 97 71 125 111 127 101 73 127 93 83 105 97 119 113 109 73 81 101 83 73 87 71 93 73 67
[*] Values are: [69, 67, 78, 69, 73, 84, 97, 80, 68, 78, 97, 78, 79, 73, 84, 97, 86, 82, 69, 83, 66, 79, 69, 86, 97, 72, 85, 79, 89, 83, 73, 71, 97, 76, 70].
[*] Converted values are: ['E', 'C', 'N', 'E', 'I', 'T', 'a', 'P', 'D', 'N', 'a', 'N', 'O', 'I', 'T', 'a', 'V', 'R', 'E', 'S', 'B', 'O', 'E', 'V', 'a', 'H', 'U', 'O', 'Y', 'S', 'I', 'G', 'a', 'L', 'F'].
[*] Flag content is: FLaGISYOUHaVEOBSERVaTIONaNDPaTIENCE.
[*] Flag is: darkCTF{YOUHaVEOBSERVaTIONaNDPaTIENCE}.
```

Original writeup (https://github.com/m3ssap0/CTF-Writeups/blob/master/DarkCTF%202020/Minesweeper/README.md).