Giter Club home page Giter Club logo

cve-search-2's Introduction

License

cve-search

Rust library for searching database of security vulnerabilities. The library uses the web service provided by CIRCL

Usage

Available on crates.io

Add this to your Cargo.toml

[dependencies]
cvesearch = "0.1"

Example

extern crate cvesearch;

use cvesearch::CVESearch;

fn main() {
    let cve = CVESearch::new();

    // All vulnerabilities on Apache ActiveMQ 
    let vuls = cve.search(String::from("apache"), String::from("activemq")).unwrap();
    let vuls_array = vuls.as_array().unwrap();
    for results in vuls_array.iter() {
        let obj = results.as_object().unwrap();
        println!("{} - {}", obj.get("id").unwrap(), obj.get("summary").unwrap());
    }

    // See details: https://cve.circl.lu/cve/CVE-2016-5284
    let vul = cve.get_cve("CVE-2016-5284".into()).unwrap();
    let vul_obj = vul.as_object().unwrap();
    println!("===> Summary {}", vul_obj.get("summary").unwrap());

    // DBInfo, example: last time vendors db has been updated
    let info = cve.db_info().unwrap();
    let obj = info.as_object().unwrap();
    println!("===> Vendors database updated at {}", obj.get("vendorU").unwrap());
}

License

Licensed under either of

cve-search-2's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.