pico
21-03-2005, 01:29 PM
hi,
well i started to work on these unlock code generators last nite, they are in C but i onlt familiar with C++
anyway, i got DCT2 and DCT3 calcs working well, by add:
char imei[20];
char spcode[10];
char[gid1];
char *a;
char *b;
char *c;
printf("Enter IMEI:\n");
if (fgets(imei,sizeof(imei),stdin)!=NULL);
{
if ((a=strchr(imei,'\n'))!=NULL)
*a='\0';
}
then pass the imei variable to calculation function..
this is working well in dct2/dct3 and vitel algos..
but my problem comes with DCT4 algo..
i am getting some error when compile the source.
i think its cos ASIC is an unsigned character, not just char.
what is best solution for reading in that?
i tried so far:
int asicin;
asicin=getch(stdin); //not working :(
------------------------------
gets() //not working-also overwrite or reads from wrong memory locations :(
please, does someone have this working?
also, i get some problems with sony cmd1 and siemens sources. they do not even compile with out me editing them..
for siemens, i get errors saying there is no ";" on like xxxx.
so i went to line xxx, and there is already ";" there :confused:
ok thx
btw, if u need to get the algos, they are here (http://www.picogsm.co.uk/)
well i started to work on these unlock code generators last nite, they are in C but i onlt familiar with C++
anyway, i got DCT2 and DCT3 calcs working well, by add:
char imei[20];
char spcode[10];
char[gid1];
char *a;
char *b;
char *c;
printf("Enter IMEI:\n");
if (fgets(imei,sizeof(imei),stdin)!=NULL);
{
if ((a=strchr(imei,'\n'))!=NULL)
*a='\0';
}
then pass the imei variable to calculation function..
this is working well in dct2/dct3 and vitel algos..
but my problem comes with DCT4 algo..
i am getting some error when compile the source.
i think its cos ASIC is an unsigned character, not just char.
what is best solution for reading in that?
i tried so far:
int asicin;
asicin=getch(stdin); //not working :(
------------------------------
gets() //not working-also overwrite or reads from wrong memory locations :(
please, does someone have this working?
also, i get some problems with sony cmd1 and siemens sources. they do not even compile with out me editing them..
for siemens, i get errors saying there is no ";" on like xxxx.
so i went to line xxx, and there is already ";" there :confused:
ok thx
btw, if u need to get the algos, they are here (http://www.picogsm.co.uk/)