> For the complete documentation index, see [llms.txt](https://blog.dev4cloud.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://blog.dev4cloud.net/pentesting-and-red-teaming/python-for-exfil.md).

# Python for Exfil

Ever looking to get that juicy excel file with all the client data past the blue team?

```python
import base64
import time

data = open("dummy.xls", 'rb').read()
base64_encoded = base64.b64encode(data).decode('UTF-8')
print ("Encoding your data")
print ("Saving to output.txt")
with open("output.txt", "a") as f:
    print(data, file=f) 
time.sleep(2)
print ("ALL DONE!!")
```
