Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
use 5.14.0; | |
use Plack::Request; | |
use IO::Handle; | |
use Encode; | |
use List::Util qw/sum/; | |
use POSIX qw/strftime/; | |
use JSON::XS; | |
my $json_encoder = JSON::XS->new->latin1; | |
my $json_decoder = JSON::XS->new->utf8; |
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
#!/usr/local/bin/perl | |
# DoS tool for memcached | |
# ulimit -n 15000; perl memcachedos.pl 127.0.0.1 11211 3 | |
# original: http://gist.github.com/522741 | |
# This is Public Domain Software | |
use strict; | |
use warnings; | |
use AnyEvent; |