> For the complete documentation index, see [llms.txt](https://thamizhiniyancs.gitbook.io/writeups/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://thamizhiniyancs.gitbook.io/writeups/ctf/2024/pearl-ctf/forensics/excel-mayhem.md).

# Excel Mayhem

## Challenge Description

This excel sheet is troubling me a lot !! help me find the flag . Enclose the flag in pearl{}

### Attachments

{% file src="/files/ivu1AkeLcqWSTZfPAA21" %}

***

## Solution

I used the python pandas to read the `xlsx` file. I used regex to extract all valid words. Then used for loop to look out for strings that doesn't start with "fake\_flag" and is not a digit and found the flag.

### Python Script

```python
# import pandas lib as pd
import pandas as pd
import re

dataframe1 = pd.read_excel('/content/flags.xlsx')

for each in re.findall(r'\b[\w_]+?\b', dataframe1.to_string()):
  if not each.startswith("fake_flag") and not each.isdigit():
    print(each)
```

### Output

<figure><img src="https://2035863894-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjvlUrxK6i7ZNmn3d6e8B%2Fuploads%2FZ9gRGG9LCtsbDjg1Z1qT%2Fimage.png?alt=media&amp;token=753df501-6626-4d93-b8a2-63dc1094e17e" alt=""><figcaption></figcaption></figure>

Flag: `pearl{`h3ll\_0f\_4n\_3xc3l`}`
