1
(POO) Programación Orientada a Objetos / Comienzos Zend Framework
« en: 22 de Enero de 2011, 02:04:17 am »
Hola, estoy empezando con Zend Framework, hay alguien que sepa algo sobre el tema?
Esta sección te permite ver todos los posts escritos por este usuario. Ten en cuenta que sólo puedes ver los posts escritos en zonas a las que tienes acceso en este momento.
hr.clear {
background: none;
border: 0;
clear: both;
display: block;
float: none;
font-size: 0;
margin: 0;
padding: 0;
overflow: hidden;
visibility: hidden;
width: 0;
height: 0;
}La imagen de mi plantilla es esta: width: 402px;
height: 252px;
float: left; width: 478px;
height: 250px;
float: left; width: 96%;
height: 273px; background: #0099DD; /* old browsers */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#0099DD', endColorstr='#006BB3',GradientType=0 ); /* ie */
background: -webkit-gradient(linear, left top, left bottom, color-stop(78%,#0099DD), color-stop(78%,#1E5799), color-stop(78%,#006BB3)); /* webkit */
background: -moz-linear-gradient(top, #0099DD 78%, #1E5799 78%, #006BB3 78%); /* firefox */} -moz-box-shadow:0px 0px 10px #333333; /* firefox 3.6 */
box-shadow: 0px 0px 10px #333333; /* opera, firefox 4.0 */ Affected Apache versions:
Apache 1.3.28 - 1.3.36 with mod_rewrite
Apache 2.2.0 - 2.2.2 with mod_rewrite
Apache 2.0.46 - 2.0.58 with mod_rewriteAttack details
The POST variable clave has been set to 1'.
Request
POST /login.php HTTP/1.0
Accept: */*
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322)
Content-Length: 60
Cookie: PHPSESSID=acf77cc7343bf0aca771467dbc40c611
Connection: Close
Pragma: no-cache
usuario=111-222-1933email@address.tst&clave=1'&Submit=Entrar
Attack details
The POST variable clave has been set to 1<script>alert(408519685207)</script>.
Request
POST /login.php HTTP/1.0
Accept: */*
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322)
Content-Length: 95
Cookie: PHPSESSID=acf77cc7343bf0aca771467dbc40c611
Connection: Close
Pragma: no-cache
usuario=111-222-1933email@address.tst&clave=1<script>alert(408519685207)</script>&Submit=Entrar
Attack details
The POST variable clave is vulnerable.
Request
POST /login.php HTTP/1.0
Accept: */*
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322)
Content-Length: 103
Cookie: PHPSESSID=acf77cc7343bf0aca771467dbc40c611
Connection: Close
Pragma: no-cache
usuario=111-222-1933email@address.tst&clave=111-222-1933email@address.tst'+or+sleep(5)%23&Submit=Entrar<body class="imagenesquina">
...
</body>.imagenesquina{
background-image: url(imagan.png);
background-repeat: no-repeat;
background-attachment: fixed;
background-position: bottom left;
}.imagenesquina:hover{
background-image: url(imagan.png);
background-repeat: no-repeat;
background-attachment: fixed;
background-position: bottom left;
}Pero ocurre lo deseado pero siempre que pongo el raton dentro de la web, no se bien como hacer esto. No sé si me he explicado bien!
<?php
class classMySQL {
private $conexion;
private $bd;
public function Conectar() {
$this->conexion = mysql_connect("localhost", "root", "123456");
mysql_select_db("sistemaphp", $this->conexion) or die(mysql_error());
}
public function Desconectar() {
mysql_close($this->conexion);
}
public function Consulta($query) {
echo "Datos conexion en Consulta: ".$this->conexion."<br>";
$resultado = mysql_query($query, $this->conexion);
if (!$resultado) {
echo "Error en la base de datos: ".mysql_error();
exit;
}
return $resultado;
}
}
?><?php
if (file_exists("mysql.class.php")) {
require("mysql.class.php");
class classLogin extends classMySQL {
private $user;
private $pass;
public function Login($user, $pass) {
$query = "SELECT admin, pass FROM info_admins WHERE admin = '$user' and pass = '$pass'";
$r = $this->Consulta($query);
$nfilas = mysql_num_rows($r);
if ($nfilas > 0) {
echo "Login OK";
}
else {
echo "Login FAIL";
}
}
}
}
?><form id="form" name="form" method="post" action="login.php">
<input type="text" name="user" id="user" />
<input type="text" name="pass" id="pass" />
<input type="submit" name="send" id="send" value="Enviar" />
</form>
<?php
$user = $_POST['user'];
$pass = $_POST['pass'];
$send = $_POST['send'];
if (isset($user) && isset($pass)) {
if (file_exists("login.class.php")) {
require("login.class.php");
$lg = new classLogin();
$lg->Conectar();
$lg->Login($user, $pass);
$lg->Desconectar();
}
}
?>