This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pymongo | |
| import json | |
| from pymongo import Connection | |
| def connect_to_mongo(host, port, database, collection): | |
| connection = Connection(host, port) | |
| db = connection[database] | |
| collection = db[collection] | |
| return collection |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python | |
| __description__ = 'Get the MDL list and search a blob' | |
| __author__ = 'Brandon Dixon' | |
| __version__ = '1.0' | |
| __date__ = '2011/19/01' | |
| import optparse | |
| import os |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| __description__ = 'Convert VT format to a user-friendly format' | |
| __author__ = 'Brandon Dixon' | |
| __version__ = '1.0' | |
| __date__ = '2011/03/21' | |
| import simplejson as json | |
| import urllib | |
| import urllib2 | |
| import hashlib |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import hashlib | |
| import optparse | |
| import os | |
| def get_hash_data(file, type): | |
| if type == "md5": | |
| output = hashlib.md5() | |
| elif type == "sha1": | |
| output = hashlib.sha1() | |
| elif type == "sha256": |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var map = function () { | |
| this.structure.keywords.keyword.forEach( | |
| function (z) { | |
| emit(z.name, {count_sum: z.count, count: 1}); | |
| } | |
| ); | |
| } | |
| var reduce = function (key, values) { | |
| var total = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var map = function () { | |
| this.structure.keywords.keyword.forEach(function (z) {emit(z.name, {count_hex: z.hexcodecount, count:1});}); | |
| } | |
| var reduce = function (key, values) { | |
| var total = 0; | |
| var count = 0; | |
| for (var i = 0; i < values.length; i++) { | |
| if (values[i].count_hex > 0) { | |
| total += values[i].count_hex; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var map = function () { | |
| this.structure.components.component.forEach( | |
| function (z) { | |
| emit(z.name, {count: 0, total: z.count, avg:0}); | |
| } | |
| ); | |
| } | |
| var reduce = function (key, values) { | |
| var count = db.malware.count(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var map = function () { | |
| this.scans.virustotal.report.results.scanners.forEach( | |
| function (z) { | |
| emit(z.antivirus, {signatures: [z.signature] , count: 1, total: 0}); | |
| } | |
| ); | |
| } | |
| var reduce = function (key, values) { | |
| var count = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from jabberbot import JabberBot, botcmd | |
| import datetime | |
| import base64 | |
| import pymongo | |
| import traceback | |
| import simplejson as json | |
| import os, sys, csv, zipfile, getopt, traceback, socket, urlparse, time, urllib2, string | |
| import StringIO | |
| import logging |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import simplejson as json | |
| from pymongo import Connection | |
| from bson.code import Code | |
| #cheap connection | |
| def connect_to_mongo(host, port, database, collection): | |
| connection = Connection(host, port) | |
| db = connection[database] | |
| collection = db[collection] | |
| return collection |
OlderNewer