Skip to content

Instantly share code, notes, and snippets.

View eklitzke's full-sized avatar

Evan Klitzke eklitzke

View GitHub Profile
@eklitzke
eklitzke / .bashrc
Last active August 29, 2015 14:08
overthrow arcanist tyrants
# replace arc with a version that ignores .arcconfig and always squashes
which arc &>/dev/null
if [ "$?" -eq 0 ]; then
REAL_ARC_COMMAND="$(which arc)"
arc () {
if [ "$#" -ge 1 -a "$1" = "land" ]; then
shift 1
"$REAL_ARC_COMMAND" land --squash "$@"
else
"$REAL_ARC_COMMAND" "$@"
#!/usr/bin/stap
global fn_calls;
probe python.function.entry
{
fn_calls[pid(), filename, funcname, lineno] += 1;
}
probe timer.ms(1000) {
statsd:
bind: 127.0.0.1:8125
shard_map:
0: 127.0.0.1:10000
1: 127.0.0.1:10001
2: 127.0.0.1:10002
3: 127.0.0.1:10003
carbon:
bind: 127.0.0.1:2003
shard_map:
evan@vm ~/code/statsrelay/src (master) $ echo -ne 'foo\nbar\nbaz\n' | ./stathasher ../config.yaml
key:foo carbon:127.0.0.1:11001 carbon_shard:1 statsd:127.0.0.1:10001 statsd_shard:1
key:bar carbon:127.0.0.1:11001 carbon_shard:1 statsd:127.0.0.1:10001 statsd_shard:1
key:baz carbon:127.0.0.1:11002 carbon_shard:2 statsd:127.0.0.1:10002 statsd_shard:2
/***** This file contains automatically generated code ******
**
** The code in this file has been automatically generated by
**
** sqlite/tool/mkkeywordhash.c
**
** The code in this file implements a function that determines whether
** or not a given identifier is really an SQL keyword. The same thing
** might be implemented more directly using a hand-written hash table.
** But by using this automatically generated code, the size of the code
/*
** 2001 September 15
**
** The author disclaims copyright to this source code. In place of
** a legal notice, here is a blessing:
**
** May you do good and not evil.
** May you find forgiveness for yourself and forgive others.
** May you share freely, never taking more than you give.
**
The exploit
-----------
This library has the very specific target of undermining the security of the
"internet of things". It was designed to be attractive to being integrated into
IoT hardware platforms where it will be difficult to patch once it is
discovered. The backdoor also has a fairly strong degree of
deniability. It arises from a rare, yet plausible bug. It would be very hard to
establish malice as opposed to simple oversight on the programmers part once the
exploit is publicly discovered.
uber@[local] uber=# explain select 1 limit 0;
^CCancel request sent
^CCancel request sent
^CCancel request sent
^CCancel request sent
^CCancel request sent
^CCancel request sent
ERROR: canceling statement due to user request
Time: 5632.911 ms
package main
import "fmt"
type field struct {
count int
}
func main() {
// init field list
package main
import "fmt"
// Foo is some stupid struct, whatever.
type Foo struct {
Bar string
}
// Surprising holds a slice of Foos.