# 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="<https://2035863894-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjvlUrxK6i7ZNmn3d6e8B%2Fuploads%2FAzbsi2La5B0YYGjyRexn%2Fflags.xlsx?alt=media&token=debd34a7-cd93-4aae-a256-5b88d1fdc223>" %}

***

## 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&#x26;token=753df501-6626-4d93-b8a2-63dc1094e17e" alt=""><figcaption></figcaption></figure>

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