Skip to content

Instantly share code, notes, and snippets.

var page = require('webpage').create(),
system = require('system'),
address;
page.onInitialized = function () {
page.evaluate(function () {
// additional detection code here perhaps
// f.e. detecting STORED/DOM XSS
});
$.fn.vectorMap('addMap', 'cn',{"insets": [{"width": 900.0, "top": 0, "height": 603.7372052457338, "bbox": [{"y": -6615931.205969351, "x": 8197509.958779432}, {"y": -2045697.9239836007, "x": 15010424.448806616}], "left": 0}], "paths": {"54": {"path": "M70.73,377.98l3.34,-0.37l1.23,-0.9l-0.15,1.09l0.54,1.5l2.17,1.89l0.91,0.18l2.08,-0.52l0.72,-1.76l2.47,-0.23l2.74,-2.56l0.39,-1.91l-1.33,-2.43l-1.11,-1.09l0.7,-2.71l-0.27,-0.93l-4.22,-1.03l-0.44,-0.81l-1.2,-0.5l-2.45,-2.91l-0.17,-5.06l-0.96,-3.09l0.11,-1.12l3.51,-2.22l0.31,-1.01l-0.29,-1.11l0.78,-0.58l2.38,-0.88l1.94,0.15l2.08,-0.67l3.56,1.0l1.28,-0.45l2.56,-4.65l-0.03,-1.0l-1.12,-2.57l2.26,-1.18l0.14,-0.89l-0.45,-0.8l2.34,-2.68l1.25,-2.81l0.02,-1.44l2.8,1.91l2.73,0.39l1.36,0.63l1.66,0.0l1.59,0.85l1.13,-0.27l0.26,-1.33l2.01,1.2l3.01,-0.16l2.88,1.5l6.04,-1.44l1.03,-1.98l3.26,-1.84l0.52,-1.59l1.2,-0.69l4.18,0.63l1.72,-0.7l1.62,0.44l0.16,2.69l2.42,1.65l1.67,-0.29l5.72,1.08l3.8,-0.26l2.19,-0.73l2.28,0.69l5.86,-3.09l3.17,-0.7l2.15,-1.48l3.2,-0.97l1.71,0.33l2.43,-0.38l2
-- This is a Hive program. Hive is an SQL-like language that compiles
-- into Hadoop Map/Reduce jobs. It's very popular among analysts at
-- Facebook, because it allows them to query enormous Hadoop data
-- stores using a language much like SQL.
-- Our logs are stored on the Hadoop Distributed File System, in the
-- directory /logs/randomhacks.net/access. They're ordinary Apache
-- logs in *.gz format.
--
-- We want to pretend that these gzipped log files are a database table,
create table dimension_rollup_periods
(period_id string, time_id string, begin_time timestamp, end_time timestamp)
STORED AS TEXTFILE;
/*Run make_periods.sh script*/
alter table dimension_rollup_periods set serdeproperties ('field.delim'=',');
LOAD DATA LOCAL INPATH 'periods/2012' OVERWRITE INTO TABLE dimension_rollup_periods;
#!/bin/bash
# WARNING: Don't use this in production since all passwords are kept at their default.
# mongodb
apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
echo -e "deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen\n" > /etc/apt/sources.list.d/mongodb-10gen.list
apt-get update
apt-get install -y mongodb-10gen
#!/usr/bin/env ruby
#
# Proof-of-Concept exploit for Rails Remote Code Execution (CVE-2013-0156)
#
# ## Advisory
#
# https://groups.google.com/forum/#!topic/rubyonrails-security/61bkgvnSGTQ/discussion
#
# ## Caveats
#