Aszone\Avenger\SearchHackingEngine::execute PHP Method

execute() protected method

protected execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->validParamns($input, $output);
        $filterProxy = array();
        if ($this->torl) {
            $torl = new Proxies();
            $this->torl = $torl->getTor();
        }
        $commandData = array('dork' => $this->dork, 'pl' => $this->pl, 'tor' => $this->tor, 'torl' => $this->torl, 'virginProxies' => $this->vp, 'check' => $this->check, 'email' => $this->email);
        $dorks = explode('||', $commandData['dork']);
        foreach ($dorks as $dork) {
            $commandData['dork'] = $dork;
            $sh = new SearchHacking($commandData);
            foreach ($this->eng as $enginer) {
                $output->writeln('<comment>*' . $enginer . '</comment>');
                switch ($enginer) {
                    case 'google':
                        $result['google'] = $sh->runGoogle();
                        break;
                    case 'googleapi':
                        $result['googleapi'] = $sh->runGoogleApi();
                        break;
                    case 'bing':
                        $result['bing'] = $sh->runBing();
                        break;
                    case 'yandex':
                        $result['yandex'] = $sh->runYandex();
                        break;
                    case 'yahoo':
                        $result['yahoo'] = $sh->runYahoo();
                        break;
                    case 'dukedukego':
                        $result['dukedukego'] = $sh->runDukeDukeGo();
                        break;
                    case 'all':
                        $result['google'] = $sh->runGoogle();
                        $result['googleapi'] = $sh->runGoogleApi();
                        $result['bing'] = $sh->runBing();
                        $result['yandex'] = $sh->runYandex();
                        $result['yahoo'] = $sh->runYahoo();
                        $result['dukedukego'] = $sh->runDukeDukeGo();
                        break;
                    default:
                        $output->writeln('<comment>Name Enginer not exist, help me and send email with site of searching not have [email protected] ... </comment>');
                        break;
                }
                if (isset($result[$enginer]->error)) {
                    $this->printError($result, $output);
                    exit;
                }
            }
            $output->writeln('');
            $output->writeln('<info>Begin Results...</info>');
            $output->writeln('');
            if (!empty($this->email)) {
                $this->sendMail($result, $this->email);
                $this->printResumeResult($output, 'Email to send:', $this->email);
            }
            //Generate name file of txt
            $nameFile = $this->createNameFile();
            if (!empty($this->txt)) {
                $nameFile = $this->txt;
            }
            //Save txt and print
            $file = $this->saveTxt($result, $nameFile);
            $this->printResult($result, $output, 'Result list of Search:');
            $this->printResumeResult($output, 'Patch File of Search:', $file);
            if (!empty($this->check)) {
                $resultsOfCheck = $this->checkVunerabilities($nameFile, $result, $commandData, $output);
                if (!empty($this->exploit) && $resultsOfCheck) {
                    $this->checkExploits($resultsOfCheck, $commandData, $output);
                }
            }
            sleep(5);
        }
    }