# Misdirection
Author: [roerohan](https://github.com/roerohan)
# Requirements
- Python
# Source
```Check out the new Flag Finder service! We will find the flag for you!
Connect here:http://jh2i.com:50011/```
# Exploitation
Here, every other site you visit gives you an additional character of the flag, and redirects you to a new site.
```pythonimport requests
host = "http://jh2i.com:50011"default = host + "/site/flag.php"
r = requests.get(default, allow_redirects=False)
flag = ''
while not flag or flag[len(flag)-1] != '}':    r = requests.get(host + r.headers["Location"], allow_redirects=False)
    if (int(r.headers['Content-Length']) > 0):        flag += r.text.split('flag is ')[1].strip()    print(flag)```
Run this and you get the flag, letter by letter.
```bash$ python script.py 
ffflflflaflaflagflagflag{flag{flag{hflag{hflag{htflag{htflag{httflag{httflag{httpflag{httpflag{http_flag{http_flag{http_3flag{http_3flag{http_30flag{http_30flag{http_302flag{http_302flag{http_302_flag{http_302_flag{http_302_pflag{http_302_pflag{http_302_poflag{http_302_poflag{http_302_poiflag{http_302_poiflag{http_302_poinflag{http_302_poinflag{http_302_pointflag{http_302_pointflag{http_302_point_flag{http_302_point_flag{http_302_point_yflag{http_302_point_yflag{http_302_point_yoflag{http_302_point_yoflag{http_302_point_youflag{http_302_point_youflag{http_302_point_you_flag{http_302_point_you_flag{http_302_point_you_iflag{http_302_point_you_iflag{http_302_point_you_inflag{http_302_point_you_inflag{http_302_point_you_in_flag{http_302_point_you_in_flag{http_302_point_you_in_tflag{http_302_point_you_in_tflag{http_302_point_you_in_thflag{http_302_point_you_in_thflag{http_302_point_you_in_theflag{http_302_point_you_in_theflag{http_302_point_you_in_the_flag{http_302_point_you_in_the_flag{http_302_point_you_in_the_rflag{http_302_point_you_in_the_rflag{http_302_point_you_in_the_riflag{http_302_point_you_in_the_riflag{http_302_point_you_in_the_rigflag{http_302_point_you_in_the_rigflag{http_302_point_you_in_the_righflag{http_302_point_you_in_the_righflag{http_302_point_you_in_the_rightflag{http_302_point_you_in_the_rightflag{http_302_point_you_in_the_right_flag{http_302_point_you_in_the_right_flag{http_302_point_you_in_the_right_rflag{http_302_point_you_in_the_right_rflag{http_302_point_you_in_the_right_reflag{http_302_point_you_in_the_right_reflag{http_302_point_you_in_the_right_redflag{http_302_point_you_in_the_right_redflag{http_302_point_you_in_the_right_rediflag{http_302_point_you_in_the_right_rediflag{http_302_point_you_in_the_right_redirflag{http_302_point_you_in_the_right_redirflag{http_302_point_you_in_the_right_redireflag{http_302_point_you_in_the_right_redireflag{http_302_point_you_in_the_right_redirecflag{http_302_point_you_in_the_right_redirecflag{http_302_point_you_in_the_right_redirectflag{http_302_point_you_in_the_right_redirectflag{http_302_point_you_in_the_right_redirectiflag{http_302_point_you_in_the_right_redirectiflag{http_302_point_you_in_the_right_redirectioflag{http_302_point_you_in_the_right_redirectioflag{http_302_point_you_in_the_right_redirectionflag{http_302_point_you_in_the_right_redirectionflag{http_302_point_you_in_the_right_redirection}````
The flag is:
```flag{http_302_point_you_in_the_right_redirection}```