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

 

 


Tema destacado: AIO elhacker.NET 2021 Compilación herramientas análisis y desinfección malware


  Mostrar Mensajes
Páginas: 1 ... 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 [52] 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 ... 331
511  Foros Generales / Foro Libre / Re: Deportistas en el foro en: 11 Febrero 2012, 12:46 pm
Lo de las manos creo que es a tanta pajas que te haces.

Ni discutir, la experiencia a hablado ;D; mi asunto es por la pelota vasca!¡.

Dulces Lunas!¡.
512  Foros Generales / Foro Libre / Re: ¿Las descargas directas han muerto desde la desaparicion de MegaUpload? en: 11 Febrero 2012, 12:43 pm
jaja muerto nada que ver... solo hay que usar las opciones avanzadas de búsqueda y filtros que te ofrece google para que no te apareces can descargas con links a megaupload.

Dulces Lunas!¡.
513  Foros Generales / Foro Libre / Re: Se me ha encendido la bombilla............filezilla en: 10 Febrero 2012, 09:16 am
En pocas palabras lo que expone [Alex]: Si tiene cifrado, anonimato (las conexiones no sean directas por asi desirlo) y el contenido no esta en un solo lugar como los servidores FTP o HTTP es mas factible su utilización en este ámbito, la desventaja que prácticamente nadie lo conoce (yo no lo conocía hasta que lo menciono).

Dulces Lunas!¡.
514  Foros Generales / Foro Libre / Re: Deportistas en el foro en: 10 Febrero 2012, 09:00 am
Basquet, Fronton... me terminan las manos muy rojas.



Dulces Lunas!¡.
515  Programación / Programación Visual Basic / Re: Encontrar pass de sólo lectura a una hojal excel 2007 en: 10 Febrero 2012, 08:42 am
En la pagina de mygnet esta el código para obtener la contraseña de un documento de excel y de word protegidos por contraseña.

Dulces Lunas!¡.
516  Programación / Programación Visual Basic / Re: Multithread Socket (Thread per Socket)not Complete en: 10 Febrero 2012, 08:39 am
Note: The multi thread are unstable in vb6

Dulces Lunas!¡.
517  Programación / Programación C/C++ / Re: [C] Calcular determinante de una matriz de orden 'n' en: 8 Febrero 2012, 08:37 am
Me espere unos dias antes de soltar el codigo...

Código
  1.  
  2. #include <stdlib.h>
  3. #include <stdio.h>   //<stdio.h>
  4.  
  5. typedef
  6. struct Matrix
  7. {
  8.    float **lpData;
  9.    unsigned int uiRows;
  10.    unsigned int uiCols;
  11. }
  12. MATRIX, *LPMATRIX;
  13.  
  14. LPMATRIX createMatrix(unsigned int uiRows, unsigned int uiCols)
  15. {
  16.    LPMATRIX lpRet = (LPMATRIX)malloc(sizeof(MATRIX));
  17.    int i = 0;
  18.    lpRet->uiCols = uiCols;
  19.    lpRet->uiRows = uiRows;
  20.    lpRet->lpData = (float**)malloc(sizeof(float*) * lpRet->uiRows);
  21.    for (i = 0; i < lpRet->uiRows; i++)
  22.        lpRet->lpData[i] = (float*)malloc(sizeof(float) * lpRet->uiCols);
  23.    return lpRet;
  24. }
  25.  
  26. void freeMatrix(LPMATRIX lpMatrix)
  27. {
  28.    int i = 0;
  29.    if (!lpMatrix) return;
  30.    for (i = 0; i < lpMatrix->uiRows; i++)
  31.        free(lpMatrix->lpData[i]);
  32.    free(lpMatrix->lpData);
  33.    free(lpMatrix);
  34. }
  35.  
  36. void showMatrix(LPMATRIX lpMatrix)
  37. {
  38.    int i = 0,
  39.        j = 0;
  40.    if (!(lpMatrix || lpMatrix->lpData)) return;
  41.    for (i = 0; i < lpMatrix->uiRows; i++)
  42.    {
  43.        if (lpMatrix->lpData[i])
  44.        {
  45.            for (j = 0; j < lpMatrix->uiCols; j++)
  46.                printf("\t%f", lpMatrix->lpData[i][j]);
  47.            printf("\n");
  48.        }
  49.    }
  50. }
  51.  
  52. int getDeterminant(LPMATRIX lpMatrix, float* lpOutDeterminant)
  53. //  Retorna 0 si todo a ido bien, de lo contrario retorna un numero distinto de 0
  54. {
  55.    float fRet = 0.0f,
  56.          fProduct = 0.0f;
  57.    unsigned int i = 0,
  58.                 j = 0;
  59.    if (!(lpMatrix || lpMatrix->lpData) || (lpMatrix->uiRows < 2) || (lpMatrix->uiCols < 2) || (lpMatrix->uiRows != lpMatrix->uiCols)) return -1;
  60.  
  61.    if (lpMatrix->uiCols == 2)
  62.    {
  63.        if (!(lpMatrix->lpData[0] && lpMatrix->lpData[1])) return -1;
  64.        fRet = lpMatrix->lpData[0][0] * lpMatrix->lpData[1][1] - lpMatrix->lpData[1][0] * lpMatrix->lpData[0][1];
  65.  
  66.    } else {
  67.        for (i = 0; i < lpMatrix->uiRows; i++)
  68.        {
  69.            if (!lpMatrix->lpData[i]) return -1;
  70.            //  Multiplicacion de valores verticales de izquierda a derecha...
  71.            fProduct = 1.0f;
  72.            for (j = 0; j < lpMatrix->uiCols; j++)
  73.                fProduct *= lpMatrix->lpData[(i + j) % lpMatrix->uiCols][j];
  74.            fRet += fProduct;
  75.  
  76.            //  Multiplicacion de valores verticales de derecha a izquierda...
  77.            fProduct = 1.0f;
  78.            for (j = 0; j < lpMatrix->uiCols; j++)
  79.                fProduct *= lpMatrix->lpData[(lpMatrix->uiCols - 1) - ((i + j) % lpMatrix->uiCols)][j];
  80.            fRet -= fProduct;
  81.        }
  82.    }
  83.    if (lpOutDeterminant)
  84.        *lpOutDeterminant = fRet;
  85.  
  86.    return 0;
  87. }
  88.  
  89. int main()
  90. {
  91.    LPMATRIX lpMatrix = createMatrix(3,3);
  92.    float fDeterminant = 0.0;
  93.    int i = 0,
  94.        j = 0;
  95.    for (i = 0; i < lpMatrix->uiRows; i++)
  96.    {
  97.        for (j = 0; j < lpMatrix->uiCols; j++)
  98.        {
  99.            printf("[%d][%d] = ",i, j); fflush(stdout);
  100.            scanf("%f", &lpMatrix->lpData[i][j]);
  101.        }
  102.    }
  103.    fflush(stdout);
  104.    showMatrix(lpMatrix);
  105.    if (getDeterminant(lpMatrix, &fDeterminant) == 0)
  106.        printf("Determinante = %f\n", fDeterminant);
  107.    freeMatrix(lpMatrix);
  108.  
  109.    getchar();
  110.  
  111.    return EXIT_SUCCESS;
  112. }
  113.  
  114.  

Temibles Lunas!¡.
518  Programación / Programación C/C++ / Re: Error de violación de acceso en mi programa en: 7 Febrero 2012, 02:12 am
realiza un linkeo a esta libreria (CodeBlock):

MinGW\lib\libws2_32.a

Dulces Lunas!¡.
519  Programación / Programación C/C++ / Re: Error de violación de acceso en mi programa en: 6 Febrero 2012, 23:52 pm
Te dejo un trozo de mi clase CSocketClient, Posiblemente te sirva para solventar ese error (lineas en color resaltado):

Ademas te dejo dos PDF para saber sobre WinSock (Tuto por MazarD) y la creación de Hilos (estandares POSIX) en este enlace (http://infrangelux.sytes.net/filex/?dir=/BlackZeroX/Programacion/papers ).

Código
  1. bool CSockClient::connect(const char* szIP, unsigned short int iPort)
  2. {
  3.    hostent* lpHosten = NULL;
  4.  
  5.    if (this->iState != SCKCLOSED )
  6.    {
  7.        this->setError();
  8.        return false;
  9.    }
  10.  
  11.    if (szIP == NULL || iPort == 0)
  12.        return false;
  13.  
  14.    this->iRemotePort = iPort;
  15.    this->sRemoteHost = szIP;
  16.  
  17.    memset(&this->udtSockAddrIn, 0, sizeof(sockaddr_in));
  18.  
  19.    this->udtSockAddrIn.sin_family = AF_INET;
  20.    this->udtSockAddrIn.sin_port = htons(iPort);
  21.    this->iState = SCKOPEN;
  22.  
  23.    if (this->udtSockAddrIn.sin_port == INVALID_SOCKET)
  24.    {
  25.        this->setError();
  26.        return false;
  27.    }
  28.  
  29.    lpHosten = ::gethostbyname(this->sRemoteHost.c_str());
  30.  
  31.    if (lpHosten == NULL)
  32.    {
  33.        this->setError();
  34.        return false;
  35.    }
  36.  
  37.    this->udtSockAddrIn.sin_addr.s_addr = *((unsigned long*)lpHosten->h_addr_list[0]);
  38.    // memcpy(&uiRet, hHost->h_addr_list[0], hHost->h_length);
  39.  
  40.    this->sLocalHostIP.assign(inet_ntoa(this->udtSockAddrIn.sin_addr));
  41.  
  42.    if (this->udtSockAddrIn.sin_addr.s_addr == INADDR_NONE)
  43.    {
  44.        this->setError();
  45.        return false;
  46.    }
  47.  
  48.    this->mySock = ::socket(PF_INET, SOCK_STREAM, IPPROTO_TCP);
  49.  
  50.    if (this->mySock == INVALID_SOCKET)
  51.    {
  52.        this->setError();
  53.        return false;
  54.    }
  55.  
  56.    if (!this->getSocketOpt())
  57.        return false;
  58.  
  59.    //Creamos el hilo para resivir los datos de este Socket.
  60.    if (pthread_create(&this->threadConnect, NULL, myCallConnect, this))
  61.    {
  62.        if (this->pEventError != NULL)   //Evento
  63.            this->pEventError(this);
  64.  
  65.        if (this->mySock != INVALID_SOCKET )
  66.            closesocket(this->mySock);
  67.  
  68.        this->mySock = INVALID_SOCKET;
  69.  
  70.        this->setError();
  71.  
  72.        return false;
  73.    }
  74.    pthread_detach(this->threadConnect);   //  No guardar Returns del hilo...
  75.  
  76.    return true;
  77. }
  78.  

Timibles Lunas!¡.
520  Foros Generales / Foro Libre / Re: ¿Cúal es esa canción que te levanta el ánimo? en: 6 Febrero 2012, 22:49 pm


Dulces Lunas!¡.
Páginas: 1 ... 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 [52] 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 ... 331
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines