Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
echo "curl -s -F file="@${filename}" ${cloudshark_url}/api/v1/${api_token}/upload"
response=$(curl -s -F file="@${filename}" ${cloudshark_url}/api/v1/${api_token}/upload)
json_id=$(echo $response | python -m json.tool | grep id)
if [ "$json_id" != "" ]; then
# find the CloudShark ID for this session
id=`echo $json_id | sed 's/:/ /1' | awk -F" " '{ print $2 }'| sed 's/\"//g'`
# show a URL using the capture session in CloudShark
echo "A new CloudShark session has been created at:"
echo "${cloudshark_url}/captures/$id"
echo "Could not upload capture to CloudShark:"
echo $response | python -m json.tool

This comment has been minimized.

Copy link
Owner Author

thomasp11 commented Apr 1, 2019

CLOUDSHARK_API will need to be defined somewhere as your CloudShark API token.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.