⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.78
Server IP:
50.6.168.112
Server:
Linux server-617809.webnetzimbabwe.com 5.14.0-570.25.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jul 9 04:57:09 EDT 2025 x86_64
Server Software:
Apache
PHP Version:
8.4.10
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
ctaacademy
/
public_html
/
database
/
migrations
/
View File Name :
2024_12_10_051251_create_custom_addons_table.php
id(); $table->string('name')->index(); $table->string('slug'); $table->boolean('is_default')->default(false); $table->boolean('isPaid')->default(true); $table->text('description')->nullable(); $table->json('author')->nullable(); $table->json('options')->nullable(); $table->string('icon')->nullable(); $table->string('license')->nullable(); $table->string('url')->nullable(); $table->string('version')->nullable(); $table->date('last_update')->nullable(); $table->boolean('status')->default(false)->index('idx_custom_addons_status'); $table->timestamps(); }); try { foreach (Module::toCollection() as $module) { if ($module = Module::find($module)) { $getJsonFileLocation = $module->getPath().'/wsus.json'; if (file_exists($getJsonFileLocation)) { $wsusJsonData = json_decode(file_get_contents($getJsonFileLocation), true); if (is_array($wsusJsonData) && count($wsusJsonData) > 0) { $addon = new CustomAddon(); $addon->slug = $module; foreach ($wsusJsonData as $key => $value) { if ($key == 'last_update') { $addon->$key = date('Y-m-d', strtotime($value)); } else { $addon->$key = is_array($value) ? json_encode($value) : $value; } } $addon->status = true; $addon->save(); } } } } } catch (Exception $ex) { Log::error($ex->getMessage()); } } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('custom_addons'); } };