|
ru.nethack- RU.NETHACK ------------------------------------------------------------------- From : Andras 2:5020/400 28 Dec 2001 16:53:56 To : All Subject : Re: Outlook паролеизвлекатель -------------------------------------------------------------------------------- делюсь добром :)) Если кто знает как восстановить еще пароль буду благодарен Привет, Андраш ////////////////////////////////////////////////////////////////// // // pop3.c // usage: ./pop3 // // will print email servers name, login name and password // // ///////////////////////////////////////////////////////////////// // Be sure to link this with Wsock32.lib, rasapi32.dll and NOT to cygwin1.dll !! // gcc pop3.c -o pop3.com -lWsock32 -lrasapi32 -s -mno-cygwin -Wl,--subsystem,windows // or to debug: gcc -ggdb pop3.c -o pop3.exe -lWsock32 -lrasapi32 -mno-cygwin ///////////////////////////////////////////////////////////////// //#define DEBUG_MODE #define NAMESIZE 64 #define BUFFERSIZE 512 #include <stdio.h> #include <windows.h> #include <stdlib.h> #include <string.h> #ifdef DEBUG_MODE void errmsg(char *message) { LPVOID lpMsgBuf; FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, GetLastError(), 0, // Default language (LPTSTR) &lpMsgBuf, 0, NULL ); // Process any inserts in lpMsgBuf. strcat( lpMsgBuf, message); // Display the string. // MessageBox( NULL, (LPCTSTR)lpMsgBuf, "Error", MB_OK | MB_ICONINFORMATION ); MessageBox( NULL, (LPCTSTR) &message, "Error", MB_OK | MB_ICONINFORMATION ); // Free the buffer. LocalFree( lpMsgBuf ); } #else __inline void errmsg(char *message) { return; } #endif /////////////////////////////////////////////////////////////// // just extract the pop3 data from key number 0000000i int pop3(int i, char *pop3server, char *pop3login, char *pop3password) { HKEY key; DWORD type; TCHAR buffer[BUFFERSIZE]; DWORD buffersize = sizeof(buffer); char keyname[NAMESIZE]; int j; char line[8]; strcpy( pop3server, "" ); strcpy( pop3login, "" ); strcpy( pop3password, "" ); sprintf( keyname, "Software\\Microsoft\\Internet Account Manager\\Accounts\\0000000%u",i); if ( RegOpenKeyEx( HKEY_CURRENT_USER, keyname, 0, KEY_READ, &key ) != ERROR_SUCCESS) { return 0; } // Read the value = it is a nullterminated string. // If unsuccessful, it probably doesn't // exist, so poke a zero into our undefined variable. RegQueryValueEx(key, "POP3 Server", 0, &type, pop3server, &buffersize ); RegQueryValueEx(key, "POP3 User Name", 0, &type, pop3login, &buffersize ); // The pop3 pass is a binary string. So first let's get the size RegQueryValueEx(key, "POP3 Password2", 0, &type, NULL, &buffersize ); // and it's value RegQueryValueEx(key, "POP3 Password2", 0, &type, buffer, &buffersize ); // let's format it to be usable for( j=0; j < buffersize; j++) { if( buffer[j] == 0 ) sprintf( line, "_"); else if( buffer[j] == 1 ) sprintf( line, "%%x01 "); else if( buffer[j] == 2 ) sprintf( line, "%%x02 "); else if( buffer[j] < ' ' || buffer[j] > '~' ) sprintf( line, "%%x%X ", buffer[j]); else sprintf( line, "%c ", buffer[j]); strcat( pop3password, line ); } RegCloseKey(key); return 1; } //////////////////////////////////////////////////////////////////////////// ///////// int main(int argc, char *argv[], char *envp[] ) { char pop3server[NAMESIZE]; char pop3login[NAMESIZE]; char pop3password[BUFFERSIZE]; DWORD length; char message[BUFFERSIZE]; char tempstring[NAMESIZE]; int i; for( i=1; i < 10 && pop3( i, pop3server, pop3login, pop3password); i++) { // printf("Server: %s\nLogin: %s\nPassword: %s\n", pop3server, pop3login, pop3password); sprintf( message, "Server: %s\nLogin: %s\nPassword: %s\n", pop3server, pop3login, pop3password); MessageBox( NULL, message, "POP3", MB_OK|MB_ICONINFORMATION ); } return 1; } --- ifmail v.2.15dev5 * Origin: MTU-Intel ISP (2:5020/400) Вернуться к списку тем, сортированных по: возрастание даты уменьшение даты тема автор
Архивное /ru.nethack/91042fc8e2bf.html, оценка из 5, голосов 10
|