Rating:

# Tricks 1:Web:120pts
A couple of PHP tricks, give it a try.
[Click here](https://ch5.sbug.se/)

# Solution
アクセスするとPHP問であることがわかる。
[site.png](site/site.png)
```php

```
パラメータ`a`と`b`は厳密に不等価であり、そのsha1とmd5が厳密に等価であればよい。
まずはsha1とmd5が共に一致するものは見つけにくいので、バイパスを考える。
文字列を引数にとるが、配列を入れるとNULLが返ってくるらしい。
つまり`sha1(["a"]) === sha1(["b"])`や`md5(["a"]) === md5(["b"])`は`NULL === NULL`となり真になる。
もちろん`["a"] !== ["b"]`は真である。
```bash
$ curl "https://ch5.sbug.se/?a[]=a&b[]=b"
SBCTF{g07_2_w17h_0n3_SH07?}
```
flagが得られた。

## SBCTF{g07_2_w17h_0n3_SH07?}

Original writeup (https://github.com/satoki/ctf_writeups/tree/master/Thor_2021_CTF/Tricks_1).