Skip to content

Instantly share code, notes, and snippets.

Tom Peterson thomasp11

  • @nullheadtom
  • New Hampshire, USA
Block or report user

Report or block thomasp11

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View cloudshark_upload.sh
#!/bin/bash
cloudshark_url="https://www.cloudshark.org"
api_token=${CLOUDSHARK_API}
filename=${1}
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)
@thomasp11
thomasp11 / cloudshark_search.rb
Created Apr 8, 2016
Prints URLs to each CloudShark capture found
View cloudshark_search.rb
#!/usr/bin/ruby
require 'date'
require 'time'
require 'json'
require 'open-uri'
require 'openssl'
###############################################################################
#
View cloudshark_capture.sh
#!/bin/bash
prompt="n"
cloudshark_url="https://www.cloudshark.org"
api_token="<INSERT API TOKEN HERE>"
dumpcap="/usr/bin/dumpcap"
# default values if not prompting
tmp_dir="/tmp/"
tmp_filename="traffic-$(date +%F-%H%M%S).pcapng"
View autoprune.rb
#!/usr/cloudshark/ruby/bin/ruby
#
#
# EXAMPLE CAPTURE PRUNING SCRIPT
#
# This is example code which must be run AT YOUR OWN RISK
# CloudShark is not responsible for any unintended data loss.
# This script is not officially supported by CloudShark or QA Cafe.
#
require 'date'
You can’t perform that action at this time.