资源简介
我叫mt online data.dat 解包工具npk,win32版本,
开源代码,https://github.com/lqez/npk
cmake+vs2010编译生成。
使用方法详见blog
http://blog.csdn.net/lady911/article/details/24375017
代码片段和文件信息
#include
#include
#ifdef NPK_DEV
void tea_encode(int* v int* k)
{
unsigned int y=v[0]z=v[1] sum=0 /* set up */
delta=0x9e3779b9 n=32 ; /* a key schedule constant */
while (n-->0) { /* basic cycle start */
sum += delta ;
y += (z<<4)+k[0] ^ z+sum ^ (z>>5)+k[1] ;
z += (y<<4)+k[2] ^ y+sum ^ (y>>5)+k[3] ; /* end cycle */
}
v[0]=y ; v[1]=z ;
}
void tea_encode_byte(char* v int* k off_t p)
{
char y[] = “NpK!TeA“;
*v = *v^y[p]^(char)(k[p%4]%0xFF);
}
void tea_encode_buffer(char* in_buffer off_t in_size int* key int cipherRemains)
{
char *p;
off_t remain = in_size % 8;
off_t align_size = in_size - remain;
for (p = in_buffer; p < in_buffer + align_size; p += 8)
tea_encode( (int*)p key);
if( remain > 0 && cipherRemains )
for (p = in_buffer + align_size; p < in_buffer + in_size; p += 1)
tea_encode_byte( p key --remain );
}
#endif
void tea_decode(int* vint* k)
{
unsigned int n=32 sum y=v[0] z=v[1]
delta=0x9e3779b9 ;
sum=delta<<5 ;
/* start cycle */
while (n-->0) {
z-= (y<<4)+k[2] ^ y+sum ^ (y>>5)+k[3] ;
y-= (z<<4)+k[0] ^ z+sum ^ (z>>5)+k[1] ;
sum-=delta ; }
/* end cycle */
v[0]=y ; v[1]=z ;
}
void tea_decode_byte(char* v int* k off_t p)
{
char y[] = “NpK!TeA“;
*v = *v^(char)(k[p%4]%0xFF)^y[p];
}
void tea_decode_buffer(char* in_buffer off_t in_size int* key int cipherRemains)
{
char *p;
off_t remain = in_size % 8;
off_t align_size = in_size - remain;
for (p = in_buffer; p < in_buffer + align_size; p += 8)
tea_decode( (int*)p key);
if( remain > 0 && cipherRemains )
for (p = in_buffer + align_size; p < in_buffer + in_size; p += 1)
tea_decode_byte( p key --remain );
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
....... 28 2014-01-09 04:32 npk-master\.gitignore
....... 67 2014-01-09 04:32 npk-master\.travis.yml
文件 82 2014-01-09 04:32 npk-master\build.sh
....... 990 2014-01-09 04:32 npk-master\CMakeLists.txt
....... 1998 2014-01-09 04:32 npk-master\libnpk\CMakeLists.txt
....... 1768 2014-01-09 04:32 npk-master\libnpk\external\tea\tea.c
....... 322 2014-01-09 04:32 npk-master\libnpk\external\tea\tea.h
....... 2068 2014-01-09 04:32 npk-master\libnpk\external\xxtea\xxtea.c
....... 317 2014-01-09 04:32 npk-master\libnpk\external\xxtea\xxtea.h
....... 5048 2014-01-09 04:32 npk-master\libnpk\external\zlib\adler32.c
....... 2520 2014-01-09 04:32 npk-master\libnpk\external\zlib\compress.c
....... 13681 2014-01-09 04:32 npk-master\libnpk\external\zlib\crc32.c
....... 30568 2014-01-09 04:32 npk-master\libnpk\external\zlib\crc32.h
....... 67992 2014-01-09 04:32 npk-master\libnpk\external\zlib\deflate.c
....... 12672 2014-01-09 04:32 npk-master\libnpk\external\zlib\deflate.h
....... 22622 2014-01-09 04:32 npk-master\libnpk\external\zlib\infback.c
....... 13439 2014-01-09 04:32 npk-master\libnpk\external\zlib\inffast.c
....... 427 2014-01-09 04:32 npk-master\libnpk\external\zlib\inffast.h
....... 6343 2014-01-09 04:32 npk-master\libnpk\external\zlib\inffixed.h
....... 52623 2014-01-09 04:32 npk-master\libnpk\external\zlib\inflate.c
....... 6399 2014-01-09 04:32 npk-master\libnpk\external\zlib\inflate.h
....... 13769 2014-01-09 04:32 npk-master\libnpk\external\zlib\inftrees.c
....... 2928 2014-01-09 04:32 npk-master\libnpk\external\zlib\inftrees.h
....... 5200 2014-01-09 04:32 npk-master\libnpk\external\zlib\README
....... 45242 2014-01-09 04:32 npk-master\libnpk\external\zlib\trees.c
....... 8472 2014-01-09 04:32 npk-master\libnpk\external\zlib\trees.h
....... 1994 2014-01-09 04:32 npk-master\libnpk\external\zlib\uncompr.c
....... 13360 2014-01-09 04:32 npk-master\libnpk\external\zlib\zconf.h
....... 79564 2014-01-09 04:32 npk-master\libnpk\external\zlib\zlib.h
....... 7313 2014-01-09 04:32 npk-master\libnpk\external\zlib\zutil.c
............此处省略79个文件信息
相关资源
- jxbrowser 所有版本通用的破解包
- Universal Extractor(万能文件解包工具)
- LEDE/OpenWrt解包工具
- mstar-bin-tool-master.rar
- 网络高清机固件WINDOWS下解包封包工具
- mstar系列ROM解包打包工具
- quartus 11.0 破解包 全
- padavan老毛子固件解包修改工具
- 二进制方式打包和解包文件
- RPG解包器 Rgss_Extract
- 凤凰模拟器破解包
- quartus14.1破解包
- 路由器trx固件修改打包解包工具
- Enigma解包工具
- UnityStudio(AssetStudio)X64.v0.10.0.69中文
- 解包exe文件
- DevExpress11.2.7控件+破解包
- 解包打包工具xtemp.exe
- payload.bin解包
- 简单明了的网络数据封包解包
- genymotion 2.8.0 mac 破解包
- 适用于Amlogic芯片方案的boot.img解包和
- 解包rez,提取dtx
- 晶晨线刷固件解包打包.zip
- Tecnomatix Plant Simulation 8.2破解教程以及
- MyEclipse_10破解包
- ads2008破解包
- altium designer9破解包
- Wise+Installation 打包,解包
- MyEclipse9.0破解包+汉化包+图文破解+图
评论
共有 条评论