Hey everyone
I've been struggling with this host for some time now and I can't figure out the problem. Here's the script I wrote:
Here are the two errors I'm getting:
or
Can anyone take a look and try to figure out what's wrong here. I'm pretty much clueless atm. Here is the form report:
Thanks
I've been struggling with this host for some time now and I can't figure out the problem. Here's the script I wrote:
Code:
#!/bin/bash
id2="`date +%y%m%d%H%M%S`$RANDOM"
cjar="/tmp/$id2"
function streamcloud_login {
local user="xxxx"
local pass="xxxxx"
curl --cookie-jar $cjar --data "op=login&login=$user&password=$pass&submit=Submit&redirect=http://streamcloud.eu/?op=upload" http://streamcloud.eu/?op=login
}
function streamcloud_upload {
local file="$1"
local DATA=$(curl --cookie $cjar http://streamcloud.eu/?op=upload)
SESS_ID=$(echo "$DATA" | grep 'sess_id' | sed 's/.*"\(.*\)"[^"]*$/\1/')
SRV_TMP_URL=$(echo "$DATA" | grep "srv_tmp_url" | sed 's/.*"\(.*\)"[^"]*$/\1/')
SRV_TMP_URL_2=$(echo "$SRV_TMP_URL" | sed 's/:8080\/tmp/\/cgi-bin\/upload.cgi?upload_id=/')
DISK_ID=$(echo "$DATA" | grep "disk_id" | sed 's/.*"\(.*\)"[^"]*$/\1/')
SRV_ID=$(echo "$DATA" | grep "srv_id" | sed 's/.*"\(.*\)"[^"]*$/\1/')
UPLOAD_ID=$(shuf -i 100000000000-999999999999 -n 1)
echo "SESS_ID:" $SESS_ID
echo "SRV_TMP_URL:" $SRV_TMP_URL
echo "SRV_TMP_URL2:" $SRV_TMP_URL_2
echo "DISK_ID:" $DISK_ID
echo "SRV_ID:" $SRV_ID
echo "UPLOAD_ID:" $UPLOAD_ID
PAGE=$(curl -L --cookie $cjar \
-F "upload_type=@$file" \
-F "sess_id=$SESS_ID" \
-F "disk_id=$DISK_ID" \
-F "srv_id=$SRV_ID" \
-F "srv_tmp_url=$SRV_TMP_URL" \
"$SRV_TMP_URL_2")
echo "$PAGE" >> sc_up.html
}
streamcloud_login
streamcloud_upload spacetestSMALL_512kb.mp4
Here are the two errors I'm getting:
Code:
<HTML><HEAD><Script>alert('\''ERROR: Invalid Disk ID'\'');</Script></HEAD><BODY><b>ERROR: Invalid Disk ID</b></BODY></HTML>
or
Code:
curl: (52) Empty reply from server
Can anyone take a look and try to figure out what's wrong here. I'm pretty much clueless atm. Here is the form report:
Code:
--- FORM report. Uses POST to URL "http://upload7.streamcloud.eu/cgi-bin/upload.cgi?upload_id="--- type: multipart form upload [use -F]
Input: NAME="upload_type" VALUE="file" (HIDDEN)
Input: NAME="sess_id" VALUE="t759luhl5i11nr0y" (HIDDEN)
Input: NAME="srv_tmp_url" VALUE="http://upload7.streamcloud.eu:8080/tmp" (HIDDEN)
Input: NAME="srv_id" VALUE="74" (HIDDEN)
Input: NAME="disk_id" VALUE="01" (HIDDEN)
Input: NAME="file" (FILE)
Input: NAME="fakefilepc" (TEXT)
Input: NAME="file_title" (TEXT)
Textarea: NAME="file_descr"
Input: NAME="tags" (TEXT)
Input: NAME="file_public" VALUE="1" (CHECKBOX)
Button: "+ upload slot" (BUTTON)
Input: NAME="tos" VALUE="1" (CHECKBOX)
Input: NAME="submit_btn" VALUE=" Upload! " (SUBMIT)
--- end of FORM
Thanks