Ejemplo n.º 1
0
        $statusCaracteresEspeciais = false;
    }
    $objRandom = new Random();
    $senha = $objRandom->gerandoSenha($tamanho, $statusLetrasMinusculas, $statusLetrasMaiusculas, $statusNumeros, $statusCaracteresEspeciais);
    $objScan = new Scan();
    $result = $objScan->scanpassword($senha);
    $objMountPeriod = new Period();
    $period = $objMountPeriod->mountPeriod($result['product']);
    $objDao = new Dao();
    $objDao->executeQuery('INSERT INTO tbl_counting (forca_senha, auxiliado) VALUES (' . $period['level'] . ', 0)');
    require 'view/viewResult.php';
} else {
    if (isset($_POST['powerkey'])) {
        $tamanho = 20;
        $statusNumeros = $statusLetrasMinusculas = $statusLetrasMaiusculas = $statusCaracteresEspeciais = true;
        $objRandom = new Random();
        $senha = $objRandom->gerandoSenha($tamanho, $statusLetrasMinusculas, $statusLetrasMaiusculas, $statusNumeros, $statusCaracteresEspeciais);
        $objScan = new Scan();
        $result = $objScan->scanpassword($senha);
        $objMountPeriod = new Period();
        $period = $objMountPeriod->mountPeriod($result['product']);
        $objDao = new Dao();
        $objDao->executeQuery('INSERT INTO tbl_counting (forca_senha, auxiliado) VALUES (' . $period['level'] . ', 1)');
        require 'view/viewResult.php';
    } else {
        $objDao = new Dao();
        $retornoconsulta = $objDao->executeConsult('SELECT count(*) FROM tbl_counting');
        $total = mysqli_fetch_array($retornoconsulta);
        require 'view/viewIndex.php';
    }
}