Mostrar Mensajes

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.


Mensajes - Jhonjhon_123

Páginas: [1] 2
1
Visual Basic 6 / Re:Manejo Hex???
« en: Febrero 01, 2010, 04:58:56 pm »
Bueno, buscando mas alla, encontre un code, pero esta en C o C++ o C#, no se, y no me como traducirlo a vb, si alguien conose cual es y como se traduce se lo agradesco.

Code:

Código: [Seleccionar]
/*
    Copyright 2004,2005,2006,2007,2008,2009 Luigi Auriemma

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA

    http://www.gnu.org/licenses/gpl-2.0.txt
*/

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

typedef unsigned char   u8;
typedef unsigned short  u16;
typedef unsigned int    u32;



#define VER             "0.1.2"
#define BUFFSZ          256



void readshow(FILE *fd, u8 *msg, int dec);
void cuteftp_pwd(u8 *pwd, u8 size);
void read_err(void);
void std_err(void);



int main(int argc, char *argv[]) {
    FILE    *fd;
    u32     b4;
    int     i;
    u16     b2,
            hosts;
    u8      b;

    setbuf(stdout, NULL);

    fputs("\n"
        "CuteFTP data retriever and password decoder "VER"\n"
        "by Luigi Auriemma\n"
        "e-mail: aluigi@autistici.org\n"
        "web:    aluigi.org\n"
        "\n", stdout);

    if(argc < 2) {
        printf("\nUsage: %s <SM.DAT>\n"
            "\n"
            "sm.dat is located in the folders inside %%APPDATA%%\\GlobalSCAPE\n"
            "\n", argv[0]);
        printf("\n  press RETURN to exit\n");
        fgetc(stdin);
        exit(1);
    }

    fd = fopen(argv[1], "rb");
    if(!fd) std_err();

    if(fread(&b, 1, 1, fd) != 1) read_err();
    if(fseek(fd, b, SEEK_SET)) std_err();
    readshow(fd, "Main Folder", 0);
    if(fseek(fd, 14, SEEK_CUR)) std_err();
    if(fread(&hosts, 2, 1, fd) != 1) read_err();
    if(fseek(fd, 4 + (hosts << 2), SEEK_CUR)) std_err();
    if(fread(&b2, 2, 1, fd) != 1) read_err();
    if(fseek(fd, b2, SEEK_CUR)) std_err();

    for(;;) {
        printf("-------------------------------\n");
        for(i = 0; i < 3; i++) {
            if(fread(&b4, 4, 1, fd) != 1) break;
        }
        if(feof(fd)) break;     // lame but this is only an experiment
        if(fseek(fd, 4, SEEK_CUR)) std_err();
        if(b4) {
            readshow(fd, "Main Folder", 0);
            if(fseek(fd, 14, SEEK_CUR)) std_err();
            if(fread(&b2, 2, 1, fd) != 1) read_err();
            if(fseek(fd, b2 << 2, SEEK_CUR)) std_err();
            if(fseek(fd, 2, SEEK_CUR)) std_err();
            continue;
        }

        readshow(fd, "Label", 0);
        if(fseek(fd, 32, SEEK_CUR)) std_err();
        readshow(fd, "Timezone", 0);
        if(fseek(fd, 8, SEEK_CUR)) std_err();
        readshow(fd, "Hostname", 0);
        if(fread(&b, 1, 1, fd) != 1) read_err();
        if(b == 1) {
            readshow(fd, "", 0);
            readshow(fd, "", 0);
            readshow(fd, "", 0);
            readshow(fd, "", 0);
            readshow(fd, "", 0);
            readshow(fd, "Comment", 0);
            if(fseek(fd, 20, SEEK_CUR)) std_err();
        } else {
            readshow(fd, "", 0);
            readshow(fd, "", 0);
            readshow(fd, "", 0);
            readshow(fd, "Username", 0);
            readshow(fd, "Password", 1);
            readshow(fd, "Comment", 0);
            if(fseek(fd, 4, SEEK_CUR)) std_err();
            if(fread(&b2, 2, 1, fd) != 1) read_err();
            printf("%-30s %hu\n", "Port", b2);
            if(fseek(fd, 14, SEEK_CUR)) std_err();
        }
        readshow(fd, "Remote folder", 0);
        readshow(fd, "Local folder", 0);
        if(fseek(fd, 20, SEEK_CUR)) std_err();
        readshow(fd, "remote filter", 0);
        if(fread(&b2, 2, 1, fd) != 1) read_err();
        for(i = 0; i < b2; i++) {
            readshow(fd, "filter mask", 0);
        }
        if(fread(&b2, 2, 1, fd) != 1) read_err();
        for(i = 0; i < b2; i++) {
            readshow(fd, "filter not mask", 0);
        }
        if(fseek(fd, 14, SEEK_CUR)) std_err();
        readshow(fd, "Proxy host", 0);
        if(fseek(fd, 4, SEEK_CUR)) std_err();
        readshow(fd, "Proxy user", 0);
        readshow(fd, "Proxy password", 0);
        if(fseek(fd, 14, SEEK_CUR)) std_err();
        if(fread(&b2, 2, 1, fd) != 1) read_err();
        for(i = 0; i < b2; i++) {
            readshow(fd, "Proxy advanced", 0);
        }
        if(fseek(fd, 2, SEEK_CUR)) std_err();
        readshow(fd, "Socks host", 0);
        if(fseek(fd, 4, SEEK_CUR)) std_err();
        readshow(fd, "Socks user", 0);
        readshow(fd, "Socks password", 0);
        if(fseek(fd, 22, SEEK_CUR)) std_err();
    }

    fclose(fd);
    printf("\n  press RETURN to exit\n");
    fgetc(stdin);
    return(0);
}



void readshow(FILE *fd, u8 *msg, int dec) {
    int     len;
    u8      buff[BUFFSZ + 1],
            b;

    if(fread(&b, 1, 1, fd) != 1) read_err();
    len = b;
    if(b == 0xff) {
        if(fread(&b, 1, 1, fd) != 1) read_err();
        len = b;
        if(fread(&b, 1, 1, fd) != 1) read_err();
        len |= (b << 8);
    }
    if(len <= 0) return;

    if(len > BUFFSZ) {  // blah, I don't want to waste 64kb of memory
        if(fread(buff, 1, BUFFSZ, fd) != BUFFSZ) read_err();
        if(fseek(fd, len - BUFFSZ, SEEK_CUR)) std_err();
        len = BUFFSZ;
    } else {
        if(fread(buff, 1, len, fd) != len) read_err();
    }
    if(dec) cuteftp_pwd(buff, len);
    buff[len] = 0;
    if(msg[0]) printf("%-30s %s\n", msg, buff);
}



void cuteftp_pwd(u8 *pwd, u8 size) {
    int     i;

    for(i = 0; i < size; i++) {
        pwd[i] ^= 0xc8;
    }
    pwd[i] = 0;
}



void read_err(void) {
    printf("\nError: read error, this tool is experimental so probably a needed value has not been found\n");
    printf("\n  press RETURN to exit\n");
    fgetc(stdin);
    exit(1);
}



void std_err(void) {
    perror("\nError");
    printf("\n  press RETURN to exit\n");
    fgetc(stdin);
    exit(1);
}


2
Visual Basic 6 / Re:Manejo Hex???
« en: Febrero 01, 2010, 04:50:15 pm »
bueno, ya le he podido poner a hex:

Código: [Seleccionar]
Private Function HexConverter(Text As String) As String
Dim Letra As String
Dim TextAsc As String
Dim D As Long

For D = 1 To Len(Text)
    Letra = Mid(Text, D, 1)
    HexConverter = HexConverter & " " & Hex(Asc(Letra))
    DoEvents
Next

End Function

Me explico, el .dat es el "sm.dat" del CuteFTP, y bueno lo he mirado, tiene una secuencia logica, pero no he podido separar los datos con el vb, pues los hex camian con la palabra.

3
Visual Basic 6 / Manejo Hex???
« en: Febrero 01, 2010, 04:05:11 pm »
Hola!

Bueno la cosa es:

tengo una archivo .dat, el cual esta en un formato raro, con el winhex he visto que tiene una secuencia logica en su almacenamiento. Mi pregunta es como puedo hacer un split, un instr, y otros manejos en cadenas hexadecimales???

Gracias!

4
Visual Basic 6 / Re:Previsualizar impresion con el objeto printer?
« en: Enero 25, 2010, 08:34:55 pm »
aca encontre un code para vista previa:

http://support.microsoft.com/kb/193379/es

seleccionas la images y te da una vista previa con la imagen en un lado y una hoja de texo, en el code esta como pintan el texto:

Espero Te Ayude!

5
Visual Basic 6 / Re:Un Conflicto Xp y vista Con archivos .res
« en: Enero 23, 2010, 09:39:01 pm »
Jeje, Paresco un Bot  :-[ , Gracias!

6
Hola!

Hola, bueno estoy cargando imagenes png desde un .res en vb en vista a un imagelist, y me carga perfecto, pero al ponerlo en XP carga siempre el icono del proyecto en todos los imagelist.

Estoy usando el modulo de leandro:

http://www.leandroascierto.com.ar/categoria/M%C3%B3dulos/articulo/Png%20en%20un%20ImageList.php

Gracias!

7
Visual Basic 6 / Re:Cambiar icono en aplicacion, Util para los gusanos
« en: Enero 19, 2010, 10:46:53 pm »
Gracias por el code, seguro que me resultara util!

8
Visual Basic 6 / Re:Traducir API a VB
« en: Enero 19, 2010, 05:10:52 pm »
Muchas Gracias, Eso era lo que nesesitaba oir (o leer)

Gracias!

9
Visual Basic 6 / Re:Traducir API a VB
« en: Enero 18, 2010, 11:45:20 pm »
Gracias, disculpen, pero aun haci, si me pueden decir un mini tuto para traducir las apis de c++ a vb (No creo que todas esten documentadas).

gracias!

10
Visual Basic 6 / Traducir API a VB [SOLUCIONADO]
« en: Enero 18, 2010, 10:22:58 pm »
Hola!

Bueno, miren he estago jodiendole al registro y ya logre hacr una funciones, bueno la cosa es que nesesito traducion la declaracion API:http://msdn.microsoft.com/en-us/library/bb773494%28VS.85%29.aspx

A vb, pues ya logre funcionar esta api, pero cuando lee los valores me da un error de memoria y se debe a que no puse bien los "ByVal y ByRef" en la declaracion api.

Espero me ayuden con la traduccion de la api

Gracias!

11
General / Re:Fachada del Foro
« en: Enero 17, 2010, 10:08:52 pm »
Bueno, ps ami me encanta este theme:

Urban Demo

Descarga

12
Visual Basic 6 / Re:Las &H2 &H1 etc...
« en: Enero 15, 2010, 12:29:24 am »
Gracias, me ha servido mucho!

13
Visual Basic 6 / Las &H2 &H1 etc... [SOLUCIONADO]
« en: Enero 15, 2010, 12:05:22 am »
Bueno eso es, cuando veo una constante de una api siempre tien un valor como  &H2,&H3,&H algo, quisiera saber en que se traduce esto, ocea es hexadecimal, binario, o q.

En la msdn hay partes en las que hay esto:

Código: [Seleccionar]
TH32CS_SNAPPROCESS
0x00000002

ese 0x00000002, es el valor de la constante??? si es haci como la tradusco a esa &H

Gracias!

15
Visual Basic 6 / Re:Hacer un crypter
« en: Enero 13, 2010, 12:12:17 am »
Busca en google los modulos, el RunPE, el RC4, el Drag & Drop, es muy facil de hacer, el resto de caracteristicas bueno, la creatividad hace al ingeniero!

Páginas: [1] 2