Skip to content

Commit

Permalink
Merge pull request #977 from dbarzin/dev
Browse files Browse the repository at this point in the history
work on CVE search
  • Loading branch information
dbarzin authored Nov 22, 2024
2 parents 653d216 + 06ad437 commit 071b538
Showing 1 changed file with 5 additions and 19 deletions.
24 changes: 5 additions & 19 deletions app/Console/Commands/CVESearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ public function handle()
$check_frequency = config('mercator-config.cve.check-frequency');

// update provider
if ($provider === 'https//cve.circl.lu') {
if (($provider == 'https://cvepremium.circl.lu')||($provider === 'https//cve.circl.lu')) {
// change variable
$provider = 'https://cvepremium.circl.lu';
$provider = 'https://vulnerability.circl.lu';;
config(['mercator-config.cve.provider' => $provider]);

// Save configuration
Expand Down Expand Up @@ -156,9 +156,9 @@ public function handle()

// loop on all CVE
foreach ($json as $cve) {
// check CVE in frequency range
#print_r("------------------------------\n");
#print_r("-----------------------------------------------------\n");
#print_r($cve);
// check CVE in frequency range
if (property_exists($cve,"dataType") && $cve->dataType=="CVE_RECORD") {
if (strtotime($cve->cveMetadata->datePublished)>= $min_timestamp) {
// put summary in lowercase
Expand Down Expand Up @@ -189,22 +189,8 @@ public function handle()
}
else {
Log::error("Unknown CVE format !");
Log::error($cve);
}
/*
elseif (strtotime($cve->document->tracking->current_release_date) >= $min_timestamp) {
// put summary in lowercase
$text= strtolower($cve->document->title);
// Log::debug('CVESearch - CVE summary ' . $cve->summary);
foreach ($names as $name) {
// Log::debug('CVESearch - check ' . $name);
if (str_contains($tex, $name)) {
$message .= '<b>' . $cve->application . ' </b> : <b>' . $cve->id . ' </b> - ' . $cve->document->title . '<br>';
$found=true;
}
}
Log::error(json_encode($cve));
}
*/
}
$message .= '</body></html>';

Expand Down

0 comments on commit 071b538

Please sign in to comment.