Skip to content

Commit

Permalink
fix module/using new data source
Browse files Browse the repository at this point in the history
  • Loading branch information
htrgouvea committed Jan 21, 2024
1 parent 3d8bc58 commit f36a15c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/Spellbook/Helper/CDN_Checker.pm
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ package Spellbook::Helper::CDN_Checker {
my $ip = Spellbook::Recon::Get_IP -> new (["--target" => $target]);

if ($ip) {
my $cnd_list = "https://cdn.nuclei.sh";
my $cnd_list = "https://raw.githubusercontent.com/projectdiscovery/cdncheck/main/cmd/generate-index/sources_data.json";
my $useragent = Spellbook::Core::UserAgent -> new ();
my $request = $useragent -> get($cnd_list);

if ($request -> code == 200) {
my $content = decode_json($request -> content);

my $data = decode_json($request -> content);
my $content = $data -> {"cdn"};

for (keys %{$content}) {
for (@{$content -> {$_}}) {
my $range = Net::IP -> new($_);

my $value = Net::IP -> new($ip);
my $match = $range -> overlaps($value);

Expand Down

0 comments on commit f36a15c

Please sign in to comment.