# Using Curl with Updog Updog is a simple single threaded http server you can start with ``` pip install updog python3 -m updog ``` I needed to upload to it using curl, after reading https://github.com/sc0tfree/updog/issues/29 It looks like it is possible, but there is one annoying gotcha, you need the upload path. We can fetch it using a simple curl: ``` uhost=192.168.0.100:9090 curl $uhost | grep "<title>" ``` Then parsing out the field we can use it to upload a file: ``` out=$(curl -s $uhost | grep "<title>" | sed -n 's/.*<title>updog - \(.*\)<\/title>.*/\1/p') curl -v -F "file=@file.txt;filename=file.txt" -F "path=$out" $uhost/upload ``` In latest powershell you can do: ``` $uhost="192.168.0.100:9090" $out = irm $uhost | Select-String -Pattern "<title>updog - (.*?)</title>" | ForEach-Object { $_.Matches.Groups[1].Value } iwr -Uri $uhost/upload -Method Post -Form @{file=Get-Item "file.txt";filename="file.txt";path=$out} ``` Curl in windows is just an alias to iwr and -Form does not exist in 5.1 powershell. If you are in that boat, I would recommend just installing actual curl ``` curl.exe -v -F "file=@file.txt;filename=file.txt" -F "path=$out" $uhost/upload ```