Closes the email target-type gap (previously had zero collectors).
Checks whether an email is registered on 120+ sites via the
password-reset-oracle technique. Shares the Sherlock/whois venv.
HoleheRunner gates success on the CSV file existing rather than the
process exit code: holehe's CLI calls Python's exit("message") right
after writing results on its normal success path, which always yields
exit code 1 regardless of outcome — discovered while verifying this
end-to-end against the real dev server and queue worker.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
44 lines
1.2 KiB
PHP
44 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace App\Osint;
|
|
|
|
use App\Osint\Runners\CrtShRunner;
|
|
use App\Osint\Runners\HoleheRunner;
|
|
use App\Osint\Runners\IpApiRunner;
|
|
use App\Osint\Runners\SherlockRunner;
|
|
use App\Osint\Runners\TheHarvesterRunner;
|
|
use App\Osint\Runners\WhoisRunner;
|
|
|
|
class RunnerRegistry
|
|
{
|
|
/**
|
|
* Maps a sources.key value to the Runner implementation that handles it.
|
|
* A source with no entry here (or a null `runner` column) isn't
|
|
* integrated yet.
|
|
*
|
|
* @var array<string, class-string<Runner>>
|
|
*/
|
|
private const RUNNERS = [
|
|
'sherlock' => SherlockRunner::class,
|
|
'crtsh' => CrtShRunner::class,
|
|
'whois' => WhoisRunner::class,
|
|
'ip-api' => IpApiRunner::class,
|
|
'theharvester' => TheHarvesterRunner::class,
|
|
'holehe' => HoleheRunner::class,
|
|
];
|
|
|
|
public function has(string $sourceKey): bool
|
|
{
|
|
return isset(self::RUNNERS[$sourceKey]);
|
|
}
|
|
|
|
public function resolve(string $sourceKey): Runner
|
|
{
|
|
if (! $this->has($sourceKey)) {
|
|
throw new RunnerException("No runner registered for source [{$sourceKey}].");
|
|
}
|
|
|
|
return app(self::RUNNERS[$sourceKey]);
|
|
}
|
|
}
|