updating databnase to handle yara rules
This commit is contained in:
@@ -42,7 +42,7 @@ function sort_hashes($inputFile, $excluded) {
|
||||
}
|
||||
function download_files($excluded){
|
||||
//download from virusshare
|
||||
/*$file_count=485;
|
||||
$file_count=485;
|
||||
for($i=0;$i<$file_count;$i++){
|
||||
$fileNumber = sprintf('%05d', $i);
|
||||
$url="https://virusshare.com/hashfiles/VirusShare_$fileNumber.md5";
|
||||
@@ -58,7 +58,7 @@ function download_files($excluded){
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
$fileContents = curl_exec($ch);
|
||||
file_put_contents("/var/www/html/database_srv/buf.md5", $fileContents);
|
||||
sort_hashes("/var/www/html/database_srv/buf.md5", $excluded);*/
|
||||
sort_hashes("/var/www/html/database_srv/buf.md5", $excluded);
|
||||
//download yara rules
|
||||
$url="https://jakach.duckdns.org/cyberhex/yara/yara.zip";
|
||||
$ch = curl_init($url);
|
||||
@@ -154,7 +154,7 @@ $files = glob($directory . '/*');
|
||||
foreach ($files as $file) {
|
||||
// Check if the file is a regular file (not a directory)
|
||||
if (is_file($file)) {
|
||||
//unlink($file);
|
||||
unlink($file);
|
||||
}
|
||||
}
|
||||
set_time_limit(0);
|
||||
|
||||
Reference in New Issue
Block a user