Created
June 5, 2016 20:08
-
-
Save gnull/d9fa51cb5b340151d5928a8244152aac to your computer and use it in GitHub Desktop.
Perl6 segfaulting code.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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