Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Cloudshark's new API. #8

Merged
merged 1 commit into from
Oct 9, 2015
Merged

Support Cloudshark's new API. #8

merged 1 commit into from
Oct 9, 2015

Conversation

kgoodier
Copy link
Contributor

@kgoodier kgoodier commented Oct 6, 2015

Cloudshark now requires you to create an account and use an API token
to upload files. See https://support.cloudshark.org/api/upload.html
for more info.

The /etc/config/cdns file must now be edited after installation in
order to provide an API token.

Resolves issue #7

@kkocel
Copy link
Contributor

kkocel commented Oct 7, 2015

LGTM :)

@@ -95,7 +101,7 @@ start)
for i in 1 2 3
do
push_event $EVENT_ID UPLOAD "Uploading capture for ${PATHS[2]} to CloudShark ($i try)..."
JSON_STATUS=`curl --cacert /usr/lib/cdns/cacert.pem -H "Origin: https://appliance.cloudshark.org" -F "capture[upload]=@${DUMP_FILE}.0" https://www.cloudshark.org/captures.json`
JSON_STATUS=`curl --cacert /usr/lib/cdns/cacert.pem --upload-file ${DUMP_FILE}.0 https://www.cloudshark.org/api/v1/${CLOUDSHARK_API_TOKEN}/upload`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we need "" around ${DUMP_FILE}.0?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Took a look, and nowhere else in that file is $DUMP_FILE surrounded by double quotes. While I agree it would be safer to do that, this change matches existing usage. Quoting it should probably be a separate commit outside the scope of this pull request.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was in "capture[upload]=@${DUMP_FILE}.0"

@ayufan
Copy link
Collaborator

ayufan commented Oct 8, 2015

@kgoodier can fix this quotes?

Cloudshark now requires you to create an account and use an API token
to upload files. See https://support.cloudshark.org/api/upload.html
for more info.

The /etc/config/cdns file must now be edited after installation in
order to provide an API token.
@kgoodier
Copy link
Contributor Author

kgoodier commented Oct 9, 2015

Updated and added quotes to DUMP_FILE in the curl line.

ayufan added a commit that referenced this pull request Oct 9, 2015
@ayufan ayufan merged commit cb7d0c1 into Polidea:master Oct 9, 2015
@ayufan
Copy link
Collaborator

ayufan commented Oct 9, 2015

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants