Skip to content

Instantly share code, notes, and snippets.

View thomasp11's full-sized avatar

Tom Peterson thomasp11

  • @nullheadtom
  • New Hampshire, USA
View GitHub Profile
#!/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 April 8, 2016 17:16
Prints URLs to each CloudShark capture found
#!/usr/bin/ruby
require 'date'
require 'time'
require 'json'
require 'open-uri'
require 'openssl'
###############################################################################
#
#!/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"
@thomasp11
thomasp11 / autoprune.rb
Last active August 29, 2015 14:22 — forked from zachad/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'