Follow along with the video below to see how to install our site as a web app on your home screen.
Примечание: This feature may not be available in some browsers.
На гитхабе 13 проектов - Для просмотра ссылки ВойдиПерелопател весь гугл, ничего рабочего не нашел.
Хочет db_connect.phpА вот готовое, да еще и с примером формоче, как вам хочется - Для просмотра ссылки Войдиили Зарегистрируйся
Warning: require_once(db_connect.php): failed to open stream: No such file or directory i
Значит повезло лишь частичноХочет db_connect.php
В архиве нетКод:Warning: require_once(db_connect.php): failed to open stream: No such file or directory i
$query="Insert into `file_scan`(`name`) VALUES ('".$value['name']."')";
Спасибо,но не могу его подключитьДля просмотра ссылки Войдиили Зарегистрируйся
На вход ссылка для проверки, на выходе картинка следующего вида.
Лого virustotal можно поменять на свое
<?php
/*
* VirusTotal Image Generator
* https://github.com/Yanikore/VirusTotal-Image-Generator
* Version: 1.0.0
*
* created by Yani
* https://github.com/Yanikore
*/
/*
* Configuration
*/
// VirusTotal API key
$virusTotalAPI = 'ТУТ МОЙ КОД';
// Font
$font = 'res/Gidole-Regular.ttf';
// Logo
$logo = 'res/logo.png';
// Cache time in seconds (21600 = 6hr)
$cacheTime = 21600;
// Size
$width = 500;
$height = 1240;
/*
* Actual code
*/
if(!isset($_GET['q']) || !is_string($_GET['q'])) die();
$qRes = $_GET['q'];
header('Pragma: public');
header('Cache-Control: max-age=' . $cacheTime);
header('Expires: '. gmdate('D, d M Y H:i:s \G\M\T', time() + (int)$cacheTime));
header('Content-Type: image/png');
// Make image
$image = imagecreate($width, $height);
// Create
$logoImage = imagecreatefrompng($logo);
imagealphablending($logoImage, true);
imagesavealpha($logoImage, true);
// Colors
$color['background'] = imagecolorallocate($image, 253, 253, 253);
$color['infobox'] = imagecolorallocate($image, 247, 247, 247);
$color['border'] = imagecolorallocate($image, 210, 210, 210);
$color['black'] = imagecolorallocate($image, 75, 75, 75);
$color['green'] = imagecolorallocate($image, 0, 240, 0);
$color['red'] = imagecolorallocate($image, 240, 0, 0);
// Background and border
imagefill($image, 0, 0, $color['background']);
imagerectangle($image, 0, 0, $width - 1, $height - 1, $color['border']);
// Add logo
$logoX = imagesx($logoImage);
$logoY = imagesy($logoImage);
imagecopy($image, $logoImage, ($width - $logoX) / 2, 15, 0, 0, $logoX, $logoY);
// Query VirusTotal
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL, 'http://www.virustotal.com/vtapi/v2/file/report');
curl_setopt($ch,CURLOPT_POST, true);
curl_setopt($ch,CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch,CURLOPT_POSTFIELDS, 'resource=' . $qRes . '&apikey=' . $virusTotalAPI);
$result = curl_exec($ch);
curl_close($ch);
// JSON the result
$json = json_decode($result, true);
// Check vor a valid result
if(!$json || $json['response_code'] != '1'){
$bbox = imageftbbox(18, 0, $font, 'File not found.');
$x = $bbox[0] + (imagesx($image) / 2) - ($bbox[4] / 2) - 5;
$y = $bbox[1] + (imagesy($image) / 2) - ($bbox[5] / 2) - 5;
imagefttext($image, 18, 0, $x, $y, $color['black'], $font, 'File not found.');
imagepng($image);
imagedestroy($image);
die();
}
// Create the Infobox
imagefilledrectangle($image, 30, $logoY + 40, $width - 30, $logoY + 130, $color['infobox']);
// Add text to the Infobox
imagefttext($image, 11, 0, 40, $logoY + 60, $color['black'], $font, 'SHA1: ' . $json['sha1']);
imagefttext($image, 11, 0, 40, $logoY + 80, $color['black'], $font, 'MD5: ' . $json['md5']);
imagefttext($image, 11, 0, 40, $logoY + 100, $color['black'], $font, 'Last Scan: ' . $json['scan_date']);
imagefttext($image, 11, 0, 40, $logoY + 120, $color['black'], $font, 'Status: ');
// Colour the scan result
if($json['positives'] > 0) imagefttext($image, 11, 0, 90, $logoY + 120, $color['red'], $font, $json['positives'] . '/' . $json['total']);
else imagefttext($image, 11, 0, 90, $logoY + 100, $color['green'], $font, $json['positives'] . '/' . $json['total']);
// Alphabetize the scanner names
ksort($json['scans']);
// Loop trough all scans
$scanY = $logoY + 165;
foreach($json['scans'] as $name => $array){
imagefttext($image, 11, 0, 45, $scanY, $color['black'], $font, $name);
if($array['detected'] == '1') imagefttext($image, 11, 0, $width / 2, $scanY, $color['red'], $font, $array['result']);
else imagefttext($image, 11, 0, $width / 2, $scanY, $color['green'], $font, 'Clean');
$scanY = $scanY + 18;
}
// Add Yanistamp
$bbox = imageftbbox(11, 0, $font, 'made by Yani');
imagefttext($image, 11, 0, imagesx($image) - $bbox[2] - 5, $height - 5, $color['border'], $font, 'made by Yani');
// Output the file, and clear the resources
imagepng($image);
imagedestroy($image);
?>
<?php
/*
* VirusTotal Image Generator
* https://github.com/Yanikore/VirusTotal-Image-Generator
* Version: 1.0.0
*
* created by Yani
* https://github.com/Yanikore
*/
/*
* Configuration
*/
// VirusTotal API key
$virusTotalAPI = 'мой ключ апи';
// Font
$font = 'res/Gidole-Regular.ttf';
// Logo
$logo = 'res/logo.png';
// Cache time in seconds (21600 = 6hr)
$cacheTime = 21600;
// Size
$width = 500;
$height = 1240;
/*
* Actual code
*/
if(!isset($_GET['q']) || !is_string($_GET['q'])) die();
$qRes = $_GET['q'];
header('Pragma: public');
header('Cache-Control: max-age=' . $cacheTime);
header('Expires: '. gmdate('D, d M Y H:i:s \G\M\T', time() + (int)$cacheTime));
header('Content-Type: image/png');
// Make image
$image = imagecreate($width, $height);
// Create
$logoImage = imagecreatefrompng($logo);
imagealphablending($logoImage, true);
imagesavealpha($logoImage, true);
// Colors
$color['background'] = imagecolorallocate($image, 253, 253, 253);
$color['infobox'] = imagecolorallocate($image, 247, 247, 247);
$color['border'] = imagecolorallocate($image, 210, 210, 210);
$color['black'] = imagecolorallocate($image, 75, 75, 75);
$color['green'] = imagecolorallocate($image, 0, 240, 0);
$color['red'] = imagecolorallocate($image, 240, 0, 0);
// Background and border
imagefill($image, 0, 0, $color['background']);
imagerectangle($image, 0, 0, $width - 1, $height - 1, $color['border']);
// Add logo
$logoX = imagesx($logoImage);
$logoY = imagesy($logoImage);
imagecopy($image, $logoImage, ($width - $logoX) / 2, 15, 0, 0, $logoX, $logoY);
// Query VirusTotal
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL, 'http://www.virustotal.com/vtapi/v2/url/report');
curl_setopt($ch,CURLOPT_POST, true);
curl_setopt($ch,CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch,CURLOPT_POSTFIELDS, 'resource=' . $qRes . '&apikey=' . $virusTotalAPI);
$result = curl_exec($ch);
curl_close($ch);
// JSON the result
$json = json_decode($result, true);
// Check vor a valid result
if(!$json || $json['response_code'] != '1'){
$bbox = imageftbbox(18, 0, $font, 'File not found.');
$x = $bbox[0] + (imagesx($image) / 2) - ($bbox[4] / 2) - 5;
$y = $bbox[1] + (imagesy($image) / 2) - ($bbox[5] / 2) - 5;
imagefttext($image, 18, 0, $x, $y, $color['black'], $font, 'File not found.');
imagepng($image);
imagedestroy($image);
die();
}
// Create the Infobox
imagefilledrectangle($image, 30, $logoY + 40, $width - 30, $logoY + 130, $color['infobox']);
// Add text to the Infobox
imagefttext($image, 11, 0, 40, $logoY + 60, $color['black'], $font, 'Url: ' . $json['url']);
//imagefttext($image, 11, 0, 40, $logoY + 80, $color['black'], $font, 'MD5: ' . $json['md5']);
imagefttext($image, 11, 0, 40, $logoY + 100, $color['black'], $font, 'Last Scan: ' . $json['scan_date']);
imagefttext($image, 11, 0, 40, $logoY + 120, $color['black'], $font, 'Status: ');
// Colour the scan result
if($json['positives'] > 0) imagefttext($image, 11, 0, 90, $logoY + 120, $color['red'], $font, $json['positives'] . '/' . $json['total']);
else imagefttext($image, 11, 0, 90, $logoY + 100, $color['green'], $font, $json['positives'] . '/' . $json['total']);
// Alphabetize the scanner names
ksort($json['scans']);
// Loop trough all scans
$scanY = $logoY + 165;
foreach($json['scans'] as $name => $array){
imagefttext($image, 11, 0, 45, $scanY, $color['black'], $font, $name);
if($array['detected'] == '1') imagefttext($image, 11, 0, $width / 2, $scanY, $color['red'], $font, $array['result']);
else imagefttext($image, 11, 0, $width / 2, $scanY, $color['green'], $font, 'Clean');
$scanY = $scanY + 18;
}
// Add Yanistamp
$bbox = imageftbbox(11, 0, $font, 'made by Yani');
imagefttext($image, 11, 0, imagesx($image) - $bbox[2] - 5, $height - 5, $color['border'], $font, 'made by Yani');
// Output the file, and clear the resources
imagepng($image);
imagedestroy($image);
?>[/CODE]
[/SPOILER]
Этот скрипт сразу запрашивает репорт без засылки задания.
А поидее сначала надо кидать тем же способом урл на проверку что и в скрипте:
[PHP]// Query VirusTotal
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL, 'https://www.virustotal.com/vtapi/v2/url/scan');
curl_setopt($ch,CURLOPT_POST, true);
curl_setopt($ch,CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch,CURLOPT_POSTFIELDS, 'url=' . $qRes . '&apikey=' . $virusTotalAPI);
$result = curl_exec($ch);
curl_close($ch);
string(4928) "{"scan_id": "cf9bb2ddb738dd604496e69d1b75b3ac4016e2834a8f80240941dae862aec64f-1476706646", "resource": "https://www.nulled.cc/", "url": "https://www.nulled.cc/", "response_code": 1, "scan_date": "2016-10-17 12:17:26", "permalink": "https://www.virustotal.com/url/cf9bb2ddb738dd604496e69d1b75b3ac4016e2834a8f80240941dae862aec64f/analysis/1476706646/", "verbose_msg": "Scan finished, scan information embedded in this object", "filescan_id": null, "positives": 1, "total": 68, "scans": {"CLEAN MX": {"detected": false, "result": "clean site"}, "Rising": {"detected": false, "result": "clean site"}, "OpenPhish": {"detected": false, "result": "clean site"}, "VX Vault": {"detected": false, "result": "clean site"}, "ZDB Zeus": {"detected": false, "result": "clean site"}, "AutoShun": {"detected": false, "result": "unrated site"}, "ZCloudsec": {"detected": false, "result": "clean site"}, "PhishLabs": {"detected": false, "result": "unrated site"}, "Zerofox": {"detected": false, "result": "clean site"}, "K7AntiVirus": {"detected": false, "result": "clean site"}, "SecureBrain": {"detected": false, "result": "clean site"}, "Quttera": {"detected": false, "result": "clean site"}, "AegisLab WebGuard": {"detected": false, "result": "clean site"}, "MalwareDomainList": {"detected": false, "result": "clean site", "detail": "http://www.malwaredomainlist.com/mdl.php?search=www.nulled.cc"}, "ZeusTracker": {"detected": false, "result": "clean site", "detail": "https://zeustracker.abuse.ch/monitor.php?host=www.nulled.cc"}, "zvelo": {"detected": false, "result": "clean site"}, "Google Safebrowsing": {"detected": false, "result": "clean site"}, "FraudScore": {"detected": false, "result": "clean site"}, "Kaspersky": {"detected": false, "result": "unrated site"}, "BitDefender": {"detected": false, "result": "clean site"}, "Wepawet": {"detected": false, "result": "clean site"}, "Certly": {"detected": false, "result": "clean site"}, "G-Data": {"detected": false, "result": "clean site"}, "C-SIRT": {"detected": false, "result": "clean site"}, "CyberCrime": {"detected": false, "result": "clean site"}, "Websense ThreatSeeker": {"detected": true, "result": "malicious site"}, "MalwarePatrol": {"detected": false, "result": "clean site"}, "Webutation": {"detected": false, "result": "clean site"}, "Trustwave": {"detected": false, "result": "clean site"}, "Web Security Guard": {"detected": false, "result": "clean site"}, "desenmascara.me": {"detected": false, "result": "clean site"}, "ADMINUSLabs": {"detected": false, "result": "clean site"}, "Malwarebytes hpHosts": {"detected": false, "result": "clean site"}, "Dr.Web": {"detected": false, "result": "clean site"}, "AlienVault": {"detected": false, "result": "clean site"}, "Emsisoft": {"detected": false, "result": "clean site"}, "Malc0de Database": {"detected": false, "result": "clean site", "detail": "http://malc0de.com/database/index.php?search=www.nulled.cc"}, "SpyEyeTracker": {"detected": false, "result": "clean site", "detail": "https://spyeyetracker.abuse.ch/monitor.php?host=www.nulled.cc"}, "malwares.com URL checker": {"detected": false, "result": "clean site"}, "Phishtank": {"detected": false, "result": "clean site"}, "Malwared": {"detected": false, "result": "clean site"}, "Avira": {"detected": false, "result": "clean site"}, "StopBadware": {"detected": false, "result": "unrated site"}, "Antiy-AVL": {"detected": false, "result": "clean site"}, "SCUMWARE.org": {"detected": false, "result": "clean site"}, "FraudSense": {"detected": false, "result": "clean site"}, "Opera": {"detected": false, "result": "clean site"}, "Comodo Site Inspector": {"detected": false, "result": "clean site"}, "Malekal": {"detected": false, "result": "clean site"}, "ESET": {"detected": false, "result": "clean site"}, "Sophos": {"detected": false, "result": "unrated site"}, "Yandex Safebrowsing": {"detected": false, "result": "clean site", "detail": "http://yandex.com/infected?l10n=en&url=https://www.nulled.cc/"}, "Spam404": {"detected": false, "result": "clean site"}, "Nucleon": {"detected": false, "result": "clean site"}, "Malware Domain Blocklist": {"detected": false, "result": "clean site"}, "Blueliv": {"detected": false, "result": "clean site"}, "Netcraft": {"detected": false, "result": "unrated site"}, "PalevoTracker": {"detected": false, "result": "clean site"}, "CRDF": {"detected": false, "result": "clean site"}, "ThreatHive": {"detected": false, "result": "clean site"}, "ParetoLogic": {"detected": false, "result": "clean site"}, "Tencent": {"detected": false, "result": "clean site"}, "URLQuery": {"detected": false, "result": "unrated site"}, "Sucuri SiteCheck": {"detected": false, "result": "clean site"}, "Fortinet": {"detected": false, "result": "clean site"}, "ZeroCERT": {"detected": false, "result": "clean site"}, "Baidu-International": {"detected": false, "result": "clean site"}, "securolytics": {"detected": false, "result": "clean site"}}}"
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL, 'https://www.virustotal.com/vtapi/v2/url/scan');
curl_setopt($ch,CURLOPT_POST, true);
curl_setopt($ch,CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch,CURLOPT_POSTFIELDS, 'url=' . $qRes . '&apikey=' . $virusTotalAPI);
curl_exec($ch);
curl_close($ch);
sleep(3);
<?php
/*
* VirusTotal Image Generator
* https://github.com/Yanikore/VirusTotal-Image-Generator
* Version: 1.0.0
*
* created by Yani
* https://github.com/Yanikore
*/
/*
* Configuration
*/
// VirusTotal API key
$virusTotalAPI = 'клююююч';
// Font
$font = 'res/Gidole-Regular.ttf';
// Logo
$logo = 'res/logo.png';
// Cache time in seconds (21600 = 6hr)
$cacheTime = 21600;
// Size
$width = 500;
$height = 1240;
/*
* Actual code
*/
if(!isset($_GET['q']) || !is_string($_GET['q'])) die();
$qRes = $_GET['q'];
header('Pragma: public');
header('Cache-Control: max-age=' . $cacheTime);
header('Expires: '. gmdate('D, d M Y H:i:s \G\M\T', time() + (int)$cacheTime));
header('Content-Type: image/png');
// Make image
$image = imagecreate($width, $height);
// Create
$logoImage = imagecreatefrompng($logo);
imagealphablending($logoImage, true);
imagesavealpha($logoImage, true);
// Colors
$color['background'] = imagecolorallocate($image, 253, 253, 253);
$color['infobox'] = imagecolorallocate($image, 247, 247, 247);
$color['border'] = imagecolorallocate($image, 210, 210, 210);
$color['black'] = imagecolorallocate($image, 75, 75, 75);
$color['green'] = imagecolorallocate($image, 0, 240, 0);
$color['red'] = imagecolorallocate($image, 240, 0, 0);
// Background and border
imagefill($image, 0, 0, $color['background']);
imagerectangle($image, 0, 0, $width - 1, $height - 1, $color['border']);
// Add logo
$logoX = imagesx($logoImage);
$logoY = imagesy($logoImage);
imagecopy($image, $logoImage, ($width - $logoX) / 2, 15, 0, 0, $logoX, $logoY);
// Query VirusTotal
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL, 'https://www.virustotal.com/vtapi/v2/url/scan');
curl_setopt($ch,CURLOPT_POST, true);
curl_setopt($ch,CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch,CURLOPT_POSTFIELDS, 'url=' . $qRes . '&apikey=' . $virusTotalAPI);
curl_exec($ch);
curl_close($ch);
sleep(3);
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL, 'https://www.virustotal.com/vtapi/v2/url/report');
curl_setopt($ch,CURLOPT_POST, true);
curl_setopt($ch,CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch,CURLOPT_POSTFIELDS, 'resource=' . $qRes . '&apikey=' . $virusTotalAPI);
$result = curl_exec($ch);
curl_close($ch);
// JSON the result
$json = json_decode($result, true);
// Check vor a valid result
if(!$json || $json['response_code'] != '1'){
$bbox = imageftbbox(18, 0, $font, 'Result not found.');
$x = $bbox[0] + (imagesx($image) / 2) - ($bbox[4] / 2) - 5;
$y = $bbox[1] + (imagesy($image) / 2) - ($bbox[5] / 2) - 5;
imagefttext($image, 18, 0, $x, $y, $color['black'], $font, 'File not found.');
imagepng($image);
imagedestroy($image);
die();
}
// Create the Infobox
imagefilledrectangle($image, 30, $logoY + 40, $width - 30, $logoY + 130, $color['infobox']);
// Add text to the Infobox
imagefttext($image, 11, 0, 40, $logoY + 60, $color['black'], $font, 'Url: ' . $json['url']);
//imagefttext($image, 11, 0, 40, $logoY + 80, $color['black'], $font, 'MD5: ' . $json['md5']);
imagefttext($image, 11, 0, 40, $logoY + 100, $color['black'], $font, 'Last Scan: ' . $json['scan_date']);
imagefttext($image, 11, 0, 40, $logoY + 120, $color['black'], $font, 'Status: ');
// Colour the scan result
if($json['positives'] > 0) imagefttext($image, 11, 0, 90, $logoY + 120, $color['red'], $font, $json['positives'] . '/' . $json['total']);
else imagefttext($image, 11, 0, 90, $logoY + 100, $color['green'], $font, $json['positives'] . '/' . $json['total']);
// Alphabetize the scanner names
ksort($json['scans']);
// Loop trough all scans
$scanY = $logoY + 165;
foreach($json['scans'] as $name => $array){
imagefttext($image, 11, 0, 45, $scanY, $color['black'], $font, $name);
if($array['detected'] == '1') imagefttext($image, 11, 0, $width / 2, $scanY, $color['red'], $font, $array['result']);
else imagefttext($image, 11, 0, $width / 2, $scanY, $color['green'], $font, 'Clean');
$scanY = $scanY + 18;
}
// Add Yanistamp
$bbox = imageftbbox(11, 0, $font, 'made by Yani');
imagefttext($image, 11, 0, imagesx($image) - $bbox[2] - 5, $height - 5, $color['border'], $font, 'made by Yani');
// Output the file, and clear the resources
imagepng($image);
imagedestroy($image);
?>