elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Los 10 CVE más críticos (peligrosos) de 2020


  Mostrar Temas
Páginas: 1 [2] 3
11  Seguridad Informática / Hacking / Who is .edu.co en: 20 Enero 2010, 03:26 am
hola, quiero averiguar los DNS que tienes una pagina la cual es asi
www.loquesea.edu.co  como haria? porke me meto en whois y no me deja porke no tiene .edu.co los buscadores de este
agradezco mucho de sus ayuda  ;D

&

Saludos
 :silbar:
12  Programación / PHP / select case sql, enviar form en: 2 Diciembre 2009, 10:58 am
hola lo que pasa es que tengo un formulario donde tengo un select case donde extraigo los datos de la cedula y cargo desde la BD pero al momento de enviar el formulario con los datos precargados me dice error en la bd, espero que me haya dado a explicar,
aki dejo los codigos por si acaso

Vista Formulario

Código:
<?Php
$servidor = "localhost";
$usuario_bd = "root";
$password_bd = "";
$basedatos = "empresa";


$conexion = mysql_connect($servidor,$usuario_bd,$password_bd);
if (!$conexion)
{
    echo "Error conectando a la base de datos.";
    exit();
}

$resultado=mysql_select_db($basedatos,$conexion);
if (!$resultado)
{
    echo "Error seleccionando la base de datos.";
    exit();
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>Mantenimientos y Servicios</title>
<style type="text/css">
.style2 {
background-color: #3366CC;
}
</style>
</head>
<body>
<div id="layer1" style="position: absolute; width: 459px; height: 427px; z-index: 1; left: 10px; top: 15px; visibility: visible;" class="style2">
<form method="post" action="mantyserv.php" style="height: 206px">

<h1 align="center">Mantenimiento y Servicios</h1>
<table style="width: 93%; height: 147px;">
<tr>
<td style="width: 148px; height: 45px;">Código</td>
<td style="height: 45px">
<select name="sel_vend" id="sel_vend" style="width: 140px">
            <?php
             $cod_ve = array();
              $cod_vn = array();
             // $c = 0;
              $consulta= "SELECT * FROM empleados ";
                 $resultado = mysql_query($consulta) or die('La consulta fall&oacute;: ' . mysql_error());
              
              while($linea = mysql_fetch_array($resultado)){
        
              
               echo " <option value=\"".$linea[0]."\">".$linea[1]."</option>\n";

              }
              ?>
          </select>&nbsp;</td>
</tr>
<tr>
<td style="width: 148px; height: 45px;">Tipo de Mantenimiento</td>
<td style="height: 45px"><select multiple name ="tmant" style="width: 133px">
<option>Limpieza</option>
<option>Completo</option>
<option>Sistema</option>
<option>Otro</option>
</select></td>

</tr>
<tr>
<td style="width: 148px">Asignar Técnico</td>
<td>
<select name="sel_vend" id="sel_vend2" style="width: 133px; height: 18px;">
            <?php
              $cod_ve = array();
              $cod_vn = array();
             // $c = 0;
              $consulta= "SELECT * FROM empleados where cargo='Tecnico'";
                 $resultado = mysql_query($consulta) or die('La consulta fall&oacute;: ' . mysql_error());
              
              while($linea = mysql_fetch_array($resultado)){
        
              
               echo " <option value=\"".$linea[0]."\">".$linea[4]."</option>\n";

              }
              ?>
          </select>&nbsp;
</td>
</tr>
<tr>
<td style="width: 148px">Valor Asignado $</td>
<td><input name="valor" style="width: 133px" type="text" /></td>
</tr>

</table>
<p>Ingrese sus dudas o Notas</p>
<textarea name="notes" style="width: 404px; height: 69px"></textarea>
<input name="Submit1" type="submit" value="Enviar" />
<input name="Reset1" type="reset" value="Limpiar Campos" />
</form>

</div>

</body>

</html>

Procesar Form


Código:
<?php
$conexion=mysql_connect("localhost","root","") or die("ha ocurrido un error en la conexion");
mysql_select_db("empresa",$conexion) or die("no se ha podido seleccionar la base de datos");
mysql_query("insert into mantyserv(sel_vend,tmant,sel_vend2,valor,notes) values('$_REQUEST[sel_vend]','$_REQUEST[tmant]','$_REQUEST[sel_vend2]','$_REQUEST[valor]','$_REQUEST[notes]')", $conexion) or die ("error al registrar datos");
mysql_close();
echo "<h1>Registro de Datos</h1>";
printf("volver");
  printf("<a href= inicio.php>Volver al Inicio</a>");
 
?>
espero me ayudenn..xd
13  Programación / PHP / Validacion de campos. en una BD con PHP en: 27 Noviembre 2009, 21:19 pm
Espero me puedan ayudar llevo liando con esto varias horas
.. Me dice que el error esta aki
Parse error: syntax error, unexpected T_ELSE in C:\wamp\www\tallerphp\entradadedatos.php on line 165
Código:
<?php include_once("sesion_check.php"); ?>
<?php
session_start();
//datos para establecer la conexion con la base de mysql.
mysql_connect('localhost','root','')or die ('Ha fallado la conexión: '.mysql_error());
mysql_select_db('empresa')or die ('Error al seleccionar la Base de Datos: '.mysql_error());
function formRegister(){
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<script type="text/‭‬javascript" src="validar.js"></script>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" >
<title>Formulario</title>
<style type="text/css">
.style1 {
background-color: #EEF7FD;
}
.style2 {
text-align: center;
}
.style3 {
color: #FFFFFF;
background-color: #0000FF;
}
</style>
<script>
function validarEntero(valor){
      //intento convertir a entero.
     //si era un entero no le afecta, si no lo era lo intenta convertir
     valor = parseInt(valor)

      //Compruebo si es un valor numérico
      if (isNaN(valor)) {
            //entonces (no es numero) devuelvo el valor cadena vacia
            return ""
      }else{
            //En caso contrario (Si era un número) devuelvo el valor
            return valor
      }
}

function valida_envia(){
//valido el nombre
cedula = document.formu.cedula.value
cedula = validarEntero(cedula)
document.formu.cedula.value=cedula
if (cedula ==""){
alert("Introduzca su Cedula, Solo Numeros.")
document.formu.cedula.focus()
return 0;
}
if (document.formu.nombre.value.length==0){
alert("Escriba Su Nombre Porfavor")
document.formu.nombre.focus()
return 0;
}
if (document.formu.apellidos.value.length==0){
alert("Introduzca sus Apellidos")
document.formu.apellidos.focus()
return 0;
}
if (document.formu.direccion.value.length==0){
alert("Introduzca su Direccion")
document.formu.direccion.focus()
return 0;
}


//el formulario se envia
document.formu.submit();

}

</script>

</head>

<body>
<h1 class="style2" style="width: 346px"><span class="style3">Datos del Cliente</span></h1>


<div id="layer1" style="position: absolute; width: 418px; height: 293px; z-index: 1; left: 8px; top: 63px; visibility: visible;" class="style1">
<form name="formu" method="post" action="entradadedatos.php" onSubmit="return valida(this);"  style="height: 37px ">
<p>Los Campos Con asteriscos(*) no son obligatorios</p>
<table style="width: 100%; height: 275px;">


<td style="width: 132px; height: 36px;">Cedula</td>
<td style="height: 36px">

<input name="cedula" style="width: 279px" type="text" ></td>
</tr>


<td style="width: 132px; height: 36px;">Nombres</td>
<td style="height: 36px">

<input name="nombre" style="width: 279px" type="text" ></td>
</tr>

<td style="width: 132px">Apellidos</td>
<td>
<input name="apellidos" style="width: 279px" type="text" ></td>
</tr>
<td style="width: 132px">Dirección</td>
<td>
<input name="direccion" style="width: 279px" type="text" ></td>
</tr>

<td style="width: 132px">*Ciudad</td>
<td>

<input name="ciudad" style="width: 279px" type="text" ></td>
<tr>
<td style="width: 132px">*email</td>
<td>
<input name="email" style="width: 279px" type="text" ></td>
</tr>
<td style="width: 132px">*Teléfono</td>
<td>

<input name="telefono" style="width: 279px" type="text" ></td>
<br>

<tr>
<td style="width: 132px">
<input type="button" value="Enviar" onclick="valida_envia()" style="width: 115px"><td colspan="2" align="center">
<input name="Reset1" style="width: 209px" type="reset" value="restablecer" ></td>



</tr>
</table>
</form>
<?php
session_start();
// verificamos si se han enviado ya las variables necesarias.
if (isset($_POST["cedula"])) {
$cedula= $_POST["cedula"];
$email = $_POST["email"];

if($cedula==NULL|$email==NULL) {
echo "un campo está vacio.";
formRegister();
}else{
// Comprobamos si el nombre de usuario o la cuenta de correo ya existían
$checkuser = mysql_query("SELECT cedula FROM clientes WHERE cedula='$cedula'");
$username_exist = mysql_num_rows($checkuser);
$checkemail = mysql_query("SELECT email FROM clientes WHERE email='$email'");
$email_exist = mysql_num_rows($checkemail);
if ($email_exist>0|$username_exist>0) {
echo "la cedula  o la cuenta de correo estan ya en uso";
formRegister();
}else{
$query = 'INSERT INTO clientes (cedula, nombre, email, fecha)
VALUES (\''.$cedula.'\',\''.$nombre.'\',\''.$email.'\',\''.date("Y-m-d").'\')';
mysql_query($query) or die(mysql_error());
?>
<?php
}
}
}
}else{
formRegister();
}
?>

</div>
</body>
</html>
14  Programación / PHP / Problema con php Condicion de session en: 25 Noviembre 2009, 22:49 pm
hopla a todos, lo
lo que pasa es que quiero comparar q si el nombre de usuario == admin entonces que me muestre la pagina de admin, y si el nombre de usuario es == secretaria me muestre otra pagina. ahora estoy utilizando este codigo para leer el nombre de la sesion asi:
Código:
<?php
session_start();
?>

<?php
if (isset($_SESSION['k_username']='admin')) {
echo '<p><a href="index.php">Redirigir a la pagina Administrador</a></p>';
}
if (isset($_SESSION['k_username']='f')) {
echo '<p><a href="index2.php">Redirigir a la pagina Secretaria</a></p>';
}else {
echo "Error, no tienes permiso.";
echo '<p><a href="index.php">Necesita Loguearse</a></p>';
exit;
}
?>

pero me dice que el error esta en la linea 6 del codigo, y el tipo de error es
Parse error: syntax error, unexpected '=', expecting ',' or ')' in C:\wamp\www\tallerphp\validar_sesion.php on line 6

Gracias y espero prontas soluciones
15  Seguridad Informática / Nivel Web / aprendiendo XSS alguien me ayudaaa Help ... en: 23 Noviembre 2009, 08:20 am
estoy aprendiendo apenas sobre xss, y he encontrado una pagina vulnerable, entonces al hacer el atake xss me deshabilita los campos del form, mi pregunta q comando ‭‬javascript me habilita los datos de una tabla html????
gracias de antemano y saludosss
16  Programación / PHP / SOlucionado en: 12 Noviembre 2009, 22:01 pm
s
17  Programación / PHP / Solucionado error en version php del wamp en: 12 Noviembre 2009, 10:34 am
hola y saludos... ;D
bueno amigos, estoy mamado llevo 1 dia sin poder estudiar ya que mi servidor php no funciona siendo que cuando ejecuto un proyecto ejemplo : login al validar usuario me sale un mensaje del browser que la conexion ha sido reiniciada.. no se pork??
viendo los logs de errores del wampserver 2.0 me salio esto
Código:
on line 31, referer: http://localhost/prueba/registrar.php
[Wed Nov 11 16:24:25 2009] [notice] Parent: child process exited with status 3221225477 -- Restarting.
[Wed Nov 11 16:24:26 2009] [notice] Apache/2.2.11 (Win32) PHP/5.3.0 configured -- resuming normal operations
[Wed Nov 11 16:24:26 2009] [notice] Server built: Dec 10 2008 00:10:06
[Wed Nov 11 16:24:26 2009] [notice] Parent: Created child process 3372
[Wed Nov 11 16:24:26 2009] [notice] Child 3372: Child process is running
[Wed Nov 11 16:24:26 2009] [notice] Child 3372: Acquired the start mutex.
[Wed Nov 11 16:24:26 2009] [notice] Child 3372: Starting 64 worker threads.
[Wed Nov 11 16:24:26 2009] [notice] Child 3372: Starting thread to listen on port 80.
[Wed Nov 11 16:27:40 2009] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Wed Nov 11 16:27:40 2009] [notice] Child 3372: Exit event signaled. Child process is ending.
[Wed Nov 11 16:27:41 2009] [notice] Child 3372: Released the start mutex
[Wed Nov 11 16:27:42 2009] [notice] Child 3372: All worker threads have exited.
[Wed Nov 11 16:27:42 2009] [notice] Child 3372: Child process is exiting
[Wed Nov 11 16:27:43 2009] [notice] Parent: Child process exited successfully.
[Wed Nov 11 16:27:54 2009] [notice] Apache/2.2.11 (Win32) PHP/5.3.0 configured -- resuming normal operations
[Wed Nov 11 16:27:54 2009] [notice] Server built: Dec 10 2008 00:10:06
[Wed Nov 11 16:27:54 2009] [notice] Parent: Created child process 3172
[Wed Nov 11 16:27:55 2009] [notice] Child 3172: Child process is running
[Wed Nov 11 16:27:55 2009] [notice] Child 3172: Acquired the start mutex.
[Wed Nov 11 16:27:55 2009] [notice] Child 3172: Starting 64 worker threads.
[Wed Nov 11 16:27:55 2009] [notice] Child 3172: Starting thread to listen on port 80.
[Wed Nov 11 16:28:03 2009] [error] [client 127.0.0.1] PHP Notice:  Undefined variable: usuario in C:\\wamp\\www\\tallerphp\\validar_usuario.php on line 20, referer: http://localhost/tallerphp/login.php
[Wed Nov 11 16:28:09 2009] [notice] Parent: child process exited with status 3221225477 -- Restarting.
[Wed Nov 11 16:28:09 2009] [notice] Apache/2.2.11 (Win32) PHP/5.3.0 configured -- resuming normal operations
[Wed Nov 11 16:28:09 2009] [notice] Server built: Dec 10 2008 00:10:06
[Wed Nov 11 16:28:09 2009] [notice] Parent: Created child process 3564
[Wed Nov 11 16:28:09 2009] [notice] Child 3564: Child process is running
[Wed Nov 11 16:28:09 2009] [notice] Child 3564: Acquired the start mutex.
[Wed Nov 11 16:28:09 2009] [notice] Child 3564: Starting 64 worker threads.
[Wed Nov 11 16:28:09 2009] [notice] Child 3564: Starting thread to listen on port 80.
[Wed Nov 11 16:28:34 2009] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Wed Nov 11 16:28:34 2009] [notice] Child 3564: Exit event signaled. Child process is ending.
[Wed Nov 11 16:28:35 2009] [notice] Child 3564: Released the start mutex
[Wed Nov 11 16:28:36 2009] [notice] Child 3564: All worker threads have exited.
[Wed Nov 11 16:28:36 2009] [notice] Child 3564: Child process is exiting
[Wed Nov 11 16:28:36 2009] [notice] Parent: Child process exited successfully.
[Wed Nov 11 16:28:37 2009] [notice] Apache/2.2.11 (Win32) PHP/5.3.0 configured -- resuming normal operations
[Wed Nov 11 16:28:37 2009] [notice] Server built: Dec 10 2008 00:10:06
[Wed Nov 11 16:28:37 2009] [notice] Parent: Created child process 2340
[Wed Nov 11 16:28:37 2009] [notice] Child 2340: Child process is running
[Wed Nov 11 16:28:37 2009] [notice] Child 2340: Acquired the start mutex.
[Wed Nov 11 16:28:37 2009] [notice] Child 2340: Starting 64 worker threads.
[Wed Nov 11 16:28:37 2009] [notice] Child 2340: Starting thread to listen on port 80.
[Wed Nov 11 16:30:03 2009] [error] [client 127.0.0.1] PHP Notice:  Undefined variable: usuario in C:\\wamp\\www\\tallerphp\\validar_usuario.php on line 20, referer: http://localhost/tallerphp/login.php
[Wed Nov 11 16:30:04 2009] [notice] Parent: child process exited with status 3221225477 -- Restarting.
[Wed Nov 11 16:30:04 2009] [notice] Apache/2.2.11 (Win32) PHP/5.3.0 configured -- resuming normal operations
[Wed Nov 11 16:30:04 2009] [notice] Server built: Dec 10 2008 00:10:06
[Wed Nov 11 16:30:04 2009] [notice] Parent: Created child process 1292
[Wed Nov 11 16:30:04 2009] [notice] Child 1292: Child process is running
[Wed Nov 11 16:30:04 2009] [notice] Child 1292: Acquired the start mutex.
[Wed Nov 11 16:30:04 2009] [notice] Child 1292: Starting 64 worker threads.
[Wed Nov 11 16:30:04 2009] [notice] Child 1292: Starting thread to listen on port 80.
18  Programación / PHP / Consulta php en: 5 Noviembre 2009, 05:16 am
buenas resulta ketengo un pequeño problemilla, estoy realizando en php una aplicacion que consulte por id_cliente en una base de datos el parametro en un input en otro html aparte  ::)
, aki ta el cod
Código:
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>consultar</title>
</head>

<body>

<h1>Consultar por Código del Cliente</h1>
<br>
<form action="view.php" method="post">
Ingrese ID:<input type="text" name="consult" id="consult"/> <br />
<input type="submit" name="boton" id="boton" value="Buscar" />&nbsp;
</form>
<br />
<br>
<br>


</body>

</html>
Código:
<?php 
$consult=$_GET['consult'];
$link = mysql_connect("localhost", "root","") or die ("ha ocurrido un error en la conexion");
mysql_select_db("empresa", $link) or die ("no se ha podido seleccionar la base de datos");
$result = mysql_query("SELECT * FROM clientes WHERE id_cliente=$consult", $link)or die("Error en la consulta SQL");
if (mysql_num_rows($result)){
  echo "<table border = '1'> \n";
  echo "<tr><td>Codigo</td><td>Nombres</td><td>Apellidos</td><td>Direccion</td><td>Ciudad</td><td>Email</td><td>Telefono</td></tr> \n";
  while ($row = @mysql_fetch_array($result)) {
    echo "<tr><td>".$row["id_cliente"].
      "</td><td>".$row["nombres"]."</td>
<td>".$row["apellidos"]."</td>
<td>".$row["direccion"]."</td>
<td>".$row["ciudad"]."</td>
<td>".$row["email"]."</td>
<td>".$row["telefono"]."</td></tr> \n";

  }
  echo "</table> \n";
}
else
  echo "No Se ha encontrado ningun registro";
printf("<a href= busquedad.php>volver</a>");  
?>
</body>
</html>
Pero al momento de enviar la consultar por un input no me muestra la consulta..
pues solo me muestra el mensaje de error (die)
que hago mal??
gracias y saludos ;D
19  Media / Multimedia / Separar Voz y otra pregunta aki mismo? en: 10 Junio 2008, 06:48 am
hola saludos,
¿Me podrian explciar si se puede separar la voz de una cancion, ?

¿ con que programa?

saludos :D :D

Como podria que con mi voz, con algun programa o filtro del programa que sea o el indicado, para cambiar mi voz y ponerla como una voz seductora o relajadora?

Saludos   ;D ;D  :huh: :huh:
20  Programación / Java / Hola ayudenme para un metodo. en: 21 Mayo 2008, 16:05 pm
hola si tengo un metodo que es para calcular el 30 % de ese valor o restar ese valor(cod) con cualquier otra variable como hacer?? que se me olvido, es muy facil pero ayudenme que toy muy ocupadito... gracias y saludos y suerte a todos.
valro a pagar : :::    cod1==500.000
String cod=Leer.cadena("digite valor a cancelar");
if(cod%cod2)  ejejejj  :¬¬

Páginas: 1 [2] 3
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines