PDA

View Full Version : unlock code algos...



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/)

pico
22-03-2005, 01:14 AM
ok,
i have been working on this for almost last 24 hours none stop (few hours sleep between days..)..

i tihnk, there is big problem with this dct4_new source code and also dct4.c (old version) which are on indear site.

only time it will compile and run, is when not edited.

it will go away and calculate codes based on hardcoded imei,asic,sp code, box serial.

these codes generated are wrong!!!

i compare to nfree calc. completely different!

the hardcoded box serial in source is: 034144
i extract box number from the result of unmodified source and its: 41440

see the difference?

i tell u, there is biiiiiiiiiiiiiiiig problem with these sources..

anyone have working source for dct4 calc plz?

indear
22-03-2005, 11:48 AM
Using original code


[11:22:43/0][indear@eis:~/nokia]$ ls
[11:22:44/0][indear@eis:~/nokia]$ wget http://www.geocities.com/indearcito/dct4.c
--11:22:50-- http://www.geocities.com/indearcito/dct4.c
=> `dct4.c'
Resolviendo www.geocities.com... hecho.
Conectando con www.geocities.com[66.218.77.68]:80... conectado.
Petición HTTP enviada, esperando respuesta... 200 OK
Longitud: 19,799 [text/plain]

100%[====================================>] 19,799 41.58K/s ETA 00:00

11:22:51 (41.58 KB/s) - `dct4.c' guardado [19799/19799]

[11:22:51/0][indear@eis:~/nokia]$ wget http://www.geocities.com/indearcito/dct4_new.c
--11:22:54-- http://www.geocities.com/indearcito/dct4_new.c
=> `dct4_new.c'
Resolviendo www.geocities.com... hecho.
Conectando con www.geocities.com[66.218.77.68]:80... conectado.
Petición HTTP enviada, esperando respuesta... 200 OK
Longitud: 14,232 [application/octet-stream]

100%[====================================>] 14,232 9.54K/s ETA 00:00

11:22:58 (9.54 KB/s) - `dct4_new.c' guardado [14232/14232]

[11:22:58/0][indear@eis:~/nokia]$ gcc dct4.c -o dct4
dct4.c: En la función `main':
dct4.c:470: aviso: el tipo de devolución de `main' no es `int'
dct4.c:489:2: aviso: no hay caractér de fin de línea al final del fichero
[11:23:04/0][indear@eis:~/nokia]$ gcc dct4_new.c -o dct4_new
dct4_new.c: En la función `calculo':
dct4_new.c:373: aviso: comparison is always true due to limited range of data type
dct4_new.c: En la función `main':
dct4_new.c:412: aviso: el tipo de devolución de `main' no es `int'
dct4_new.c:421:2: aviso: no hay caractér de fin de línea al final del fichero
[11:23:11/0][indear@eis:~/nokia]$ ./dct4
#pw+970172216175514+1#
#pw+460197404135236+2#
#pw+872201214336141+3#
#pw+874231616536777+4#
#pw+481997225213535+5#
#pw+282215726346556+6#
#pw+079673415040313+7#


#pw+032933377323076+1#
#pw+874921012523467+2#
#pw+016823651772160+3#
#pw+166164706745403+4#
#pw+314886257552324+5#
#pw+406217146766453+6#
#pw+273925311423063+7#
[11:23:14/0][indear@eis:~/nokia]$ ./dct4_new
#pw+970172216175514+1#
#pw+460197404135236+2#
#pw+872201214336141+3#
#pw+874231616536777+4#
#pw+481997225213535+5#
#pw+282215726346556+6#
#pw+079673415040313+7#
[11:23:16/0][indear@eis:~/nokia]$


works fine :)
zip file include 2 dct4 calc (using dct4_new & dct4), only change main function
(box serial parameter in calcs => 5 digit only!)

pico
22-03-2005, 04:47 PM
too late to see this post..

made it to work finally,

used strncat to add a zero to start of box serial (your source only works with 6 digit box, starting with 0)

used switch/case to set asic type cos getch/fgets/scanf wasnt working well

remember to remove '\n' from ends of all input strings..

:cool: