diff --git a/lib/Spellbook/Exploit/S3_Misconfig.pm b/lib/Spellbook/Exploit/S3_Misconfig.pm deleted file mode 100644 index b819764..0000000 --- a/lib/Spellbook/Exploit/S3_Misconfig.pm +++ /dev/null @@ -1,52 +0,0 @@ -package Spellbook::Exploit::S3_Misconfig { - use strict; - use warnings; - use Amazon::S3; - - # https://metacpan.org/pod/Net::Amazon::S3 - # https://metacpan.org/pod/AWS::S3 - # https://metacpan.org/pod/Amazon::S3 - - sub new { - my ($self, $parameters) = @_; - my ($help, $target); - - Getopt::Long::GetOptionsFromArray ( - $parameters, - "h|help" => \$help, - "t|target=s" => \$target - ); - - if ($target) { - my $s3 = Amazon::S3 -> new ( - aws_access_key_id => "spellbook", - aws_secret_access_key => "spellbook", - ); - - my $bucket = $s3 -> bucket($target); - - my $success = $bucket -> add_key("./lib/Spellbook/Exploit/S3_Misconfig.pm", "spellbook.txt"); - - if ($success) { - $bucket -> delete_key("spellbook.txt"); - - return "Bucket is publicly writable!"; - } - - return "Bucket is not publicly writable."; - } - - if ($help) { - return " - \rExploit::S3_Misconfig - \r======================= - \r-h, --help See this menu - \r-t, --target Define a aws s3 bucket - "; - } - - return 0; - } -} - -1; \ No newline at end of file