Menú

Mostrar Mensajes

Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.

Mostrar Mensajes Menú

Temas - Satyricon

#1
Hola, que tal comunidad. Recién me tope con un error al activar un Sistema Operativo Windows 7 64 Bits SP1, que no levantaba el servicio "Temas" o "Themes" desde services.msc




Para solucionar el problema, ejecutar lo siguiente en una ventana del símbolo del sistema con privilegios de administrador (Inicio, escribir CMD y Ctrl+Mayús+Intro o clic derecho y Ejecutar como administrador):

sc qc themes
Así vemos si la configuración de dependencias está vacía, como debería ser, o contiene algún elemento sospechoso (iThemes5 en esta ocasión).

sc config themes depend= ""
De este modo se elimina la entrada de dependencias del servicio Temas. El signo igual (=) debe estar pegado a la palabra depend y llevar un espacio detrás para separarlo de las comillas.

sc start themes o bien net start themes
Arrancamos el servicio sin tener que reiniciar Windows.

Saludos.
#2
Hola gente del foro. Hoy me tope con un problema al querer instalar Windows 7 en una Notebook HP con Windows 8. Resulta que es un problema bastante buscado, y aqui les dejo la solucion:

1º Reiniciar ordenador y pulsar F10.

2º Ir a system configuration y con la tecla intro seleccionar el idioma Español.

3º Si aparece la opción Modo Seguro activada, hay que desactivarla.

4º Dentro de Configuración del sistema, en opciones de arranque , activar Compatibilidad heredada.
Confirmar que si estamos seguros de realizar el cambio.

5º Salir de BIOS guardando cambios.

6º A continuación aparece una pantalla con el código de acceso.

  No Aparece ningún cuadro para escribirlo, simplemente hay que escribir el código que nos aparezca y pulsar intro. (El código suele ser de cuatro dígitos)

7º Después de pulsar intro, el equipo se reinicia y pulsaremos de nuevo la tecla F10, para acceder a BIOS.

8º Dentro de la BIOS, iremos hasta configuración del sistema, si hemos realizado todo correctamente en la parte de abajo ya aparecen visibles las opciones de Arranque Heredadas.

9º En esta opción seleccionamos el orden de arranque que deseamos y salimos de BIOS guardando cambios.

10º En el arranque pulsamos F9 y ya podemos seleccionar el orden de arranque.


Fuente: Julio_R

Espero que les sirva. Saludos.
#3
Hardware y Reparaciones / Crystal Disk Info - Download
Noviembre 18, 2014, 04:14:06 PM

Una de las aplicaciones que no te puede faltar en tu Pendrive a la hora de reparar o hacer el mantenimiento de una computadora.




Esta aplicación nos entregará información tal como el estado del S.M.A.R.T., la temperatura de los discos, el número de serie, fabricante, cantidad de horas que lleva encendido, listado de errores, etc . Además, podemos configurar a Crystal Disk Info para que nos alerte cuando cualquiera de los discos duros se caliente de forma excesiva.

La pueden descargar gratis de su pagina oficial, tanto en EXE como su version Portable.

No tienes permitido ver los links. Registrarse o Entrar a mi cuenta
#4
Buen dia para todos. Les comento, tengo que leer el codigo fuente de un sitio web, de lo recuperado, solo sacar y mostrar ciertas partes en otro dominio. Que funciones recomiendan o la forma mas facil para hacerlo.

Muchas gracias por su tiempo.
#5
Buenas comunidad, como anda todo? Espero que muy bien.
Les paso a comentar mi problema.

Estoy armando un pequeño sistema a base de lo poco que se, y me tope con un drama que no puedo lograr descifrar.

Les dejo el codigo del PHP

Código: php
<?
error_reporting(0);
?>
<html>
<HEAD><TITLE>Compra y Venta - Ingreso de Clientes</TITLE></HEAD>
<BODY bgcolor="ffffff">
<center><img src="img/logo.png"></center>
<hr>
<center><table id="Tabla_01"  border="0" cellpadding="0" cellspacing="0">

<tr>
<td>
<a href="inicio.php"><img src="img/psd-navigation-menu_25a.jpg" width="87" height="49" alt=""></a></td>
<td>
<a href="altas_compras.php"><img src="img/psd-navigation-menu_26.jpg" width="160" height="49" alt=""></a></td>
<td>
<a href="altas_ventas.php"><img src="img/psd-navigation-menu_27a.jpg" width="168" height="49" alt=""></a></td>
<td>
<a href="listar_compras.php"><img src="img/psd-navigation-menu_28.jpg" width="147" height="49" alt=""></a></td>
<td>
<a href="listar_ventas.php"><img src="img/psd-navigation-menu_29.jpg" width="129" height="49" alt=""></a></td>
<td>
<a href="logout.php"><img src="img/psd-navigation-menu_30.jpg" width="78" height="49" alt=""></a></td>

<td>
<img src="img/espacio.gif" width="1" height="49" alt=""></td>
</tr>

</table></center><center>
<h2>Alta de Clientes</h2><img src="img/cliente.jpg"> </center><hr>

<?

if(isset($_POST[guardar]))
{
include("conexion.php");

//nombrecli, apellidocli, direccioncli, dnicli, fechanacli, estadocli, telefonocli, nombreconycli, direccionconycli, fechanaconycli, telefonoconycli, ocupacioncli, empresacli, telefonoempresacli, fechaingcli, direccionempcli, nombreempcli, fecha

  $nombrecli=$_POST["nombrecli"];
  $apellidocli=$_POST["apellidocli"];
  $direccioncli=$_POST["direccioncli"]; 
  $dnicli=$_POST["dnicli"]; 
  $fechanacli=$_POST["fechanacli"];
  $estadocli=$_POST["estadocli"];
  $telefonocli=$_POST["telefonocli"]; 
  $nombreconycli=$_POST["nombreconycli"];
  $apellidoconycli=$_POST["apellidoconycli"];         
  $direccionconycli=$_POST["direccionconycli"];
  $dniconycli=$_POST["dniconycli"];
  $fechanaconycli=$_POST["fechanaconycli"];
  $telefonoconycli=$_POST["telefonoconycli"];
  $ocupacioncli=$_POST["ocupacioncli"];
  $empresacli=$_POST["empresacli"];
  $telefonoempresacli=$_POST["telefonoempresacli"];
  $fechaingcli=$_POST["fechaingcli"];
  $direccionempcli=$_POST["direccionempcli"];
  $nombreempcli=$_POST["nombreempcli"];
  $fecha=date('j/n/Y');


if($nombrecli=="") {
echo "Ingresa un nombre<br>"; }
else
  {
$sql= "INSERT INTO cliente (id , nombrecli, apellidocli, direccioncli, dnicli, fechanacli, estadocli, telefonocli, nombreconycli, apellidoconycli, direccionconycli, dniconycli, fechanaconycli, telefonoconycli, ocupacioncli, empresacli, telefonoempresacli, fechaingcli, direccionempcli, nombreempcli, fecha) VALUES ('', '$nombrecli', '$apellidocli', '$direccioncli', '$dnicli', '$fechanacli', '$estadocli', '$telefonocli', '$nombreconycli', '$apellidoconycli', '$direccionconycli', '$dniconycli', '$fechanaconycli', '$telefonoconycli', '$ocupacioncli', '$empresacli', '$telefonoempresacli', '$fechaingcli', '$direccionempcli', '$nombreempcli', '$fecha')"; 
}
if(!mysql_query($sql)){

echo "No se pudieron ingresar los datos al Sistema.";}
else{
echo "Los datos se ingresaron correctamente.<br>" . $fecha;
  }


?>
<br><br>
<a href="altas_clientes.php"><img src="img/psd-navigation-menu_250.jpg" ></a></center>


<CENTER>
<table border="0" cellspacing=0 cellpadding=2 bordercolor="000066" WIDTH="800">
<form name="clientes" action="altas_clientes.php" method="POST">
<tr>
<td>
<table  WIDTH="480">
<B>CLIENTE</B>
<tr>
<td>Nombre:</td>
<td><input type="text" name="nombrecli" size="45" /></td>
</tr>
<tr>
<td>Apellido:</td>
<td><input type="text" name="apellidocli" size="45" /></td>
</tr>
<tr>
<td>Dirección:</td>
<td><input type="text" name="direccioncli" size="45" /></td>
</tr>
<tr>
<td>DNI:</td>
<td><input type="text" name="dnicli" size="45" /></td>
</tr>
<tr>
<td>Fecha de Nacimiento:</td>
<td><input type="text" value="EJEMPLO: 01/01/2012" name="fechanacli" size="45" /></td>
</tr>
<tr>
<td>Estado Civil:</td>
<td><input type="text" name="estadocli" size="45" /></td>
</tr>
<tr>
<td>Teléfono:</td>
<td><input type="text" name="telefonocli" size="45" /></td>
</tr>
</table>
</td>

<td>
<table  WIDTH="480">

<tr>
<td>Nombre Conyugue:</td>
<td><input type="text" name="nombreconycli" size="45" /></td>
</tr>
<tr>
<td>Apellido Conyugue:</td>
<td><input type="text" name="apellidoconycli" size="45" /></td>
</tr>
<tr>
<td>Dirección Conyugue:</td>
<td><input type="text" name="direccionconycli" size="45" /></td>
</tr>
<tr>
<td>DNI Conyugue:</td>
<td><input type="text" name="dniconycli" size="45" /></td>
</tr>
<tr>
<td>Fecha Nacimiento Conyugue:</td>
<td><input type="text" value="EJEMPLO: 01/01/2012" name="fechanaconycli" size="45" /></td>
</tr>
<tr>
<td>Teléfono Conyugue:</td>
<td><input type="text" name="telefonoconycli" size="45" /></td>
</tr>
</table>
</td>
</tr>

<tr >
<td colspan="2">

<table  WIDTH="480">
<br>
<B>DATOS LABORALES</B>
<tr >
<td>Ocupación:</td>
<td><input type="text" name="ocupacioncli" size="50" /></td>
</tr>
<tr>
<td>Empresa:</td>
<td><input type="text" name="empresacli" size="50" /></td>
</tr>
<tr>
<td>Teléfono Empresa</td>
<td><input type="text" name="telefonoempresacli" size="50" /></td>
</tr>
<tr>
<td>Fecha de Ingreso:</td>
<td><input type="text" value="EJEMPLO: 01/01/2012" name="fechaingcli" size="50" /></td>
</tr>
<tr>
<td>Dirección de la Empresa:</td>
<td><input type="text" name="direccionempcli" size="50" /></td>
</tr>
<tr>
<td>Nombre de Empleador:</td>
<td><input type="text" name="nombreempcli" size="50" /></td>
</tr>

</table>

</td>
</tr>
<tr>
<TD colspan="2"><table width="380">
<input type="submit" value="Guardar" name="guardar" />
<input type="reset" value="Borrar"/></table>
</td>
</tr>
<tr>
</form>
</table>
</CENTER>

<?
}
?>


</body>
</html>


Y el codigo para la base de datos.

Código: php

--
-- Estructura de tabla para la tabla `cliente`
--

CREATE TABLE IF NOT EXISTS `cliente` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `nombrecli` varchar(50) NOT NULL,
  `apellidocli` varchar(50) NOT NULL,
  `direccioncli` varchar(50) NOT NULL,
  `dnicli` varchar(50) NOT NULL,
  `fechanacli` varchar(50) NOT NULL,
  `estadocli` varchar(50) NOT NULL,
  `telefonocli` varchar(50) NOT NULL,
  `nombreconycli` varchar(50) NOT NULL,
  `apellidoconycli` varchar(50) NOT NULL,
  `direccionconycli` varchar(50) NOT NULL,
  `dniconycli` varchar(50) NOT NULL,
  `fechanaconycli` varchar(50) NOT NULL,
  `telefonoconycli` varchar(50) NOT NULL,
  `ocupacioncli` varchar(50) NOT NULL,
  `empresacli` varchar(50) NOT NULL,
  `telefonoempresacli` varchar(50) NOT NULL,
  `fechaingcli` varchar(50) NOT NULL,
  `direccionempcli` varchar(50) NOT NULL,
  `nombreempcli` varchar(50) NOT NULL,
  `fecha` varchar(50) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `no_control` (`telefonocli`),
  KEY `id` (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=78 ;


Bueno, este es el drama, el insert funciona, eso queda claro, pero que pasa, no puedo hacer otro insert luego del primero. Hay un detalle, si me paso a otro navegador, este si hace un nuevo insert, pero despues no deja hacer un proximo. La verdad no se porque sera, es por eso que vine por ayuda.

Si alguien me puede decir o se le ocurre que sea, le estaria muy agradecido.
#6

Quizas a alguien le pase que tenga que quitar la contraseña de un Windows 7 de cierto usuario, bueno iba a escribir los pasos, pero en este video se explica bastante bien y detallado. Hay que tener en cuenta que para realizar el paso deben de contar con la misma version que ya esta instalado.

#7
Alguien seria tan amable de dejar un par de Patch Finder Online.
Gracias de antemano.
#8
Hola comunidad.

Creo este post ya que tras horas de no poder encontrar el error, me decidí a consultar con la gente que por ahí alguna vez tuvo un problema similar.

Estoy desarrollando una aplicación en actionscrip2 que trabaja ademas con php. La idea de la misma es que compruebe si un enlace esta funcionando o no, ejemplo: No tienes permitido ver los links. Registrarse o Entrar a mi cuenta si funciona, No tienes permitido ver los links. Registrarse o Entrar a mi cuenta No funciona.

El punto, tengo el código que funciona bien, me envía el campo nombre al php y lo procesa, luego necesito que me envíe una respuesta nuevamente al actionscript, lo hace, pero siempre me da como resultado negativo.

Para ser mas precisos, el code actionscript:


Código: php
enviar = function () { 
if (nombre_txt.length) {

form_lv = new LoadVars();
form_lv.nombre = nombre_txt.text;

form_lv.sendAndLoad("miphp.php", form_lv, "POST");
texto_txt.text = "Enviando Mensaje..";
nombre_txt.text = "";

form_lv.onLoad = function() {

if (this.estatus == "si") {
texto_txt.text = "On";
nombre_txt.text = "";

} else {
texto_txt.text = "Off";
}
}
};
}

enviar_btn.onRelease = enviar;




Y el code PHP:


Código: php
<? 
if ($_POST["nombre"])
{
$sitio = @fopen($_POST['nombre'],"r");

if ($sitio){
echo '&estatus=si&';
}else{
echo '&estatus=no&';
}
}
?>




El code php funciona perfecto (Nota: Probé en algunos servidores y en localhost y no funcionan, pero en otros si) es por eso que les dejo un html con php para que vean que si funciona:



Código: php
<html> 
<head>
<title>Verificar existencia de URL</title>
<meta name="author" content="WebExperto.com">
</head>
<body>
<form action="<?=$_PHP_SELF;?>" method="post">
<input type="text" name="nombre" value="http://">
<input type="submit" value="Verificar">
</form>
<?
if ($_POST["nombre"])
{
$sitio = @fopen($_POST['nombre'],"r");



if ($sitio){
echo 'Si Funciona';
}else{

echo 'No Funciona';
}
}
?>

</body>
</html>




Mi pregunta, sera que el code php se demora en procesar? El actionscript lo carga perfectamente, pero siempre como negativo, sabiendo que el code php si funciona...

Habrá alguna forma de modificar ese code actionscript para que hacer que demore unos segundos en cargar el php, cosa que me daría el valor verdadero...

Muchas gracias por su tiempo...
#9
C / C++ / Original PING [Code]
Febrero 04, 2011, 10:14:58 AM
Ping fue creado por Mike Muuss del Laboratorio de Investigación del Ejército en diciembre de 1983 en alrededor de un día en respuesta a las dificultades que encontró en la red.

Código: c
/*
* P I N G . C
*
* Using the InterNet Control Message Protocol (ICMP) "ECHO" facility,
* measure round-trip-delays and packet loss across network paths.
*
* Author -
* Mike Muuss
* U. S. Army Ballistic Research Laboratory
* December, 1983
* Modified at Uc Berkeley
*
* Changed argument to inet_ntoa() to be struct in_addr instead of u_long
* DFM BRL 1992
*
* Status -
* Public Domain.  Distribution Unlimited.
*
* Bugs -
* More statistics could always be gathered.
* This program has to run SUID to ROOT to access the ICMP socket.
*/

#include <stdio.h>
#include <errno.h>
#include <sys/time.h>

#include <sys/param.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/file.h>

#include <netinet/in_systm.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#include <netinet/ip_icmp.h>
#include <netdb.h>

#define MAXWAIT 10 /* max time to wait for response, sec. */
#define MAXPACKET 4096 /* max packet size */
#define VERBOSE 1 /* verbose flag */
#define QUIET 2 /* quiet flag */
#define FLOOD 4 /* floodping flag */
#ifndef MAXHOSTNAMELEN
#define MAXHOSTNAMELEN 64
#endif

u_char packet[MAXPACKET];
int i, pingflags, options;
extern int errno;

int s; /* Socket file descriptor */
struct hostent *hp; /* Pointer to host info */
struct timezone tz; /* leftover */

struct sockaddr whereto;/* Who to ping */
int datalen; /* How much data */

char usage[] =
"Usage:  ping [-dfqrv] host [packetsize [count [preload]]]n";

char *hostname;
char hnamebuf[MAXHOSTNAMELEN];

int npackets;
int preload = 0; /* number of packets to "preload" */
int ntransmitted = 0; /* sequence # for outbound packets = #sent */
int ident;

int nreceived = 0; /* # of packets we got back */
int timing = 0;
int tmin = 999999999;
int tmax = 0;
int tsum = 0; /* sum of all times, for doing average */
int finish(), catcher();
char *inet_ntoa();

/*
* M A I N
*/
main(argc, argv)
char *argv[];
{
struct sockaddr_in from;
char **av = argv;
struct sockaddr_in *to = (struct sockaddr_in *) &whereto;
int on = 1;
struct protoent *proto;

argc--, av++;
while (argc > 0 && *av[0] == '-') {
while (*++av[0]) switch (*av[0]) {
case 'd':
options |= SO_DEBUG;
break;
case 'r':
options |= SO_DONTROUTE;
break;
case 'v':
pingflags |= VERBOSE;
break;
case 'q':
pingflags |= QUIET;
break;
case 'f':
pingflags |= FLOOD;
break;
}
argc--, av++;
}
if(argc < 1 || argc > 4)  {
printf(usage);
exit(1);
}

bzero((char *)&whereto, sizeof(struct sockaddr) );
to->sin_family = AF_INET;
to->sin_addr.s_addr = inet_addr(av[0]);
if(to->sin_addr.s_addr != (unsigned)-1) {
strcpy(hnamebuf, av[0]);
hostname = hnamebuf;
} else {
hp = gethostbyname(av[0]);
if (hp) {
to->sin_family = hp->h_addrtype;
bcopy(hp->h_addr, (caddr_t)&to->sin_addr, hp->h_length);
hostname = hp->h_name;
} else {
printf("%s: unknown host %sn", argv[0], av[0]);
exit(1);
}
}

if( argc >= 2 )
datalen = atoi( av[1] );
else
datalen = 64-8;
if (datalen > MAXPACKET) {
fprintf(stderr, "ping: packet size too largen");
exit(1);
}
if (datalen >= sizeof(struct timeval)) /* can we time 'em? */
timing = 1;

if (argc >= 3)
npackets = atoi(av[2]);

if (argc == 4)
preload = atoi(av[3]);

ident = getpid() & 0xFFFF;

if ((proto = getprotobyname("icmp")) == NULL) {
fprintf(stderr, "icmp: unknown protocoln");
exit(10);
}

if ((s = socket(AF_INET, SOCK_RAW, proto->p_proto)) < 0) {
perror("ping: socket");
exit(5);
}
if (options & SO_DEBUG) {
if(pingflags & VERBOSE)
printf("...debug on.n");
setsockopt(s, SOL_SOCKET, SO_DEBUG, &on, sizeof(on));
}
if (options & SO_DONTROUTE) {
if(pingflags & VERBOSE)
printf("...no routing.n");
setsockopt(s, SOL_SOCKET, SO_DONTROUTE, &on, sizeof(on));
}

if(to->sin_family == AF_INET) {
printf("PING %s (%s): %d data bytesn", hostname,
  inet_ntoa(to->sin_addr), datalen); /* DFM */
} else {
printf("PING %s: %d data bytesn", hostname, datalen );
}
setlinebuf( stdout );

signal( SIGINT, finish );
signal(SIGALRM, catcher);

/* fire off them quickies */
for(i=0; i < preload; i++)
pinger();

if(!(pingflags & FLOOD))
catcher(); /* start things going */

for (;;) {
int len = sizeof (packet);
int fromlen = sizeof (from);
int cc;
struct timeval timeout;
int fdmask = 1 << s;

timeout.tv_sec = 0;
timeout.tv_usec = 10000;

if(pingflags & FLOOD) {
pinger();
if( select(32, &fdmask, 0, 0, &timeout) == 0)
continue;
}
if ( (cc=recvfrom(s, packet, len, 0, &from, &fromlen)) < 0) {
if( errno == EINTR )
continue;
perror("ping: recvfrom");
continue;
}
pr_pack( packet, cc, &from );
if (npackets && nreceived >= npackets)
finish();
}
/*NOTREACHED*/
}

/*
* C A T C H E R
*
* This routine causes another PING to be transmitted, and then
* schedules another SIGALRM for 1 second from now.
*
* Bug -
* Our sense of time will slowly skew (ie, packets will not be launched
* exactly at 1-second intervals).  This does not affect the quality
* of the delay and loss statistics.
*/
catcher()
{
int waittime;

pinger();
if (npackets == 0 || ntransmitted < npackets)
alarm(1);
else {
if (nreceived) {
waittime = 2 * tmax / 1000;
if (waittime == 0)
waittime = 1;
} else
waittime = MAXWAIT;
signal(SIGALRM, finish);
alarm(waittime);
}
}

/*
* P I N G E R
*
* Compose and transmit an ICMP ECHO REQUEST packet.  The IP packet
* will be added on by the kernel.  The ID field is our UNIX process ID,
* and the sequence number is an ascending integer.  The first 8 bytes
* of the data portion are used to hold a UNIX "timeval" struct in VAX
* byte-order, to compute the round-trip time.
*/
pinger()
{
static u_char outpack[MAXPACKET];
register struct icmp *icp = (struct icmp *) outpack;
int i, cc;
register struct timeval *tp = (struct timeval *) &outpack[8];
register u_char *datap = &outpack[8+sizeof(struct timeval)];

icp->icmp_type = ICMP_ECHO;
icp->icmp_code = 0;
icp->icmp_cksum = 0;
icp->icmp_seq = ntransmitted++;
icp->icmp_id = ident; /* ID */

cc = datalen+8; /* skips ICMP portion */

if (timing)
gettimeofday( tp, &tz );

for( i=8; i<datalen; i++) /* skip 8 for time */
*datap++ = i;

/* Compute ICMP checksum here */
icp->icmp_cksum = in_cksum( icp, cc );

/* cc = sendto(s, msg, len, flags, to, tolen) */
i = sendto( s, outpack, cc, 0, &whereto, sizeof(struct sockaddr) );

if( i < 0 || i != cc )  {
if( i<0 )  perror("sendto");
printf("ping: wrote %s %d chars, ret=%dn",
hostname, cc, i );
fflush(stdout);
}
if(pingflags == FLOOD) {
putchar('.');
fflush(stdout);
}
}

/*
* P R _ T Y P E
*
* Convert an ICMP "type" field to a printable string.
*/
char *
pr_type( t )
register int t;
{
static char *ttab[] = {
"Echo Reply",
"ICMP 1",
"ICMP 2",
"Dest Unreachable",
"Source Quench",
"Redirect",
"ICMP 6",
"ICMP 7",
"Echo",
"ICMP 9",
"ICMP 10",
"Time Exceeded",
"Parameter Problem",
"Timestamp",
"Timestamp Reply",
"Info Request",
"Info Reply"
};

if( t < 0 || t > 16 )
return("OUT-OF-RANGE");

return(ttab[t]);
}

/*
* P R _ P A C K
*
* Print out the packet, if it came from us.  This logic is necessary
* because ALL readers of the ICMP socket get a copy of ALL ICMP packets
* which arrive ('tis only fair).  This permits multiple copies of this
* program to be run without having intermingled output (or statistics!).
*/
pr_pack( buf, cc, from )
char *buf;
int cc;
struct sockaddr_in *from;
{
struct ip *ip;
register struct icmp *icp;
register long *lp = (long *) packet;
register int i;
struct timeval tv;
struct timeval *tp;
int hlen, triptime;

from->sin_addr.s_addr = ntohl( from->sin_addr.s_addr );
gettimeofday( &tv, &tz );

ip = (struct ip *) buf;
hlen = ip->ip_hl << 2;
if (cc < hlen + ICMP_MINLEN) {
if (pingflags & VERBOSE)
printf("packet too short (%d bytes) from %sn", cc,
inet_ntoa(ntohl(from->sin_addr))); /* DFM */
return;
}
cc -= hlen;
icp = (struct icmp *)(buf + hlen);
if( (!(pingflags & QUIET)) && icp->icmp_type != ICMP_ECHOREPLY )  {
printf("%d bytes from %s: icmp_type=%d (%s) icmp_code=%dn",
  cc, inet_ntoa(ntohl(from->sin_addr)),
  icp->icmp_type, pr_type(icp->icmp_type), icp->icmp_code);/*DFM*/
if (pingflags & VERBOSE) {
for( i=0; i<12; i++)
printf("x%2.2x: x%8.8xn", i*sizeof(long),
  *lp++);
}
return;
}
if( icp->icmp_id != ident )
return; /* 'Twas not our ECHO */

if (timing) {
tp = (struct timeval *)&icp->icmp_data[0];
tvsub( &tv, tp );
triptime = tv.tv_sec*1000+(tv.tv_usec/1000);
tsum += triptime;
if( triptime < tmin )
tmin = triptime;
if( triptime > tmax )
tmax = triptime;
}

if(!(pingflags & QUIET)) {
if(pingflags != FLOOD) {
printf("%d bytes from %s: icmp_seq=%d", cc,
  inet_ntoa(from->sin_addr),
  icp->icmp_seq ); /* DFM */
if (timing)
printf(" time=%d msn", triptime );
else
putchar('n');
} else {
putchar('b');
fflush(stdout);
}
}
nreceived++;
}


/*
* I N _ C K S U M
*
* Checksum routine for Internet Protocol family headers (C Version)
*
*/
in_cksum(addr, len)
u_short *addr;
int len;
{
register int nleft = len;
register u_short *w = addr;
register u_short answer;
register int sum = 0;

/*
*  Our algorithm is simple, using a 32 bit accumulator (sum),
*  we add sequential 16 bit words to it, and at the end, fold
*  back all the carry bits from the top 16 bits into the lower
*  16 bits.
*/
while( nleft > 1 )  {
sum += *w++;
nleft -= 2;
}

/* mop up an odd byte, if necessary */
if( nleft == 1 ) {
u_short u = 0;

*(u_char *)(&u) = *(u_char *)w ;
sum += u;
}

/*
* add back carry outs from top 16 bits to low 16 bits
*/
sum = (sum >> 16) + (sum & 0xffff); /* add hi 16 to low 16 */
sum += (sum >> 16); /* add carry */
answer = ~sum; /* truncate to 16 bits */
return (answer);
}

/*
* T V S U B
*
* Subtract 2 timeval structs:  out = out - in.
*
* Out is assumed to be >= in.
*/
tvsub( out, in )
register struct timeval *out, *in;
{
if( (out->tv_usec -= in->tv_usec) < 0 )   {
out->tv_sec--;
out->tv_usec += 1000000;
}
out->tv_sec -= in->tv_sec;
}

/*
* F I N I S H
*
* Print out statistics, and give up.
* Heavily buffered STDIO is used here, so that all the statistics
* will be written with 1 sys-write call.  This is nice when more
* than one copy of the program is running on a terminal;  it prevents
* the statistics output from becomming intermingled.
*/
finish()
{
putchar('n');
fflush(stdout);
printf("n----%s PING Statistics----n", hostname );
printf("%d packets transmitted, ", ntransmitted );
printf("%d packets received, ", nreceived );
if (ntransmitted)
if( nreceived > ntransmitted)
printf("-- somebody's printing up packets!");
else
printf("%d%% packet loss",
  (int) (((ntransmitted-nreceived)*100) /
  ntransmitted));
printf("n");
if (nreceived && timing)
    printf("round-trip (ms)  min/avg/max = %d/%d/%dn",
tmin,
tsum / nreceived,
tmax );
fflush(stdout);
exit(0);
}
#10
Redes y antenas / Que es Uncap o Uncapping??
Febrero 04, 2011, 10:00:14 AM

Uncapping o Uncap son técnicas para poder modificar la configuración de un cable modem que originalmente viene bloqueado de fábrica (actualizar firmware, modificar parámetros, HFC Mac Address, Config File, etc.). Esta técnica es usada con fines poco éticos, es decir, su motivación es acceder de forma gratuita al servicio de internet. También es usado para conseguir obtener mayores velocidades de conexión, tanto de bajada como de subida.
En la actualidad los modems más usados por los operadores de cable son los vulnerables a este tipo de técnicas: Motorola, 3Com, Thomson, RCA, WebStar y COM21... entre otros.

Motorola:

* Serie Eurodocsis
o Motorola sb4100e
o Motorola sb4101e
o Motorola sb4200e
o Motorola sb5100e
o Motorola sb5101e
o Motorola sb5120e
* Serie Docsis
o Motorola sb3100, sb3100i y sb3100d
o Motorola sb4100 y sb4100i
o Motorola sb4101 y sb4101i
o Motorola sb4200 y sb4200i
o Motorola sb5100 y sb5100i
o Motorola sb5101 y sb5101i
o Motorola sb5120
o Motorola sbg900

3Com:

* Serie Eurodocsis/docsis
o 3Com "Aleta de tiburón"

Thomson / RCA:

* Serie Eurodocsis/docsis
o TCM290
o TCM410
o TCM420
o TCM425

WebStar:

* Serie Eurodocsis/docsis
o EPC2k100r2
o EPC2100

COM21:

* Serie Eurodocsis/docsis
o COM21 DOXPORT 1000 series


Para acceder a las opciones ocultas de configuración, es decir, cambiar HFC MAC Address, Config File, Número de serie, se emplea un cable llamado Blackcat, especialmente para los cable modem Motorola SB5100 y SB5101, y en menor medida para los SB4200, SB4101 y SB4100 (sean todos de la serie DOCSIS o EURODOCSIS). Para estos tres últimos, es más adecuado programarlos con un cable Serial fabricado con el chip MAX232 o MAX233, sirviendo este cable inclusive para el cable modem Motorola SB3100.

Fuente: ZeK005
#11
Sistema de Iluminación con LED's

                                                                          By Satyricon







Bienvenidos a esta guía/tutorial. Hoy les enseñare como armar un sistema de iluminación con Led's.


Materiales:




*- Led's. La cantidad que quieran, el color que quieran, pero deben de ser de 3 Vol. En los Led's, el precio varia según el color. En mi caso utilizare rojos, ya que voy a armar algo para mi PC. Estos me salieron 0.40$ C/U. Los verdes y amarillos también salen 0.40 $. Los azules 2.25 $ C/U y los blancos 3.25 $ C/U. Esto es un valor mas o menos de lo que les costaran.

*- Resistencia de 700 ohm o la mas cercana posible (Menor hacia abajo). Esto no es necesario que las compren, pero si tienen la posibilidades de sacarlos de una fuente o de algo electrónico, háganlo, sirven igual, a menos que estén ya quemadas.

Si necesitan saber cual es el valor de la resistencia, les dejo esta guía, y además, les dejo una Web que les calcula, simplemente deben de poner los colores:

Guía para calcular el valor de la resistencia [link caído/eliminado]


*- Cable. En mi caso utilizare cable de redes, ya que poseo mucho en casa, y esta bueno trabajar con el, ya que no es con fibras, sino que es un solo alambre de cobre con un buen espesor.

*- Estaño y un soldador. Esto creo que es necesario que lo compren, ya que si seguiremos haciendo cosas mas adelante, siempre lo utilizaremos. En mi caso el estaño me salio alrededor de 3.50 $ y el soldador, he visto de 6 $ para arriba.

*- Herramientas de mano. Todo lo que sea pinzas, alicates, algo cortante (ejemplo: cuchillo o Cutter), cinta aisladora, etc.

*- Necesitaremos algo para realizar unos orificios en el cual entraran las patas de los Led's. En mi caso utilice un martillo con un clavo, para que vean que no se requieren grandes cosas para realizar estos trabajos. Pueden usar un taladro con una mecha bien finita, de un tamaño cercano al espesor de las patas del Led. Usen lo que crean que es mejor para trabajar, yo solo di algunas propuestas.

*- Algo en donde armar nuestro sistema de luces. Yo en mi caso, utilizare el plástico de atrás de un teclado que se quemo, pero ustedes pueden usar lo que deseen.





Comencemos:




Para empezar, necesitamos hacer las perforaciones para colocar nuestros Led's. Yo use un clavo y un martillo, para que vean que no necesitan mucho más.

Al colocar los Led's, es necesario que coloquen las patas mas largas para un lago, y las mas cortas para el otro, así les será mas fácil soldar después.


Aquí les dejo una imagen para que observen un Led ya montado.


Una vez que tenemos todos los Led's que necesitamos ya posicionados, es hora de soldar. Para ello, lo único que hay que tener en cuenta es que las patas largas (Positivo) queden todas unidas, y las patas cortas (Negativo) queden unidas por otro lado, sin que se toquen en ninguna parte, eso es lo único a tener severo cuidado. 


Bien, una vez que estamos seguros de que todo quedo perfecto, nos dirigimos a tomar un cable y soldar una de las patas al cable, y el otro al cable positivo de nuestro sistema de luces (El cable positivo es el interconecta las patas largas de nuestros Led's).


Una vez que tenemos esto armado, solo falta probar, y lo que usaremos un molex de nuesta fuente de alimentación, para ello colocaremos el calbe Positivo en el color Amarillo del Molex, y el Negativo en el Negro.


Una vez que le damos arranque a la PC, debemos notar que nuestros Led's se encendieron.

Aquí les dejo dos fotos para que vean que el sistema de Led's funciona a la perfección:



Bien, ya hemos terminado, nuestro Sistema de Led's quedo andando a la perfección, y ya tenemos la base para que surjan nuevas ideas.

Nota: Si por casualidad el sistema de Led's no alumbra a una intensidad real, el motivo es que el valor de la resistencia es muy grande. Para solucionarlo, simplemente deben de conseguir una resistencia de un menor valor, soldar y volver a probar.

Saludos  :)
#12
Códigos Fuentes / Manejo de Caracteres en C/C++
Enero 24, 2011, 03:09:08 PM
Código: cpp
#include <stdio.h>
#include <conio.h>

int main()
{
    int i;

    for(i = 0; i != 256; i++)
    switch (i)
    {
        case 7:
            printf("\x10 Caracter = `Espacio\x27 \t\x1a Ecribir\x3a \\x%x \n", i, i, i, i);
            break;
        case 8:
            printf("\x10 Caracter = `No Espacio\x27 \t\x1a Ecribir\x3a \\x%x \n", i, i, i, i);
            break;
        case 9:
            printf("\x10 Caracter = `Tab\x27 \t\x1a Ecribir\x3a \\x%x o \\t\n", i, i, i, i);
            break;
        case 10:
            printf("\x10 Caracter = `Enter\x27 \t\x1a Ecribir\x3a \\x%x o \\n\n", i, i, i, i);
            break;
        case 13:
            printf("\x10 Caracter = `Retorno\x27 \t\x1a Ecribir\x3a \\x%x o \\r\n", i, i, i, i);
            break;
        default:
            printf("\x10 Caracter = %c \t\x1a Ecribir\x3a \\x%x\n", i, i, i, i, i);
            break;
    }

    getch();
    return 0;
}