Esempio n. 1
0
 /**
  * Initialize command
  *
  * @param InputInterface  $input
  * @param OutputInterface $output
  *
  * @return void
  */
 protected function initialize(InputInterface $input, OutputInterface $output)
 {
     $this->input = $input;
     $this->output = $output;
     $this->request = new Request();
     $this->request->setInsecure($this->input->getOption('insecure'));
     $style = new OutputFormatterStyle('white', 'blue', array('bold'));
     $this->output->getFormatter()->setStyle('header', $style);
     $this->setUrl($input->getArgument('url'));
 }
Esempio n. 2
0
 /**
  * Get an instance of the Request object
  *
  * @return \MageScan\Request
  */
 public function getRequest()
 {
     if ($this->request === null) {
         $this->setRequest(new Request());
         if (isset($_SERVER['ALLOW_INSECURE']) && $_SERVER['ALLOW_INSECURE']) {
             $this->request->setInsecure(true);
         }
     }
     return $this->request;
 }
Esempio n. 3
0
 /**
  * Run scan command
  *
  * @param InputInterface  $input
  * @param OutputInterface $output
  *
  * @return void
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $this->input = $input;
     $this->output = $output;
     $this->request = new Request();
     $this->request->setInsecure($this->input->getOption('insecure'));
     $style = new OutputFormatterStyle('white', 'blue', array('bold'));
     $this->output->getFormatter()->setStyle('header', $style);
     $this->setUrl($input->getArgument('url'));
     $this->output->writeln('Scanning <info>' . $this->url . '</info>...');
     $this->checkMagentoInfo();
     $this->checkModules($input->getOption('show-modules'));
     $this->checkCatalog();
     $this->checkPatch();
     $this->checkSitemapExists();
     $this->checkServerTech();
     $this->checkUnreachablePath();
 }