SHARE
TWEET

Untitled

a guest Feb 26th, 2016 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2. ACCOUNT_USER=USER
  3. ACCOUNT_PASS=PASS
  4. USERAGENT=$(random_ua)
  5. #
  6. [ -z "$1" ] && echo "Falta archivo" && exit 1
  7. #
  8. streamcloud_upload () {
  9. echo -e "\n#--> STARTE UPLOAD: streamcloud.eu - FILE: ${1}\n"
  10. mkdir -p api
  11. COOKIE_STREAMCLOUD="api/cookie.streamcloud"
  12. rm -f ${COOKIE_STREAMCLOUD}
  13. STREAMCLOUD_LOGIN=`curl -sS ${PROXY_HOST} -A "${USERAGENT}" -c "${COOKIE_STREAMCLOUD}" -d "op=login&redirect=http%3A%2F%2Fstreamcloud.eu%2F&login=${ACCOUNT_USER}&password=${ACCOUNT_PASS}" "http://streamcloud.eu/"`
  14. STREAMCLOUD_TEMP=`curl -sS ${PROXY_HOST} -A "${USERAGENT}" -b "${COOKIE_STREAMCLOUD}" "http://streamcloud.eu/?op=upload"`
  15. STREAMCLOUD_SESSION_ID=`echo "${STREAMCLOUD_TEMP}" | grep "sess_id" | head -n1 | cut -d\" -f6`
  16. STREAMCLOUD_SERVER_TEMP=`echo "${STREAMCLOUD_TEMP}" | grep "srv_tmp_url" | head -n1 | cut -d\" -f6`
  17. STREAMCLOUD_DISK_ID=`echo "${STREAMCLOUD_TEMP}" | grep "disk_id" | head -n1 | cut -d\" -f6`
  18. STREAMCLOUD_SERVER=`echo "${STREAMCLOUD_SERVER_TEMP}" | cut -d\/ -f3 | cut -d\: -f1`
  19. STREAMCLOUD_SERVER_ID=`echo "${STREAMCLOUD_TEMP}" | grep "name=\"srv_id" | head -n1 | cut -d\" -f6`
  20. STREAMCLOUD_UPLOAD_ID=`shuf -i 100000000000-999999999999 -n 1`
  21. STREAMCLOUD_UPLOAD=`curl ${PROXY_HOST} -A "${USERAGENT}" -b "${COOKIE_STREAMCLOUD}" -F "upload_type=file" -F "sess_id=${STREAMCLOUD_SESSION_ID}" -F "srv_tmp_url=${STREAMCLOUD_SERVER_TEMP}" -F "srv_id=${STREAMCLOUD_SERVER_ID}" -F "disk_id=${STREAMCLOUD_DISK_ID}" -F "file=@${1}" -F "fakefilepc=${1}" -F "file_title=" -F "file_descr=" -F "tags=" -F "tos=1" -F "submit_btn= Hochladen! " -L "http://${STREAMCLOUD_SERVER}/cgi-bin/upload.cgi?upload_id=${STREAMCLOUD_UPLOAD_ID}&js_on=0&utype=reg&upload_type=file&disk_id=${STREAMCLOUD_DISK_ID}"`
  22. STREAMCLOUD_LINK=`echo "${STREAMCLOUD_UPLOAD}" | grep "${STREAMCLOUD_FILENAME}" | head -n1 | cut -d\" -f2`
  23. if [ -n "${STREAMCLOUD_LINK}" ]; then
  24. echo "${STREAMCLOUD_FILENAME}:${STREAMCLOUD_LINK};" >> link.streamcloud
  25. else
  26. streamcloud_upload "${1}"
  27. fi
  28. }
  29. #
  30. streamcloud_upload "$1"
RAW Paste Data
Top