Giter VIP home page Giter VIP logo

0day.today-api's Introduction

0day.today unofficial API | 0.2 beta

Banner.png

Unofficial API for 0day.today database.

This API is not affiliated in any way with "0day.today" and its operation may be against the terms and conditions of "0day.today", therefore the execution of the API will be carried out under the legal responsibility of the user and MrSentex will be uncharged from any illegal use of the API.

Special thanks:

  • @virtualminds (Telegram)

Dependencies

All you need to use the API and start to work with it.

Python

Dependencies needed to use the API with Python

  • Python 2.7 with PyPi (pip)

Python packages needed:

  • requests
  • bs4
  • unidecode

These dependencies are available in PyPi so they can be installed from the command pip install <package> or they can be installed with the following command: pip install -r requeriments.txt (Must be executed from the folder).

Usage

from ApiLib import api_0day_today

search_param = "ssh"

Api = api_0day_today()

print "Searching '{}' in 0day.today database".format(search_param)

results = Api.search(search_param)

if results["status"] != "fail":

    for result in results["response"]:

        print "====== Exploit ======="
        print "Date: {}\nDescription: {}\nPlatform: {}\nPrice: {}\nAuthor: {}\nURL: {}".format(result["date"], result["desc"], result["platform"], result["price"], result["author"], result["url"])
        print "======================"

else:

    print "[ERROR] {}".format(results["exception"])

PHP

Dependencies needed to use the API with PHP

  • PHP (5/7)

PHP modules needed:

The first two packages are installed through apt, yum or any other linux package installer. In the case of windows php-xml is already included in the php core and for the install of php-curl is necessary to modify the php.init file and possibly download php_curl.dll .

Usage

<?php

    include("ApiLib.php");

    $api_0day_today = new api_0day_today();

    $search_param = "ssh";

    $search = $api_0day_today->search($search_param);

    if ($search["status"] === "fail") {
        printf("[Error] ".$search["exception"]."\n"); die();
    }

    foreach($search["response"] as $hit) {
        printf("====== Exploit ======\n");
        printf("Date: %s\n", $hit["date"]);
        printf("Description: %s\n", $hit["desc"]);
        printf("Platform: %s\n", $hit["platform"]);
        printf("Price: %s\n", $hit["price"]);
        printf("Author: %s\n", $hit["author"]);
        printf("URL : %s\n", $hit["url"]);
        printf("======================\n");
    }

?>

0day.today-api's People

Contributors

mrsentex avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

0day.today-api's Issues

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.