Thread: Serial number.
View Single Post
Old 04-08-2016, 09:43 AM   #21
geekmaster
Carpe diem, c'est la vie.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,433
Karma: 10773670
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
Okay, this is weird. The kindletool source code writes the kindle serial number to a temp file WITH NEWLINE (which varies between linux and Windows boxen):
PHP Code:
fprintf(temp"%s\n"serial_no) ...
if(
md5_sum(tempmd5) ... 
But that makes me wonder how the md5 could EVER be correct, if it always includes a '\n' newline (either LF, or CR/LF, depending on OS). It seems "more better" to just calc md5 of the string instead of a file (especially with that newline)...

EDIT: Or for a quick-and-dirty fix, just leave out the newline? For example, fprintf(temp, "%s", serial_no) ...

Last edited by geekmaster; 04-08-2016 at 09:51 AM.
geekmaster is offline   Reply With Quote