Skip to content

Instantly share code, notes, and snippets.

@gnull
Created June 5, 2016 20:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gnull/d9fa51cb5b340151d5928a8244152aac to your computer and use it in GitHub Desktop.
Save gnull/d9fa51cb5b340151d5928a8244152aac to your computer and use it in GitHub Desktop.
Perl6 segfaulting code.
#!/usr/bin/env perl6
use v6;
use JSON::Tiny;
sub MAIN(Str $exploitd = './exploitd/', Str $config-file = './farm.json') {
my $config = from-json slurp $config-file;
my $flagre = $config<flag_regex> || '\w+';
my $targets = $config<targets> or die "'targets' are not present in $config-file";
my $submit = $config<submit> or die "'submit' is not present in $config-file";
my $exploits = $exploitd.IO.dir.map: {$_.path};
say "targets are $targets[]";
for $targets.race(batch => 2, degree => 2) -> $target {
for $exploits -> $exploit {
# shell "$exploit $target";
say "$exploit $target";
sleep 1;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment