From c78454cac18cfebf94cbe8b428c6202698ca118c Mon Sep 17 00:00:00 2001 From: mcoder Date: Tue, 14 Apr 2026 17:07:40 +0330 Subject: [PATCH] Add --- docker/nginx/default.conf | 35 +++++++++++++++++++++-------------- routes/web.php | 9 ++++++++- 2 files changed, 29 insertions(+), 15 deletions(-) diff --git a/docker/nginx/default.conf b/docker/nginx/default.conf index 6c4c914..ed7e787 100644 --- a/docker/nginx/default.conf +++ b/docker/nginx/default.conf @@ -1,15 +1,22 @@ -# تنظیم برای victim.lab - - ServerName victim.lab - ProxyPreserveHost On - ProxyPass / http://127.0.0.1:8001/ - ProxyPassReverse / http://127.0.0.1:8001/ - +# تنظیمات سایت قربانی (Laravel) +server { + listen 80; + server_name victim.lab; + root /var/www/html/public; + index index.php; + location / { try_files $uri $uri/ /index.php?$query_string; } + location ~ \.php$ { + fastcgi_pass php:9000; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include fastcgi_params; + } +} -# تنظیم برای attacker.lab - - ServerName attacker.lab - ProxyPreserveHost On - ProxyPass / http://127.0.0.1:8002/ - ProxyPassReverse / http://127.0.0.1:8002/ - \ No newline at end of file +# تنظیمات سایت مهاجم (Static/Hacker) +server { + listen 80; + server_name attacker.lab; + location / { + proxy_pass http://hacker-app:80; + } +} \ No newline at end of file diff --git a/routes/web.php b/routes/web.php index 8d5f6f6..56ab496 100644 --- a/routes/web.php +++ b/routes/web.php @@ -1,6 +1,7 @@ name('vulnerability.stealer'); // پنل مشاهده لاگ‌های سرقت شده -Route::get('/hacker-panel', [VulnerabilityController::class, 'viewLogs'])->name('vulnerability.logs'); \ No newline at end of file +Route::get('/hacker-panel', [VulnerabilityController::class, 'viewLogs'])->name('vulnerability.logs'); + + +Route::post('/update-email', function (Illuminate\Http\Request $request) { + // در دنیای واقعی اینجا ایمیل در دیتابیس آپدیت می‌شود + return "ایمیل با موفقیت به " . $request->email . " تغییر یافت. (حمله موفق!)"; +})->withoutMiddleware([VerifyCsrfToken::class]); \ No newline at end of file