/** * Renders the view * * @return void */ public function render() { ob_start(); $this->view(); $output = ob_get_contents(); ob_end_clean(); Brawler_Console_Output::output($output); }
/** * Retrieves input * * @param $msg Query message * @param $stripEnter Strip trailing Linebreak * @return String */ public static function get($msg, $stripEnter = true) { Brawler_Console_Output::output($msg); do { $return = fgets(self::_getStream()); } while (!self::_validate($return)); if ($stripEnter) { $return = substr($return, 0, strlen($return) - 1); } return $return; }
public function indexAction() { Brawler_Console_Output::output('Index'); }
/** * Renders a single line * * @param ArrayObject $row * @return void */ protected function _renderline($row) { if (!$this->_columnwidth) { $this->_determineColumnWidth(); } $row = (array) $row; $i = 0; $print = ''; foreach ($row as $value) { $fillcount = $this->_columnwidth[$i] - strlen($value) + $this->_padding; $print .= $value . str_repeat(' ', $fillcount); $i++; } Brawler_Console_Output::output($print); }
/** * Recursive method * * @param String $url * @param Int $level * @param Int $maxlevel * @return void */ protected function _scanRecursively($url, $level, $maxlevel) { Brawler_Console_Output::output('Scanning: ' . $url); // Checking for Vulns $this->_checkVulnerabilites($url); // fetch urls $urls = $this->_client->request($url)->getUrls(); $urls = array_unique($urls); $urls = $this->_filterKnownUrls($urls); $urls = $this->_filterForeignHostUrls($urls); Brawler_Console_Output::output('Found ' . count($urls) . ' new resources.'); $this->_urls = array_merge($urls, $this->_urls); // scan newly found urls if ($level < $maxlevel) { foreach ($urls as $newUrl) { $this->_scanRecursively($newUrl, $level + 1, $maxlevel); } } }