This file contains 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 requests, json, logging, sys | |
class PassiveTotal: | |
def __init__(self, apikey): | |
self.__apikey = apikey | |
self.__classifications = [ 'targeted', 'crime', 'benign', 'multiple' ] | |
self.__actions = [ 'add', 'remove' ] | |
This file contains 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
{ | |
'errors': [], | |
'results': { | |
'focusPoint': 'net.chiquita-brands.com', | |
'dynMatch': '', | |
'tags': [], | |
'userTags': ['chinese'], | |
'tld': 'com', | |
'dynamic': False, | |
'lastSeen': '2014-04-26 21:05:52', |
This file contains 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
#include <sstream> | |
#include <string> | |
#include <cstring> | |
#include <iostream> | |
#include <stdio.h> | |
using namespace std; | |
int main() | |
{ |
This file contains 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
loggersS = set() | |
def logger(loggerName, level, logFile=None): | |
''' | |
Get a logging instance | |
@param loggerName name of the logging instance | |
@param level level in which to log | |
@param logFile the absolute path to the log file to use. you must have write perms for this! | |
@return logging object used for later on |
This file contains 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 | |
def poorMansConvert(di, inPath, outType, outPath): | |
from apiclient.http import MediaFileUpload | |
valid_output = [ | |
'text/html','text/plain','application/rtf','application/vnd.oasis.opendocument.text',\ | |
'application/pdf','application/vnd.openxmlformats-officedocument.wordprocessingml.document',\ | |
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet','application/x-vnd.oasis.opendocument.spreadsheet',\ | |
'image/jpeg','image/png','image/svg+xml','application/vnd.openxmlformats-officedocument.presentationml.presentation' |
This file contains 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 | |
def poorMansConvert(di, inPath, outType, outPath): | |
from apiclient.http import MediaFileUpload | |
valid_output = [ | |
'text/html','text/plain','application/rtf','application/vnd.oasis.opendocument.text',\ | |
'application/pdf','application/vnd.openxmlformats-officedocument.wordprocessingml.document',\ | |
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet','application/x-vnd.oasis.opendocument.spreadsheet',\ | |
'image/jpeg','image/png','image/svg+xml','application/vnd.openxmlformats-officedocument.presentationml.presentation' |
This file contains 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 base64 | |
import sys | |
def main(): | |
if len(sys.argv) < 3: | |
sys.exit('Usage (2 arguments): %s "%s" %s' % (sys.argv[0],"malicious file","outfile")) | |
else: | |
f = open(sys.argv[1],"rb") | |
con = f.read() | |
f.close() |
This file contains 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 () { | |
fhash = this.hash; | |
this.static.strings.forEach(function (z) {emit(z.name, {hash: fhash, count_sum: z.count, count: 1});}); | |
} | |
var reduce = function (key, values) { | |
var hashes = [];var total = 0;var count = 0;var stotal = 0; | |
for (var i = 0; i < values.length; i++) { | |
stotal += values[i].count; | |
total += values[i].count_sum; |
This file contains 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 pycurl | |
import simplejson as json | |
import urllib | |
import time | |
import datetime | |
STREAM_URL = "https://stream.twitter.com/1/statuses/filter.json" | |
USER = "YOUR USERNAME" | |
PASS = "YOUR PASSWORD" |
This file contains 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 sys | |
import smtplib | |
import socket | |
from email.mime.text import MIMEText | |
def sendmail(user): | |
sender = "[email protected]" | |
recv = user | |
subject = "Shave it up!" |