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

 

 


Tema destacado: Tutorial básico de Quickjs


  Mostrar Temas
Páginas: 1 2 3 4 5 6 7 [8] 9
71  Programación / .NET (C#, VB.NET, ASP) / Reconocer areas de imagenes - ayuda en: 25 Noviembre 2011, 17:57 pm
Una vez vi un programa que tenia una imagen y uno podia hacer click en distintas areas de la imagen y se obtenia un valor. Pero la imagen, ni las areas de la imagen eran cuadradas y menos redondas.

Existe algun boton u otro control que me permita hacer esto, en flash creo que se puede hacer, estoy buscando información para vb.net.

Saludos.
72  Programación / .NET (C#, VB.NET, ASP) / Problema Serializar/Deserializar en: 23 Noviembre 2011, 07:18 am
Serializo y deserializo un objeto en un Proyecto1 sin ningun problema, pero cuando intento deserializar el objeto desde otro proyecto aún copiando la misma clase del objeto.
Me sale un error que dice: No se pudo encontrar el ensamblado 'Proyecto1,versión=1.0.4344.1002,culture=neutral,PublicKeyToken=null'

Parece que al guardar el objeto se crea esta especie de cabecera que referencia al proyecto que creo el archivo. Estoy intentando quitar esta cabecera, pienso que deberia poderse sobreescribiendo el metodo: Serealize.

Alguien tiene alguna idea. Agredezco los comentarios.  :xD

73  Foros Generales / Foro Libre / Animación Naruto rikudou en: 19 Noviembre 2011, 19:55 pm
se aceptan agravios...

canción: So Long Dear Friend by JETZT 
74  Programación / Programación C/C++ / Seriales PenDrive DevC++ (SRC) en: 17 Noviembre 2011, 17:27 pm
Buscando código para VB.NET encontré esto, hice pequeñas modificaciones para que funcione en Dev C++ y googleando encontré la función Split, comparto el resultado

Hay que linkear: -lsetupapi
Código
  1.  
  2. #include <windows.h>
  3. #include <Setupapi.h>
  4. #include <stdio.h>
  5.  
  6. static /*const*/ GUID hidGUID = { 0xA5DCBF10L, 0x6530, 0x11D2,
  7. { 0x90, 0x1F, 0x00, 0xC0, 0x4F, 0xB9, 0x51, 0xED } };
  8.  
  9. char **split ( char *string, const char sep) {
  10.  
  11.    char       **lista;
  12.    char       *p = string;
  13.    int         i = 0;
  14.  
  15.    int         pos;
  16.    const int   len = strlen (string);
  17.  
  18.    lista = (char **) malloc (sizeof (char *));
  19.    if (lista == NULL) {                      /* Cannot allocate memory */
  20.        return NULL;
  21.    }
  22.  
  23.    lista[pos=0] = NULL;
  24.  
  25.    while (i <len) {
  26.  
  27.        while ((p[i] == sep) && (i <len))
  28.            i++;
  29.  
  30.        if (i <len) {
  31.  
  32.            char **tmp = (char **) realloc (lista , (pos + 2) * sizeof (char *));
  33.            if (tmp == NULL) {       /* Cannot allocate memory */
  34.                free (lista);
  35.                return NULL;
  36.            }
  37.            lista = tmp;
  38.            tmp = NULL;
  39.  
  40.            lista[pos + 1] = NULL;
  41.            lista[pos] = (char *) malloc (sizeof (char));
  42.            if (lista[pos] == NULL) {         /* Cannot allocate memory */
  43.                for (i = 0; i <pos; i++)
  44.                    free (lista[i]);
  45.                free (lista);
  46.                return NULL;
  47.            }
  48.  
  49.            int j = 0;
  50.            for (i; ((p[i] != sep) && (i <len)); i++) {
  51.                lista[pos][j] = p[i];
  52.                j++;
  53.  
  54.                char *tmp2 = (char *) realloc (lista[pos],(j + 1) * sizeof (char));
  55.                if (lista[pos] == NULL) {     /* Cannot allocate memory */
  56.                    for (i = 0; i <pos; i++)
  57.                        free (lista[i]);
  58.                    free (lista);
  59.                    return NULL;
  60.                }
  61.                lista[pos] = tmp2;
  62.                tmp2 = NULL;
  63.            }
  64.            lista[pos][j] = '\0';
  65.            pos++;
  66.        }
  67.    }
  68.  
  69.    return lista;
  70. }
  71.  
  72. HANDLE connectDeviceNumber(DWORD deviceIndex)
  73. {
  74.    //GUID hidGUID;  
  75.  
  76.  
  77.    HDEVINFO hardwareDeviceInfoSet;
  78.    SP_DEVICE_INTERFACE_DATA deviceInterfaceData;
  79.    PSP_INTERFACE_DEVICE_DETAIL_DATA deviceDetail;
  80.    ULONG requiredSize;
  81.    HANDLE deviceHandle = INVALID_HANDLE_VALUE;
  82.    DWORD result;
  83.  
  84.    //Get the HID GUID value - used as mask to get list of devices
  85.    //HidD_GetHidGuid (&hidGUID);
  86.    //hidGUID = new GUID(GUID GUID_DEVINTERFACE_USB_DEVICE);
  87.  
  88.    //Get a list of devices matching the criteria (hid interface, present)
  89.    hardwareDeviceInfoSet = SetupDiGetClassDevs (&hidGUID,
  90.                                                 NULL, // Define no enumerator (global)
  91.                                                 NULL, // Define no
  92.                                                 (DIGCF_PRESENT | // Only Devices present
  93.                                                 DIGCF_DEVICEINTERFACE)); // Function class devices.
  94.  
  95.    deviceInterfaceData.cbSize = sizeof(SP_DEVICE_INTERFACE_DATA);
  96.  
  97.    //Go through the list and get the interface data
  98.    result = SetupDiEnumDeviceInterfaces (hardwareDeviceInfoSet,
  99.                                          NULL, //infoData,
  100.                                          &hidGUID, //interfaceClassGuid,
  101.                                          deviceIndex,
  102.                                          &deviceInterfaceData);
  103.  
  104.    /* Failed to get a device - possibly the index is larger than the number of devices */
  105.    if (result == FALSE)
  106.    {
  107.        SetupDiDestroyDeviceInfoList (hardwareDeviceInfoSet);
  108.        printf("hidin: -- failed to get specified device number");
  109.        return INVALID_HANDLE_VALUE;
  110.    }
  111.  
  112.    //Get the details with null values to get the required size of the buffer
  113.    SetupDiGetDeviceInterfaceDetail (hardwareDeviceInfoSet,
  114.                                     &deviceInterfaceData,
  115.                                     NULL, //interfaceDetail,
  116.                                     0, //interfaceDetailSize,
  117.                                     &requiredSize,
  118.                                     0); //infoData))
  119.  
  120.    //Allocate the buffer
  121.    deviceDetail = (PSP_INTERFACE_DEVICE_DETAIL_DATA)malloc(requiredSize);
  122.    deviceDetail->cbSize = sizeof(SP_INTERFACE_DEVICE_DETAIL_DATA);
  123.  
  124.    //Fill the buffer with the device details
  125.    if (!SetupDiGetDeviceInterfaceDetail (hardwareDeviceInfoSet,
  126.                                          &deviceInterfaceData,
  127.                                          deviceDetail,
  128.                                          requiredSize,
  129.                                          &requiredSize,
  130.                                          NULL))
  131.    {
  132.        SetupDiDestroyDeviceInfoList (hardwareDeviceInfoSet);
  133.        free (deviceDetail);
  134.        printf("hidin: -- failed to get device info");
  135.        return INVALID_HANDLE_VALUE;
  136.    }
  137.  
  138.    char  **listSplit;
  139.  
  140.    listSplit = split(deviceDetail->DevicePath,'#');
  141.  
  142.    //printf("Opening device with path: %s", deviceDetail->DevicePath);
  143.    printf("Serial: %s\n",listSplit[2] );
  144. }
  145.  
  146. int main(int argc, char* argv[]) {
  147.    connectDeviceNumber(0);
  148.  
  149.    getchar();
  150.   return 0;
  151. }
  152.  
75  Programación / .NET (C#, VB.NET, ASP) / (SOLUCIONADO SRC)Ayuda pasar codigo a VB.Net: Seriales Pen-Drives vb6 en: 10 Noviembre 2011, 17:32 pm
Estoy pasando un code a VB.net 2005 de Sergio Desanti (Hasseds) del foro VB6 : Seriales

Pen-Drives
http://foro.elhacker.net/programacion_visual_basic/seriales_de_pendrives_conectados_src-t331333.0.html

EL problema es que entra en un bucle interminable, y tampoco estoy seguro si estoy utilizando bien las

funciones del API

Código
  1.  
  2.    Imports System.Runtime.InteropServices    
  3.  
  4.    <StructLayout(LayoutKind.Sequential)> _
  5.    public structure SP_DEVICE_INTERFACE_DATA
  6.        public cbSize as Long
  7.        public InterfaceClassGuid as GUID
  8.        public flags as Long
  9.        public IntPtr as Long
  10.    End Structure
  11.  
  12.    <StructLayout(LayoutKind.Sequential)> _
  13.    Public Structure SP_DEVINFO_DATA
  14.     Public cbSize As UInteger
  15.     Public ClassGuid As Guid
  16. Public DevInst As UInteger
  17.     Public Reserved As IntPtr
  18.    End Structure
  19.  
  20.  
  21.   <StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Auto)> _
  22.   Public Structure SP_DEVICE_INTERFACE_DETAIL_DATA
  23.   Public cbSize As UInt32
  24. <MarshalAs(UnmanagedType.ByValTStr, SizeConst:=256)> _
  25. Public strDevicePath As String
  26.   End Structure
  27.  
  28.    ' SetupDiGetClassDevs: Retorna informacion sobre el dispositivo.
  29.    <DllImport("setupapi.dll",EntryPoint:="SetupDiGetClassDevsW", SetLastError:=True, _
  30.    CharSet:=CharSet.Unicode, ExactSpelling:=True, PreserveSig:=True, _
  31.    CallingConvention:=CallingConvention.Winapi)> _
  32.    Private Shared Function SetupDiGetClassDevs( _
  33.    ByRef ClassGuid As GUID, _
  34.    ByVal Enumerator As Integer, _
  35.    ByVal hwndParent As Integer, _
  36.    ByVal Flags As Integer) As Integer
  37.    End Function    
  38.  
  39.  ' SetupDiEnumDeviceInterfaces
  40.  <DllImport("setupapi.dll", CharSet:=CharSet.Auto, SetLastError:=True)> _
  41.  Public Shared Function SetupDiEnumDeviceInterfaces(ByVal hDevInfo As IntPtr, _
  42.    ByRef devInfo As SP_DEVICE_INTERFACE_DATA, _
  43.    ByRef interfaceClassGuid As Guid, _
  44.    ByVal memberIndex As UInt32, _
  45.    ByRef deviceInterfaceData As SP_DEVICE_INTERFACE_DATA) As Boolean
  46.  End Function
  47.  
  48.  ' SetupDiGetDeviceInterfaceDetail
  49.  <DllImport("setupapi.dll", CharSet:=CharSet.Auto, SetLastError:=True)> _
  50.    Public Shared Function SetupDiGetDeviceInterfaceDetail ( _
  51.    ByVal DeviceInfoSet As IntPtr, _
  52.    ByRef DeviceInterfaceData As SP_DEVICE_INTERFACE_DATA, _
  53.    ByRef DeviceInterfaceDetailData As SP_DEVICE_INTERFACE_DETAIL_DATA, _
  54.    ByVal DeviceInterfaceDetailDataSize As UInteger, _
  55.    ByRef RequiredSize As UInteger, _
  56.    ByRef DeviceInfoData As SP_DEVINFO_DATA) As Boolean
  57.    end function
  58.  
  59.    ' SetupDiDestroyDeviceInfoList
  60.    <DllImport("setupapi.dll", _
  61.    EntryPoint:="SetupDiDestroyDeviceInfoList", _
  62.    SetLastError:=True, _
  63.    ExactSpelling:=True, _
  64.    PreserveSig:=True, _
  65.    CallingConvention:=CallingConvention.Winapi)> _
  66.    Private Shared Function SetupDiDestroyDeviceInfoList( _
  67.    ByVal DeviceInfoSet As Integer) As Boolean
  68.    End Function
  69.  
  70.    '------CharSet:=CharSet.Auto
  71. '    <DllImport("ole32.dll", CharSet:=CharSet.Unicode,PreserveSig:=false)> _
  72. ' static IIDFromString(lpsz as String)
  73.  
  74.  
  75. ' Funcion
  76. Public Function FlashSerials() As String
  77.  
  78.   Dim TGUID As GUID
  79.   Dim lCount       As Long
  80.   Dim lSize        As Long
  81.   Dim DTL          As new SP_DEVICE_INTERFACE_DETAIL_DATA
  82.   Dim DTA          As new SP_DEVICE_INTERFACE_DATA
  83.   dim cad as String  
  84.   Dim strValue As String ="{a5dcbf10-6530-11d2-901f-00c04fb951ed}"
  85.  
  86.   ' esto era: Call IIDFromString(StrPtr("{a5dcbf10-6530-11d2-901f-00c04fb951ed}"), TGUID)
  87.   ' pero no encuentro un equivalente en NET de IIDFromString
  88.   ' encontre por ahi que se podia crear un Guid asi, estara bien?
  89.   TGUID = New Guid(strvalue)
  90.  
  91.   Dim hDev As Long  
  92.   hDev = SetupDiGetClassDevs(TGUID, &H0, &H0, &H12)
  93.  
  94.   If hDev = -1 Then
  95.   return "No hay nada"
  96.   Exit Function
  97.   End If
  98.  
  99.   DTA.cbSize = Len(DTA)
  100.   DTL.cbSize = &H5
  101.  
  102.   Dim dia As  SP_DEVICE_INTERFACE_DATA  
  103.   dia.cbSize = &H0  
  104.  
  105.   Dim dd As SP_DEVINFO_DATA
  106.   dd.cbSize = &H0
  107.   cad = ""
  108.   lCount = 0
  109.   Dim nulo As new SP_DEVICE_INTERFACE_DETAIL_DATA
  110.  
  111.   ' Esto era asi
  112.   'do while not (SetupDiEnumDeviceInterfaces(hDev, &H0, TGUID, lCount, DTA) = &H0)
  113.   ' Entra en un bucle interminable,que estoy haciendo mal?
  114.   do While not SetupDiEnumDeviceInterfaces(hDev, dia , TGUID, lCount, DTA)
  115.  
  116.     ' Tengo mis dudas si estoy utilizando bien las funciones
  117.     'call SetupDiGetDeviceInterfaceDetail(hDev, DTA, ByVal &H0, &H0, lSize, ByVal &H0)      
  118.     Call SetupDiGetDeviceInterfaceDetail(hDev, dia, nulo , &H0, lSize, dd)      
  119.  
  120.     ' Call SetupDiGetDeviceInterfaceDetail(hDev, DTA, DTL, ByVal lSize, &H0, ByVal &H0)
  121.     call SetupDiGetDeviceInterfaceDetail(hDev, DTA, DTL, lSize, &H0, dd)
  122.  
  123.     If UBound(Split(DTL.strDevicePath, "#")) > 1 Then
  124.       cad = cad & Split(UCase(DTL.strDevicePath), "#")(2) & Chr(&HD)      
  125.     End If    
  126.     lCount = lCount + 1
  127.   loop
  128.   Call SetupDiDestroyDeviceInfoList(hDev)
  129.  
  130.   If cad = "" Then cad = "No hay conexiones"
  131.   return cad
  132. End Function
  133.  

Si alguien tiene sugerencias o alguna informacion sobre las funciones de la API que comento, se los

agradeceria.

Saludos.
76  Programación / Ingeniería Inversa / Consulta: Como hacer más dificil el crackeo? en: 7 Octubre 2011, 22:11 pm
compilo en P-code.
En mi programa pienso comparar el serial del disco duro o usb. Pienso poner el serial previamente obtenido en una variable y comparar en tiempo de ejecución 2 ó 3 veces.

Este método que tan dificil de crackear es? y si tendrían algunas sugerencias para hacerlo más dificil de crackear.

gracias por las sugerencias.
77  Programación / Programación Visual Basic / DUDA: Se puede serializar controles en VB6 ? en: 4 Octubre 2011, 20:19 pm
Bueno estoy creando un aplicacion, y necesito salvar la informacion que se ingresa en los listbox, averiguando encontre la opción de serializar objetos. Y quisiera saber si se podrá serializar controles, deberia poderse, pienso yo.

Bueno agredecere la información que puedan compartir, algun link, seguiré averiguando.
Googleando encontre un ejemplo, pero no de controles lo probaré y si funciona lo subiré para compartir.  :xD
78  Informática / Hardware / MI pc se apaga cuando bootea el CD windows en: 28 Septiembre 2011, 06:35 am
Se apaga cuando bootea de cd , asi que saque el disco duro y lo puse en otra pc e instale windows en la unidad C, sin tocar la D. Todo correcto, hasta que volvi a ponerlo en la 1er PC( Que se apaga cuando lee CD/DVD), ahora me da error y se reinicia cuando inicia windows. Ojala alguien tenga sugerencias, pues ya me dio mucho lio...
Es una pentium IV o.0! gracias por las sugerencias.
79  Programación / Java / Doble buffer - Animación "Nieve" en java en: 19 Junio 2011, 21:30 pm
La tecnica doble buffer nos permite hacer una animación libre de parpadeos, cuando llamas al método repaint() en un applet, este llama a update() el cual borra toda la pantalla y redibuja llamando al método paint(), esto lo hace directamente en la pantalla, por lo que se nota un feo parpadeo  :-[

Para realizar el Doble Buffer, sobrescribimos el método update(), así relizaremos todo el pintado en una pantalla virtual asi no se visualizara hasta que nosotros volquemos esta pantalla virtual a la pantalla real.

ejemplo
  
Código
  1.   Image buffer;
  2.   Graphics pantallaVirtual;
  3.  
  4.  
  5.   //creamos una imagen
  6.   buffer = createImage(Ancho, Alto);
  7.  
  8.   // creamos la pantalla virtual para el Doble Buffer
  9.   pantallaVirtual = buffer.getGraphics();
  10.  

  
Ahora todo lo que hagamos en la pantallaVirtual se verá reflejado en la imagen buffer, podemos pintar un círculo, rectangulo

o una imagen previamente cargada en la pantallaVirtual.

  
Código
  1. public void paint(Graphics g) {        
  2.         g.drawImage(fondo,0,0,this); // dibujamos el fondo
  3.         g.setColor(new Color(240, 240, 255));        
  4. g.drawOval(10,10,200,200);    
  5.    }
  6.  
  7.   public void update(Graphics g) {
  8.        // dibujamos en la pantalla virtual, esto se hace en memoria
  9.        // no se visualizara
  10.        paint(pantallaVirtual);        
  11.        // se vuelca la imagen "buffer" en la pantalla real
  12.        g.drawImage(buffer, 0, 0,640,400, this);          
  13.    }  

Animación nieve: Nevando.java
Código
  1. import java.awt.*;
  2. import java.util.Random;
  3. import java.util.Calendar;
  4. import java.applet.Applet;
  5. //Clase Nieve
  6. class Nieve {
  7.    // coordenadas del copo de nieve
  8.    int x, y;
  9.    // indica la dirección
  10.    // derecha = 1 ó izquierda = -1
  11.    int jock;
  12.    //Constructor
  13.    public Nieve(int a, int b, int c) {
  14.        x = a;
  15.        y = b;
  16.        jock = c;
  17.    }
  18. }//fin clase Nieve
  19.  
  20. // Clase Nevando
  21. public class Nevando extends Applet implements Runnable {
  22.    int Ancho=320, Alto = 200;
  23.    public static final int MAX_COPOS = 250;
  24.    Nieve copo[] = new Nieve[MAX_COPOS];
  25.    // matriz que representa a la pantalla virtual
  26.    // para comprobar la posición de un copo
  27.    int Tabla[][] = new int[Ancho][Alto];
  28.    boolean ok;
  29.    Thread hilo;
  30.    Image buffer, fondo;  
  31.    Graphics pantallaVirtual;
  32.    Random aleat;      
  33.  
  34.    // Constructor
  35.    public Nevando() {        
  36.        try {
  37.            ok = false;
  38.            Calendar ahora = Calendar.getInstance();
  39.            aleat = new Random(ahora.getTime().hashCode());
  40.        }
  41.        catch (Exception ed) {ed.printStackTrace();}                
  42.    }
  43.  
  44.    public void iniciarTabla() {
  45.        // inicializa la matriz con Ceros, porque esta vacia
  46.        for(int j=0; j<Alto; j++)
  47.            for(int i=0; i < Ancho; i++)
  48.                Tabla[i][j] = 0;
  49.    }
  50.  
  51.    // devuelve un numero entre "i" e "f" aletoriamente
  52.    int aleatorio(int i, int f) {
  53.        double random = aleat.nextDouble();
  54.        return ((int)((random*(f-i))+i));
  55.    }
  56.  
  57.    // devuelve 0 si la posicion esta libre
  58.    // si la posicion esta ocupada devuelve 1
  59.    boolean comprobarTabla(int h, int k) {                
  60.        if(h>0 && k>0 && h<Ancho && k<Alto)
  61.            if( Tabla[h][k] == 0) return true;        
  62.        return false;
  63.    }
  64.  
  65.    //metodo init() propio del applet
  66.    public void init() {
  67.        iniciarTabla();
  68.        int k;
  69.        // inicializamos los copos
  70.        for(int j=0; j< MAX_COPOS; j++) {
  71.            k = aleatorio(0,2);
  72.            if(k==0) k = -1;
  73.            // contruimos un nuevo copo
  74.            copo[j] = new Nieve( aleatorio(0,Ancho),aleatorio(0,Alto) , k);
  75.            Tabla[ copo[j].x ][ copo[j].y ] = 1; // representamos el copo en la matriz
  76.        }
  77.        try {
  78.            // cargamos la imagen de fondo
  79.            fondo = getImage(getCodeBase(),"imagenes/fondo.jpg");
  80.  
  81.            //creamos una imagen de 320x200 pixels
  82.            buffer = createImage(Ancho, Alto);
  83.            // creamos la pantalla virtual para el Doble Buffer
  84.            pantallaVirtual = buffer.getGraphics();
  85.  
  86.            //tamaño del Applet 640x400 pixels
  87.            resize(Ancho*2,Alto*2 );
  88.        }
  89.        catch( Exception e ) {System.out.println( e.getMessage()); }
  90.    }
  91.  
  92.  
  93.    public void stop() { hilo = null; }
  94.  
  95.    public void start() {
  96.        if(hilo == null) {
  97.            hilo=new Thread(this);
  98.            hilo.start();
  99.        }
  100.    }
  101.  
  102.    // aquí pintamos todo la animacion
  103.    public void paint(Graphics g) {        
  104.         g.drawImage(fondo,0,0,this); // dibujamos el fondo
  105.         g.setColor(new Color(240, 240, 255));        
  106.         // dibuja la nieve
  107.         for(int i = 0; i < MAX_COPOS; i++) {
  108.             g.fillOval(copo[i].x, copo[i].y, 2, 2);
  109.         }        
  110.    }
  111.  
  112.    // todo lo que hagamos en "pantallaVirtual" se vera reflejado en
  113.    // la imagen "buffer"
  114.    public void update(Graphics g) {
  115.        // dibujamos en la pantalla virtual, esto se hace en memoria
  116.        // no se visualizara
  117.        paint(pantallaVirtual);        
  118.        // se vuelca la imagen "buffer" en la pantalla real
  119.        g.drawImage(buffer, 0, 0,640,400, this);          
  120.    }        
  121.  
  122. // aqui realizamos todo el proceso de animacion  
  123. public void run() {
  124.        while(hilo != null) {
  125.            // la logico de los copos
  126.            for(int i=0; i<MAX_COPOS; i++) {
  127.                // Si el copo aun no llega al suelo lo borramos
  128.                if(copo[i].y < Alto-1)
  129.                    Tabla[copo[i].x][copo[i].y++] = 0;
  130.  
  131.                if(aleatorio(0,2)==0) // si es 0 movemos x
  132.                    copo[i].x += copo[i].jock*(-1);
  133.  
  134.                // Si el copo se sale de la pantalla, se crea uno nuevo
  135.                if((copo[i].x <= 0) || (copo[i].x >= Ancho-1)) {
  136.                    copo[i].x = aleatorio(0,Ancho);
  137.                    copo[i].y = 0;
  138.                    Tabla[copo[i].x][copo[i].y] = 1;
  139.                    copo[i].jock = aleatorio(0,2);
  140.                    if (copo[i].jock == 0) copo[i].jock = -1;
  141.                }
  142.  
  143.                // Si ok=1 significara que el copo aun esta dentro de la pantalla
  144.                ok=((copo[i].x>=0) && (copo[i].x<Ancho) && (copo[i].y>=0) &&(copo[i].y<Alto));
  145.  
  146.                // "Esto es para que el copo caiga si esta en algun objeto"
  147.                // Vemos el punto central                
  148.                if(comprobarTabla( copo[i].x , copo[i].y ) && ok)
  149.                    Tabla[ copo[i].x ][ copo[i].y ] = 1;
  150.  
  151.                // Vemos el punto derecha-abajo
  152.                else if(comprobarTabla(copo[i].x+1, copo[i].y+1) && ok)
  153.                    Tabla[copo[i].x++][copo[i].y++] = 1;
  154.  
  155.                // Vemos el punto izquierda-abajo
  156.                else if(comprobarTabla(copo[i].x-1,copo[i].y+1) && ok)
  157.                    Tabla[copo[i].x--][copo[i].y++] = 1;
  158.  
  159.                // Vemos el punto central-abajo
  160.                else if(comprobarTabla(copo[i].x,copo[i].y+1) && ok)
  161.                    Tabla[copo[i].x][copo[i].y++] = 1;
  162.  
  163.                else // Si no esta en ningun borde, lo dejamos en ese sitio
  164.                {    // y creamos nuevo copo
  165.                    if(ok) {
  166.                        Tabla[copo[i].x][copo[i].y-1] = 1;
  167.                        copo[i].x = aleatorio(0,Ancho);
  168.                        copo[i].y = 0;
  169.                        Tabla[copo[i].x][copo[i].y] = 1;
  170.                        copo[i].jock = aleatorio(0,2);
  171.                        if(copo[i].jock == 0) copo[i].jock = -1;
  172.                    }
  173.                }
  174.  
  175.            }
  176.            repaint(); // llama al metodo Update
  177.            try{hilo.sleep(20);} // para el proceso por 20/1000 segundos
  178.            catch(InterruptedException e){}            
  179.        }
  180.  
  181.    }
  182. }
  183.  

Aqui el proyecto en Netbeans 5.5 de la animación de nieve en java, tiene comentarios
http://www.mediafire.com/?x69b70m1s74bds3
80  Seguridad Informática / Hacking / Web spoofing - ayuda en: 11 Junio 2011, 10:36 am
Estoy investigando, asi que si alguien tiene información que me permita hacer la suplantación en windows se lo agradecería :-[ leyendo se que DNS spoofing con el Cain es fácil, bueno capturaría los pass con el Cain porque si funciona el envenamiento arp, pero el problema es que la pagina que quiero suplantar utiliza algoritmo md5 para cifrar el pass, como soy poco paciente para hallar el pass por fuerza bruta  :xD , quiero probar la web spoofing.

Agradecería referencias, algo leí que se puede instalar el servidor web como apache¿? pero como hacer para que el usuario cuando escriba por ejemplo www.google.com lo redireccione a mi pc? fácilmente notará la diferencia?
Páginas: 1 2 3 4 5 6 7 [8] 9
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines