Exploit databaseDownload repository ZIP
GH-0796e1841535bb9008bc5c3b1e3baf27
42bytelabs/konarr
Sources for CVE-2021-44228
465 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files6
42bytelabs/konarrRevision ead94a5a437a
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
src/utils/config/grypedb.rs
Rust · 607 bytesuse std::path::PathBuf;
use super::Config;
use crate::{KonarrError as Error, utils::grypedb::GrypeDatabase};
impl Config {
/// GrypeDB Path in data directory
pub fn grype_path(&self) -> Result<PathBuf, Error> {
let path = self.data_path()?.join("grypedb");
if !path.exists() {
log::debug!("Creating Grype path");
std::fs::create_dir_all(&path)?;
}
Ok(path)
}
/// Connect to a Grype Database
pub async fn grype_connection(&self) -> Result<GrypeDatabase, Error> {
GrypeDatabase::connect(&self.grype_path()?).await
}
}