summaryrefslogtreecommitdiffstats
path: root/utils/zenutils/source
diff options
context:
space:
mode:
authorMaurus Cuelenaere <mcuelenaere@gmail.com>2008-09-14 11:20:29 +0000
committerMaurus Cuelenaere <mcuelenaere@gmail.com>2008-09-14 11:20:29 +0000
commite3f1a3f33ef2e0a1a5aaf6368fc79b7e4cae0d2b (patch)
tree02e58e9d78a39f89f1ae9b1eef2840ec736403c9 /utils/zenutils/source
parent6938083e4f45164c20d5c081839f37635cbcd6cd (diff)
downloadrockbox-e3f1a3f33ef2e0a1a5aaf6368fc79b7e4cae0d2b.tar.gz
rockbox-e3f1a3f33ef2e0a1a5aaf6368fc79b7e4cae0d2b.tar.bz2
rockbox-e3f1a3f33ef2e0a1a5aaf6368fc79b7e4cae0d2b.zip
ZenUtils:
* Add support for ZEN Mozaic * Add checking for valid FRESC when decrypting git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18511 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/zenutils/source')
-rw-r--r--utils/zenutils/source/zen_crypt/main.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/utils/zenutils/source/zen_crypt/main.cpp b/utils/zenutils/source/zen_crypt/main.cpp
index 3442baf738..29f0a843ae 100644
--- a/utils/zenutils/source/zen_crypt/main.cpp
+++ b/utils/zenutils/source/zen_crypt/main.cpp
@@ -74,6 +74,8 @@ static const char tl_zen_key[] = "1sN0TM3D az u~may th1nk*"
"Creative ZEN";
static const char tl_zenxf_key[] = "1sN0TM3D az u~may th1nk*"
"Creative ZEN X-Fi";
+static const char tl_zenmo_key[] = "1sN0TM3D az u~may th1nk*"
+ "Creative ZEN Mozaic";
static const char tl_zv_key[] = "1sN0TM3D az u~may th1nk*"
"Creative Zen Vision";
static const char tl_zvw_key[] = "1sN0TM3D az u~may th1nk*"
@@ -102,6 +104,7 @@ player_info_t players[] = {
{"Zen Vision:M 60GB", null_key_v2, fresc_key_v1, tl_zvm60_key, false},
{"ZEN", null_key_v4, fresc_key_v2, tl_zen_key, false},
{"ZEN X-Fi", null_key_v4, fresc_key_v2, tl_zenxf_key, false},
+ {"ZEN Mozaic", null_key_v4, fresc_key_v2, tl_zenmo_key, false},
{"Zen Vision", null_key_v2, fresc_key_v1, tl_zv_key, false},
{"Zen Vision W", null_key_v2, fresc_key_v1, tl_zvw_key, false},
{"Zen Micro", null_key_v1, fresc_key_v1, tl_zm_key, true},
@@ -494,6 +497,13 @@ bool decrypt(shared::bytes& data, int mode, player_info_t* pi,
std::cerr << "Failed to decrypt the input file." << std::endl;
return false;
}
+
+ if (*(dword*)&data[0] != 'EDOC' &&
+ *(dword*)&data[0] != 'CODE')
+ {
+ std::cerr << "Failed to decode the input file." << std::endl;
+ return false;
+ }
if (verbose)
std::cout << "[*] Writing file data..." << std::endl;