从Virus Total API

时间:2015-10-26 09:09:11

标签: php html api

目前我正在开发一个网站,该网站涉及通过Virus Total PHP API扫描数据库中包含的网址。目前所有这些都正常工作,但是我希望有一种方法来显示以图形方式而不仅仅是代码生成的报告。我使用病毒总API的代码是:

<?php
$host = "localhost";
$user = "root";
$password = "";
$database = "apps";

$inputappname = $_POST["appname"];
$conn = mysqli_connect($host, $user, $password, $database) or die ("Failed to connect...");
$query = "select * from data where name = '$inputappname'";
$sqlResult = mysqli_query($conn, $query);

mysqli_close($conn);

require_once('VirusTotalApiV2.php');
$api = new VirusTotalAPIV2('VirustotalAPIKey');


/* Displaying database */
if($data = mysqli_fetch_array($sqlResult)){
    echo 'Search: '; echo $inputappname; echo '<br><br>';

    for($i = 0; $i < 31; $i++){
        $array = array(
            $i => $data[$i]         
        );
    echo $array[$i];    echo "<br>";
    }

    $searchUrl = $data[11];

    /* Displaying security results */
    $report = $api->getURLReport($searchUrl);
    $api->displayResult($report);
    print($api->getTotalNumberOfChecks($report) . '<br>');
    print($api->getNumberHits($report) . '<br>');
    print($api->getReportPermalink($report, FALSE) . '<br>');

} else {
    header('Location: notinlist.php');
}
?>

目前返回的结果如下:

stdClass Object
(
    [permalink] =>     https://www.virustotal.com/url/dc2a27ec0e08d9c6eddd61411ab422c0e23cfc75d00bbd5db19ca9d3e8c53fa2/analysis/1430547959/
    [resource] => https://play.google.com/store/apps/details?id=com.facebook.katana&hl=en
    [url] => https://play.google.com/store/apps/details?id=com.facebook.katana&hl=en
    [response_code] => 1
    [scan_date] => 2015-05-02 06:25:59
    [scan_id] => dc2a27ec0e08d9c6eddd61411ab422c0e23cfc75d00bbd5db19ca9d3e8c53fa2-1430547959
    [verbose_msg] => Scan finished, scan information embedded in this object
    [filescan_id] => 
    [positives] => 0
    [total] => 63
    [scans] => stdClass Object
        (
            [CLEAN MX] => stdClass Object
                (
                    [detected] => 
                    [result] => clean site
                )

            [VX Vault] => stdClass Object
                (
                    [detected] => 
                    [result] => clean site
                )

            [ZDB Zeus] => stdClass Object
                (
                    [detected] => 
                    [result] => clean site
                )

            [Tencent] => stdClass Object
                (
                    [detected] => 
                    [result] => clean site
                )

            [MalwarePatrol] => stdClass Object
                (
                    [detected] => 
                    [result] => clean site
                )

            [ZCloudsec] => stdClass Object
                (
                    [detected] => 
                    [result] => clean site
                )

            [PhishLabs] => stdClass Object
                (
                    [detected] => 
                    [result] => unrated site
                )

            [Zerofox] => stdClass Object
                (
                    [detected] => 
                    [result] => clean site
                )

            [K7AntiVirus] => stdClass Object
                (
                    [detected] => 
                    [result] => clean site
                )

            [Quttera] => stdClass Object
                (
                    [detected] => 
                    [result] => clean site
                )

            [Spam404] => stdClass Object
                (
                    [detected] => 
                    [result] => clean site
                )

            [AegisLab WebGuard] => stdClass Object
                (
                    [detected] => 
                    [result] => clean site
                )

            [MalwareDomainList] => stdClass Object
                (
                    [detected] => 
                    [result] => clean site
                    [detail] => http://www.malwaredomainlist.com/mdl.php?search=play.google.com
                )

            [ZeusTracker] => stdClass Object
                (
                    [detected] => 
                    [result] => clean site
                    [detail] => https://zeustracker.abuse.ch/monitor.php?host=play.google.com
                )

            [zvelo] => stdClass Object
                (
                    [detected] => 
                    [result] => clean site
                )

            [Google Safebrowsing] => stdClass Object
                (
                    [detected] => 
                    [result] => clean site
                )

            [Kaspersky] => stdClass Object
                (
                    [detected] => 
                    [result] => clean site
                )

            [BitDefender] => stdClass Object
                (
                    [detected] => 
                    [result] => clean site
                )

            [Dr.Web] => stdClass Object
                (
                    [detected] => 
                    [result] => clean site
                )

            [ADMINUSLabs] => stdClass Object
                (
                    [detected] => 
                    [result] => clean site
                )

            [C-SIRT] => stdClass Object
                (
                    [detected] => 
                    [result] => clean site
                )

            [CyberCrime] => stdClass Object
                (
                    [detected] => 
                    [result] => clean site
                )

            [Websense ThreatSeeker] => stdClass Object
                (
                    [detected] => 
                    [result] => clean site
                )

            [CRDF] => stdClass Object
                (
                    [detected] => 
                    [result] => clean site
                )

            [Webutation] => stdClass Object
                (
                    [detected] => 
                    [result] => clean site
                )

            [Trustwave] => stdClass Object
                (
                    [detected] => 
                    [result] => clean site
                )

            [Web Security Guard] => stdClass Object
                (
                    [detected] => 
                    [result] => clean site
                )

            [G-Data] => stdClass Object
                (
                    [detected] => 
                    [result] => clean site
                )

            [Malwarebytes hpHosts] => stdClass Object
                (
                    [detected] => 
                    [result] => clean site
                )

            [Wepawet] => stdClass Object
                (
                    [detected] => 
                    [result] => clean site
                )

            [AlienVault] => stdClass Object
                (
                    [detected] => 
                    [result] => clean site
                )

            [Emsisoft] => stdClass Object
                (
                    [detected] => 
                    [result] => clean site
                )

            [Malc0de Database] => stdClass Object
                (
                    [detected] => 
                    [result] => clean site
                    [detail] => http://malc0de.com/database/index.php?search=play.google.com
                )

            [SpyEyeTracker] => stdClass Object
                (
                    [detected] => 
                    [result] => clean site
                    [detail] => https://spyeyetracker.abuse.ch/monitor.php?host=play.google.com
                )

            [malwares.com URL checker] => stdClass Object
                (
                    [detected] => 
                    [result] => clean site
                )

            [Phishtank] => stdClass Object
                (
                    [detected] => 
                    [result] => clean site
                )

            [Malwared] => stdClass Object
                (
                    [detected] => 
                    [result] => clean site
                )

            [Avira] => stdClass Object
                (
                    [detected] => 
                    [result] => clean site
                )

            [OpenPhish] => stdClass Object
                (
                    [detected] => 
                    [result] => clean site
                )

            [Antiy-AVL] => stdClass Object
                (
                    [detected] => 
                    [result] => clean site
                )

            [SCUMWARE.org] => stdClass Object
                (
                    [detected] => 
                    [result] => clean site
                )

            [FraudSense] => stdClass Object
                (
                    [detected] => 
                    [result] => clean site
                )

            [Opera] => stdClass Object
                (
                    [detected] => 
                    [result] => clean site
                )

            [Comodo Site Inspector] => stdClass Object
                (
                    [detected] => 
                    [result] => clean site
                )

            [Malekal] => stdClass Object
                (
                    [detected] => 
                    [result] => clean site
                )

            [ESET] => stdClass Object
                (
                    [detected] => 
                    [result] => clean site
                )

            [Sophos] => stdClass Object
                (
                    [detected] => 
                    [result] => unrated site
                )

            [Yandex Safebrowsing] => stdClass Object
                (
                    [detected] => 
                    [result] => clean site
                    [detail] => http://yandex.com/infected?l10n=en&url=https://play.google.com/store/apps/details?id=com.facebook.katana&hl=en
                )

            [SecureBrain] => stdClass Object
                (
                    [detected] => 
                    [result] => clean site
                )

            [Malware Domain Blocklist] => stdClass Object
                (
                    [detected] => 
                    [result] => clean site
                )

            [Blueliv] => stdClass Object
                (
                    [detected] => 
                    [result] => clean site
                )

            [Netcraft] => stdClass Object
                (
                    [detected] => 
                    [result] => unrated site
                )

            [PalevoTracker] => stdClass Object
                (
                    [detected] => 
                    [result] => clean site
                )

            [AutoShun] => stdClass Object
                (
                    [detected] => 
                    [result] => unrated site
                )

            [ThreatHive] => stdClass Object
                (
                    [detected] => 
                    [result] => clean site
                )

            [ParetoLogic] => stdClass Object
                (
                    [detected] => 
                    [result] => clean site
                )

            [Rising] => stdClass Object
                (
                    [detected] => 
                    [result] => clean site
                )

            [URLQuery] => stdClass Object
                (
                    [detected] => 
                    [result] => unrated site
                )

            [StopBadware] => stdClass Object
                (
                    [detected] => 
                    [result] => unrated site
                )

            [Sucuri SiteCheck] => stdClass Object
                (
                    [detected] => 
                    [result] => clean site
                )

            [Fortinet] => stdClass Object
                (
                    [detected] => 
                    [result] => clean site
                )

            [ZeroCERT] => stdClass Object
                (
                    [detected] => 
                    [result] => clean site
                )

            [Baidu-International] => stdClass Object
                (
                    [detected] => 
                    [result] => clean site
                )

        )

)
63
0
https://www.virustotal.com/url/dc2a27ec0e08d9c6eddd61411ab422c0e23cfc75d00bbd5db19ca9d3e8c53fa2/analysis/

有没有办法改变这个以图形方式显示?

0 个答案:

没有答案