Skip to content

Instantly share code, notes, and snippets.

@cloudjunky
cloudjunky / dpi_parser.py
Created August 14, 2014 06:11
TShark to Python DPI and save in Mongo
__author__ = 'cloudjunky@gmail.com'
import sys
import hashlib
import pymongo
"""
:usage: tshark -T fields -e ip.src -e tcp.srcport -e ip.dst -e tcp.dstport -e frame.protocols -r capture.pcap | python dpi_parser.py
"""
@cloudjunky
cloudjunky / gist:6153797
Created August 5, 2013 06:03
Get the txt pkcs7 from the der
import os
import subprocess
from OpenSSL.crypto import PKCS7Type, load_pkcs7_data
directory = "/Users/michael/Downloads/Torrents/VirusShare_APT1_281/"
size_array = []
write_file = True
get_txt = True
for files in os.listdir(directory):
@cloudjunky
cloudjunky / gist:5001040
Created February 21, 2013 00:53
Bucket policy template for S3 Bucket processing on Packetloop. Just replace <<INSERT BUCKET NAME>> with your bucket name.
{
"Version": "2008-10-17",
"Id": "Policy1361081479235",
"Statement": [
{
"Sid": "Stmt1361081441897",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::772560792726:user/packetloop-s3"
},
@cloudjunky
cloudjunky / robot.js
Created December 6, 2012 04:40
RoboDurden
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.ahead(100);