From 54171e54942f1a25a0f4c18df669fbdabfbfb8be Mon Sep 17 00:00:00 2001 From: htrgouvea Date: Sun, 9 Jun 2024 15:44:29 -0300 Subject: [PATCH 1/3] add masscan --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index 4bc9455..b04ebaf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,6 +3,9 @@ FROM perl:5.32-threaded COPY . /usr/src/spellbook WORKDIR /usr/src/spellbook +RUN apt-get update && \ + apt-get install -y masscan + RUN cpanm --installdeps . ENTRYPOINT [ "perl", "./spellbook.pl" ] \ No newline at end of file From c2a718aa0fd20784bc4b19b05b88f58e0e7c71e2 Mon Sep 17 00:00:00 2001 From: htrgouvea Date: Sun, 9 Jun 2024 15:44:49 -0300 Subject: [PATCH 2/3] added --keep option --- lib/Spellbook/Helper/Scope.pm | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/lib/Spellbook/Helper/Scope.pm b/lib/Spellbook/Helper/Scope.pm index 3c31af0..d9f6ada 100644 --- a/lib/Spellbook/Helper/Scope.pm +++ b/lib/Spellbook/Helper/Scope.pm @@ -1,13 +1,13 @@ package Spellbook::Helper::Scope { use strict; use warnings; - use YAML::Tiny; # https://metacpan.org/pod/YAML::Tiny + use YAML::Tiny; use Spellbook::Core::Module; use Spellbook::Core::Orchestrator; sub new { my ($self, $parameters) = @_; - my ($help, $scope, $information, $entrypoint, $save, @results, @response); + my ($help, $scope, $information, $entrypoint, $save, $keep, @results, @response); my $threads = 10; @@ -18,6 +18,7 @@ package Spellbook::Helper::Scope { "i|information=s" => \$information, "e|entrypoint=s" => \$entrypoint, "t|threads=i" => \$threads, + "K|keep" => \$keep, "save:s" => \$save ); @@ -43,10 +44,15 @@ package Spellbook::Helper::Scope { } if ($save) { - for (keys @results) { - $yamlfile -> [0] -> {$save} = [@results]; - $yamlfile -> write ($scope); + if ($keep && exists $yamlfile->[0]->{$save}) { + push @{$yamlfile->[0]->{$save}}, @results; } + + else { + $yamlfile->[0]->{$save} = [@results]; + } + + $yamlfile->write($scope); } return @results; @@ -60,6 +66,7 @@ package Spellbook::Helper::Scope { \r-S, --scope Define a YML file as a scope \r-i, --information Set an information to extract from your scope \r-e, --entrypoint Send informations to another entrypoint module + \r-K, --keep Keep the current values in the file and add news values \r--save Save the output on some attribute\n\n"; } From 8956d02e223aefc64f1f820da7b10bec4143b68f Mon Sep 17 00:00:00 2001 From: htrgouvea Date: Sun, 9 Jun 2024 15:45:27 -0300 Subject: [PATCH 3/3] added badges --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 5bc29ad..2a06805 100755 --- a/README.md +++ b/README.md @@ -9,6 +9,11 @@ +
+ + + +