Skip to content

Commit

Permalink
add command exploit for lfd
Browse files Browse the repository at this point in the history
  • Loading branch information
lenonleite committed Jul 22, 2016
1 parent 75dc2c1 commit bc2675a
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/SearchHackingEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use Aszone\Vulnerabilities\LocalFileDownload;
use Aszone\Avenger\Mailer;
use Aszone\Hacking\DefaultSite;
use Aszone\HackingAnalyzeStaticFiles\DownloadByLocalFileDownload;

class SearchHackingEngine extends Command
{
Expand Down Expand Up @@ -99,6 +100,11 @@ protected function configure()
null,
InputOption::VALUE_NONE,
'Set the mail for send result. Example: --email'),
new InputOption(
'exploit',
null,
InputOption::VALUE_NONE,
'Set the exploit for exploit vulnerabilities, function only check lfd: --exploit'),

/*new InputOption(
'hashs',
Expand Down Expand Up @@ -211,6 +217,7 @@ protected function validParamns(InputInterface $input, OutputInterface $output)
$this->torl = $input->getOption('torl');
$this->check = $this->sanitazeValuesOfEnginers($input->getOption('check'));
$this->pl = $input->getOption('pl');
$this->exploit = $input->getOption('exploit');
}

private function runHelp($output)
Expand Down Expand Up @@ -333,6 +340,20 @@ protected function checkVunerabilities($nameFile, $result, $commandData, OutputI
$this->saveTxt($resultLFD, $nameFileLfd);
$this->printResult($resultLFD, $output, 'Result list of Lfd Vulnerables:');
$this->printResumeResult($output, 'Patch File of Lfd Vulnerables:', $nameFileLfd);

if($this->exploit){
$output->writeln('<info>********Extract Files of Targets********</info>');
$output->writeln('*-------------------------------------------------');
$output->writeln('');
$downloadFiles=new DownloadByLocalFileDownload($commandData);
foreach($resultLFD['lfd'] as $url){
$arrDwonloadFiles=$downloadFiles->getAllFiles($url);
}
$output->writeln('<info>Total of files etracted '.count($arrDwonloadFiles).'</info>');
$output->writeln('find results in folder /results/lfd/');
$output->writeln('');

}
}

if (in_array('isAdmin', $this->check)) {
Expand Down Expand Up @@ -363,5 +384,6 @@ protected function checkVunerabilities($nameFile, $result, $commandData, OutputI
$this->printResult($resultSite, $output, 'Result list of Local File Inclusion:');
$this->printResumeResult($output, 'Patch File of Local File Inclusion:', $nameFileLfi);
}

}
}

0 comments on commit bc2675a

Please sign in to comment.