Jump to content

Locate


Recommended Posts

Hello know by-case basis how to turn this program from cpp in autoIt?

#include <windows.h>

#include <stdio.h>

 

typedef unsigned int uint_t;

typedef unsigned char byte_t;

 

/* Win32 CREDENTIAL_ATTRIBUTE (wincred.h) */

typedef struct{

char * Keyword;

uint_t Flags;

uint_t ValueSize;

byte_t * Value;

}

cred_attribute_t;

 

/* Win32 CREDENTIAL (wincred.h) */

typedef struct{

uint_t Flags;

uint_t Type;

char * TargetName;

char * Comment;

FILETIME LastWritten;

uint_t CredentialBlobSize;

byte_t * CredentialBlob;

uint_t Persist;

uint_t AttributeCount;

cred_attribute_t * Attributes;

char * TargetAlias;

char * UserName;

}

credential_t;



/* Tipi puntatori alle funzioni CredEnumerateA e CredFree di advapi32.dll */

typedef bool (WINAPI * credenumerate_t )(const char *, uint_t, uint_t *, credential_t ***);

typedef void (WINAPI * credfree_t )(void *);

 

/* Piccolo handler degli errori, nn mi andava di riscrivere 200 volte FreeLibrary XD */

int free_and_die( HMODULE hMod, const char *msg )

{

printf( "%s", msg );

if(hMod){

FreeLibrary(hMod);

}

return -1;

}

 

int main(int argc, char *argv[])

{

HMODULE h_dll = NULL;

credenumerate_t p_credenumerate = NULL;

credfree_t p_credfree = NULL;

 

credential_t ** v_cred = NULL;

 

uint_t cred_count = 0, i = 0;

printf( "\n*---------------------------------------------------*\n" );

printf( "*-- MSN Live Explorer v1.0 --*\n" );

printf( "*-- Copyright (C) 2007 by evilsocket --*\n" );

printf( "*-- http://www.evilsocket.net --*\n" );

printf( "*---------------------------------------------------*\n\n" );

 

/* Carico un istanza a advapi32.dll */

if( !(h_dll = LoadLibrary("advapi32.dll")) ){

return free_and_die( 0, "@ Error loading advapi32.dll !\n" );

}

 

/* Estraggo i puntatori a CredEnumerateA e CredFree */

p_credenumerate = (credenumerate_t)GetProcAddress( h_dll, "CredEnumerateA" );

p_credfree = (credfree_t)GetProcAddress( h_dll, "CredFree" );

 

if( !p_credenumerate || !p_credfree ){

return free_and_die( h_dll, "@ Error loading CredEnumerateA or CredFree from advapi32.dll !\n" );

}



/* Enumero le credenziali impostando il filtro a 'WindowsLive:name=*' */

if( !p_credenumerate( "WindowsLive:name=*", 0, &cred_count, &v_cred ) ){

return free_and_die( h_dll, "@ Error during credentials enumeration !\n" );

}

 

/* Looppo per tutte le credenziali trovate e ne stampo il contenuto che mi interessa (ma va?) */

printf( "@ Found %d credential(s) :\n\n", cred_count );

 

for( i = 0; i < cred_count; i++ ){

printf( "\tUsername : %s\n", v_cred[i]->UserName );

printf( "\tPassword : %ws\n", v_cred[i]->CredentialBlob );

}

 

/* Libero il vettore delle credenziali */

p_credfree(v_cred);

 

/* Libero l'istanza a advapi32.dll */

FreeLibrary(h_dll);

 

return 0;

}

Thanks for any answers

Link to comment
Share on other sites

i hate being the bad guy here but i don't think that anyone on this forum is gonna do your work for you :)...

first come up with some code and ask for a specific thing ... like why dosen't this work... how could i make it work etc :)

cheers

Only two things are infinite, the universe and human stupidity, and i'm not sure about the former -Alber EinsteinPractice makes perfect! but nobody's perfect so why practice at all?http://forum.ambrozie.ro

Link to comment
Share on other sites

I just wanted to know someone with this help an amateur? Because I want to learn but I do not understand how that works should use?

Welcome to AutoIt. You need to crack open the help file and check out the basic tutorials and example there. Get the basic "Hello, world!" stuff out of the way, and you'll be better able to make use of the help you can get.

Take a shot at coding your structures with DllStructCreate, etc. and post what you've got if you get stuck.

Cheers!

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

I in autoIt program from us a lot but I understand how to do this localiizare source from cpp autoIt that all functions should I use? Sò basic programs do not very complicated (the necessary)

I didn't understand that. Perhaps you should consider posting in your native language, as there are many here who are multi-lingual and might help you in your own language or translate for the rest of us. There are also AutoIt sites in other languages, for example, French at: www.autoit.fr

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

There are Italian?

There are posts on the forum like this: Programmatori italiani cercasi

There is also a valid DNS resolution answering up at www.autoitscript.it, but no page came up so I can't tell if it is really AutoIt or not.

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...