Initial commit: Laravel OSINT platform
Multi-user OSINT investigation tool with owner-controlled per-user and per-group access grants. Includes Sherlock, theHarvester, crt.sh, WHOIS, and ip-api.com collectors wired through a pluggable Runner/queue pipeline, investigation search, and printable/CSV/JSON reporting. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\Investigation;
|
||||
use App\Models\Target;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\View\View;
|
||||
|
||||
class SearchController extends Controller
|
||||
{
|
||||
public function index(Request $request): View
|
||||
{
|
||||
$query = trim((string) $request->query('q', ''));
|
||||
|
||||
$investigations = collect();
|
||||
$targets = collect();
|
||||
|
||||
if ($query !== '') {
|
||||
$investigations = Investigation::query()
|
||||
->accessibleBy($request->user())
|
||||
->where('name', 'like', "%{$query}%")
|
||||
->orderBy('name')
|
||||
->get();
|
||||
|
||||
$targets = Target::query()
|
||||
->whereHas('investigation', fn ($q) => $q->accessibleBy($request->user()))
|
||||
->where('value', 'like', "%{$query}%")
|
||||
->with('investigation')
|
||||
->orderBy('value')
|
||||
->limit(100)
|
||||
->get();
|
||||
}
|
||||
|
||||
return view('search.index', [
|
||||
'query' => $query,
|
||||
'investigations' => $investigations,
|
||||
'targets' => $targets,
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user