diff --git a/src/client_backend/.vs/client_backend/v17/Browse.VC.db b/src/client_backend/.vs/client_backend/v17/Browse.VC.db index 5514c1b..3950669 100644 Binary files a/src/client_backend/.vs/client_backend/v17/Browse.VC.db and b/src/client_backend/.vs/client_backend/v17/Browse.VC.db differ diff --git a/src/server/cyberhex-code/api/php/database/compile_database.php b/src/server/cyberhex-code/api/php/database/compile_database.php index a6a8fbd..6f15f1b 100644 --- a/src/server/cyberhex-code/api/php/database/compile_database.php +++ b/src/server/cyberhex-code/api/php/database/compile_database.php @@ -35,6 +35,7 @@ function sort_hashes($inputFile) { fclose($handle); } function download_files(){ + //download from virusshare $file_count=485; for($i=0;$i<$file_count;$i++){ $fileNumber = sprintf('%05d', $i); @@ -45,6 +46,25 @@ function download_files(){ file_put_contents("/var/www/html/database_srv/$fileNumber.md5", $fileContents); sort_hashes("/var/www/html/database_srv/$fileNumber.md5"); } + //download from https://bazaar.abuse.ch/export/txt/md5/recent/ + $url="https://bazaar.abuse.ch/export/txt/md5/recent/"; + $ch = curl_init($url); + 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"); +} +$directory = '/var/www/html/database_srv'; // Path to the directory + +// Get a list of all files in the directory +$files = glob($directory . '/*'); + +// Iterate over each file and delete it +foreach ($files as $file) { + // Check if the file is a regular file (not a directory) + if (is_file($file)) { + unlink($file); + } } set_time_limit(0); download_files(); diff --git a/src/server/server.cpp b/src/server/server.cpp deleted file mode 100644 index 1cf52ec..0000000 --- a/src/server/server.cpp +++ /dev/null @@ -1,130 +0,0 @@ -#include -#include -#include -#include -#define db_files 485 -#define BUFFER_SIZE 1024 - -typedef struct -{ - char* prefix; - FILE* file; -} OutputFile; -int download_files() -{ - char buf[500]; - for (int i=0;i