Restructure repository to include all source folders
Move git root from Client/ to src/ to track all source code: - Client: Game client source (moved to Client/Client/) - Server: Game server source - GameTools: Development tools - CryptoSource: Encryption utilities - database: Database scripts - Script: Game scripts - rylCoder_16.02.2008_src: Legacy coder tools - GMFont, Game: Additional resources 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
284
Server/ToolProject/PacketDecoder/BinaryTree.h
Normal file
284
Server/ToolProject/PacketDecoder/BinaryTree.h
Normal file
@@ -0,0 +1,284 @@
|
||||
// BinaryTree.h: interface for the CBinaryTree template.
|
||||
// Inventor Name: Hatem Mostafa
|
||||
// Created: 18/1/2003
|
||||
// Modified: 20/12/2004
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
|
||||
#include <vector>
|
||||
using namespace std;
|
||||
|
||||
#define TREENODE CBinaryTreeNode<KEY, DATA>
|
||||
#define LEFT Childs[0]
|
||||
#define RIGHT Childs[1]
|
||||
|
||||
template <class KEY, class DATA> class CBinaryTreeNode
|
||||
{
|
||||
public:
|
||||
CBinaryTreeNode()
|
||||
{
|
||||
Parent = LEFT = RIGHT = NULL;
|
||||
Count = ID = 0;
|
||||
ArrayEqualIDs = NULL;
|
||||
}
|
||||
~CBinaryTreeNode()
|
||||
{
|
||||
if(ArrayEqualIDs)
|
||||
delete ArrayEqualIDs;
|
||||
}
|
||||
public:
|
||||
// node parent, left, right respectively
|
||||
TREENODE *Parent, *Childs[2];
|
||||
// node key
|
||||
KEY Key;
|
||||
// node data
|
||||
DATA Data;
|
||||
// node repetition count
|
||||
int Count;
|
||||
// node ID
|
||||
int ID;
|
||||
// node repeated keys' IDs
|
||||
vector<int> *ArrayEqualIDs;
|
||||
const TREENODE& operator=(const TREENODE& node)
|
||||
{
|
||||
Key = node.Key;
|
||||
Data = node.Data;
|
||||
Count = node.Count;
|
||||
ID = node.ID;
|
||||
if(node.ArrayEqualIDs)
|
||||
{
|
||||
if(ArrayEqualIDs == NULL)
|
||||
ArrayEqualIDs = new vector<int>;
|
||||
*ArrayEqualIDs = *node.ArrayEqualIDs;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
template <class KEY, class ARG_KEY, class DATA, class ARG_DATA> class CBinaryTree
|
||||
{
|
||||
public:
|
||||
CBinaryTree()
|
||||
{
|
||||
Root = Nil = NULL;
|
||||
Count = Serial = 0;
|
||||
Modified = NoRepeat = false;
|
||||
}
|
||||
~CBinaryTree()
|
||||
{
|
||||
RemoveAll();
|
||||
}
|
||||
public:
|
||||
// tree root node
|
||||
TREENODE* Root, * Nil;
|
||||
// tree nodes count
|
||||
int Count, Serial;
|
||||
// flag to indicate if the tree is modified or not
|
||||
bool Modified;
|
||||
// ignore repeated keys in the Add function
|
||||
bool NoRepeat;
|
||||
|
||||
// return tree nodes count
|
||||
inline int GetCount() const { return Count; }
|
||||
// check if the tree is empty or not
|
||||
inline bool IsEmpty() const { return Count == 0; }
|
||||
// remove all tree nodes
|
||||
void RemoveAll()
|
||||
{
|
||||
TREENODE *node = Root, *pTemp;
|
||||
while(node != Nil)
|
||||
{
|
||||
// check for left child
|
||||
if(node->LEFT != Nil)
|
||||
node = node->LEFT;
|
||||
// check for right child
|
||||
else if(node->RIGHT != Nil)
|
||||
node = node->RIGHT;
|
||||
else // node has no childs
|
||||
{ // save node pointer
|
||||
pTemp = node;
|
||||
// set node pointer at its parent to NULL
|
||||
if(node->Parent != Nil)
|
||||
node->Parent->Childs[node != node->Parent->LEFT] = Nil;
|
||||
// update pointer node to its parent
|
||||
node = node->Parent;
|
||||
// delete the saved node
|
||||
delete pTemp;
|
||||
}
|
||||
}
|
||||
Count = Serial = 0;
|
||||
Root = Nil;
|
||||
Modified = false;
|
||||
}
|
||||
// insert key in the tree
|
||||
inline TREENODE* Insert(ARG_KEY key, int nID = -1, TREENODE* node = NULL)
|
||||
{
|
||||
if(Root == Nil)
|
||||
{
|
||||
Root = NewNode();
|
||||
node = Root;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(node == NULL)
|
||||
node = Root;
|
||||
int nResult;
|
||||
while(true)
|
||||
{
|
||||
nResult = node->Key.compare(key);
|
||||
if(nResult == 0)
|
||||
{
|
||||
node->Count++;
|
||||
if(NoRepeat == false)
|
||||
{
|
||||
if(node->ArrayEqualIDs == NULL)
|
||||
node->ArrayEqualIDs = new vector<int>;
|
||||
node->ArrayEqualIDs->push_back(nID == -1 ? Serial : nID);
|
||||
Serial++;
|
||||
Count++;
|
||||
}
|
||||
return node;
|
||||
}
|
||||
nResult = nResult > 0 ? 0 : 1;
|
||||
if(node->Childs[nResult] == Nil)
|
||||
{
|
||||
node->Childs[nResult] = NewNode();
|
||||
node->Childs[nResult]->Parent = node;
|
||||
node = node->Childs[nResult];
|
||||
break;
|
||||
}
|
||||
node = node->Childs[nResult];
|
||||
}
|
||||
}
|
||||
node->Key = key;
|
||||
node->ID = nID == -1 ? Serial : nID;
|
||||
Serial++;
|
||||
Count++;
|
||||
node->Count++;
|
||||
Modified = true;
|
||||
|
||||
return node;
|
||||
}
|
||||
// search for a key in the tree
|
||||
inline TREENODE* Search(ARG_KEY key, TREENODE* node = NULL) const
|
||||
{
|
||||
if(node == NULL)
|
||||
node = Root;
|
||||
int nResult;
|
||||
while(node != Nil && (nResult = node->Key.compare(key)) != 0)
|
||||
node = node->Childs[nResult < 0];
|
||||
return node == Nil ? NULL : node;
|
||||
}
|
||||
// return minimum key in the tree
|
||||
TREENODE* Min(TREENODE* node) const
|
||||
{
|
||||
// iterate in the left branch
|
||||
while(node != Nil && node->LEFT != Nil)
|
||||
node = node->LEFT;
|
||||
return node;
|
||||
}
|
||||
// return maximum key in the tree
|
||||
TREENODE* Max(TREENODE* node) const
|
||||
{
|
||||
// iterate in the right branch
|
||||
while(node != Nil && node->RIGHT != Nil)
|
||||
node = node->RIGHT;
|
||||
return node;
|
||||
}
|
||||
// return node successor
|
||||
TREENODE* Successor(TREENODE* node) const
|
||||
{
|
||||
// return the left most node in the right subtree
|
||||
if(node->RIGHT != Nil)
|
||||
return Min(node->RIGHT);
|
||||
// go up from node until we find a node that is the left of its parent
|
||||
TREENODE* Parent = node->Parent;
|
||||
while(Parent != Nil && node == Parent->RIGHT)
|
||||
{
|
||||
node = Parent;
|
||||
Parent = node->Parent;
|
||||
}
|
||||
return Parent;
|
||||
}
|
||||
// return node predecessor
|
||||
TREENODE* Predecessor(TREENODE* node) const
|
||||
{
|
||||
// return the right most node in the left subtree
|
||||
if(node->LEFT != Nil)
|
||||
return Max(node->LEFT);
|
||||
// go up from node until we find a node that is the right of its parent
|
||||
TREENODE* Parent = node->Parent;
|
||||
while(Parent != Nil && node == Parent->LEFT)
|
||||
{
|
||||
node = Parent;
|
||||
Parent = node->Parent;
|
||||
}
|
||||
return Parent;
|
||||
}
|
||||
|
||||
// delete node
|
||||
// 1- node has no child, remove it
|
||||
// 2- node has one child, splice it (connect its parent and child)
|
||||
// 3- node has two childs, splice its successor and put it in its place
|
||||
void Delete(TREENODE* node)
|
||||
{
|
||||
TREENODE *pSplice = (node->LEFT == Nil || node->RIGHT == Nil)?node:Successor(node);
|
||||
TREENODE *pChild = pSplice->Childs[pSplice->LEFT == Nil];
|
||||
// connect child to spliced node parent
|
||||
if(pChild != Nil)
|
||||
pChild->Parent = pSplice->Parent;
|
||||
// connect spliced node parent to child
|
||||
if(pSplice->Parent == Nil)
|
||||
Root = pChild;
|
||||
else
|
||||
pSplice->Parent->Childs[pSplice != pSplice->Parent->LEFT] = pChild;
|
||||
// put spliced node in place of node (if required)
|
||||
if(pSplice != node)
|
||||
{ // copy spliced node
|
||||
*node = *pSplice;
|
||||
// delete the spliced node
|
||||
delete pSplice;
|
||||
}
|
||||
else
|
||||
// delete the node
|
||||
delete node;
|
||||
Count--;
|
||||
}
|
||||
|
||||
// save all tree nodes in a vector of integers
|
||||
void Save(vector<int> &nArraySort, bool bAscending = true, bool (* lpfn)(int, int) = NULL)
|
||||
{
|
||||
nArraySort.resize(Count);
|
||||
int nIndex = 0, *pArray = &*nArraySort.begin();
|
||||
|
||||
TREENODE* node = bAscending ? Min(Root) : Max(Root);
|
||||
while(node != Nil)
|
||||
{
|
||||
if(lpfn)
|
||||
(*lpfn)(nIndex++, Count);
|
||||
SaveNode(node, pArray);
|
||||
node = bAscending ? Successor(node) : Predecessor(node);
|
||||
}
|
||||
Modified = false;
|
||||
}
|
||||
// add one node to a vector of integers
|
||||
void SaveNode(TREENODE* node, int*& pArray)
|
||||
{
|
||||
*pArray++ = node->ID;
|
||||
if(node->ArrayEqualIDs)
|
||||
{
|
||||
memcpy(pArray, &*node->ArrayEqualIDs->begin(), node->ArrayEqualIDs->size()*sizeof(int));
|
||||
pArray += node->ArrayEqualIDs->size();
|
||||
}
|
||||
}
|
||||
protected:
|
||||
virtual TREENODE* NewNode()
|
||||
{
|
||||
return new TREENODE();
|
||||
}
|
||||
};
|
||||
|
||||
56
Server/ToolProject/PacketDecoder/FindFFEdit.cpp
Normal file
56
Server/ToolProject/PacketDecoder/FindFFEdit.cpp
Normal file
@@ -0,0 +1,56 @@
|
||||
// FindFFEdit.cpp : <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "PacketDecoder.h"
|
||||
#include "FindFFEdit.h"
|
||||
#include ".\findffedit.h"
|
||||
|
||||
|
||||
// CFindFFEdit
|
||||
|
||||
IMPLEMENT_DYNAMIC(CFindFFEdit, CEdit)
|
||||
CFindFFEdit::CFindFFEdit()
|
||||
{
|
||||
}
|
||||
|
||||
CFindFFEdit::~CFindFFEdit()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
BEGIN_MESSAGE_MAP(CFindFFEdit, CEdit)
|
||||
ON_WM_KEYDOWN()
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
|
||||
// CFindFFEdit <20><EFBFBD><DEBD><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
|
||||
|
||||
void CFindFFEdit::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
|
||||
{
|
||||
// TODO: <20><><EFBFBD> <20><EFBFBD><DEBD><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD> <20>ڵ带 <20>߰<EFBFBD> <20><>/<2F>Ǵ<EFBFBD> <20>⺻<EFBFBD><E2BABB><EFBFBD><EFBFBD> ȣ<><C8A3><EFBFBD>մϴ<D5B4>.
|
||||
|
||||
if (nChar == VK_F3)
|
||||
{
|
||||
CString szContents;
|
||||
GetWindowText(szContents);
|
||||
|
||||
szContents.MakeUpper();
|
||||
|
||||
int nFoundPos = szContents.Find(_T("FF"), LOWORD(CharFromPos(GetCaretPos())));
|
||||
if (-1 == nFoundPos)
|
||||
{
|
||||
SetSel(0, 0);
|
||||
nFoundPos = szContents.Find(_T("FF"), LOWORD(CharFromPos(GetCaretPos())));
|
||||
}
|
||||
|
||||
if (0 <= nFoundPos)
|
||||
{
|
||||
SetSel(nFoundPos, nFoundPos + 2);
|
||||
}
|
||||
}
|
||||
|
||||
CEdit::OnKeyDown(nChar, nRepCnt, nFlags);
|
||||
}
|
||||
22
Server/ToolProject/PacketDecoder/FindFFEdit.h
Normal file
22
Server/ToolProject/PacketDecoder/FindFFEdit.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
// CFindFFEdit
|
||||
|
||||
class CFindFFEdit : public CEdit
|
||||
{
|
||||
DECLARE_DYNAMIC(CFindFFEdit)
|
||||
|
||||
public:
|
||||
CFindFFEdit();
|
||||
virtual ~CFindFFEdit();
|
||||
|
||||
protected:
|
||||
DECLARE_MESSAGE_MAP()
|
||||
|
||||
private:
|
||||
|
||||
afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
|
||||
};
|
||||
|
||||
|
||||
184
Server/ToolProject/PacketDecoder/Huffman.cpp
Normal file
184
Server/ToolProject/PacketDecoder/Huffman.cpp
Normal file
@@ -0,0 +1,184 @@
|
||||
// Huffman.cpp: implementation of the Huffman class.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "stdafx.h"
|
||||
#include <stdlib.h>
|
||||
#include <malloc.h>
|
||||
|
||||
#ifdef _DEBUG
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[]=__FILE__;
|
||||
#endif
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
class CHuffmanNode
|
||||
{
|
||||
public:
|
||||
CHuffmanNode() { memset(this, 0, sizeof(CHuffmanNode)); }
|
||||
|
||||
int nFrequency; // must be first for byte align
|
||||
BYTE byAscii;
|
||||
DWORD dwCode;
|
||||
int nCodeLength;
|
||||
CHuffmanNode *pParent, *pLeft, *pRight;
|
||||
};
|
||||
|
||||
int __cdecl frequencyCompare(const void *elem1, const void *elem2 )
|
||||
{
|
||||
CHuffmanNode *pNodes[2] = { (CHuffmanNode*)elem1, (CHuffmanNode*)elem2 };
|
||||
if(pNodes[0]->nFrequency == pNodes[1]->nFrequency)
|
||||
return 0;
|
||||
return pNodes[0]->nFrequency < pNodes[1]->nFrequency ? 1 : -1;
|
||||
}
|
||||
|
||||
int __cdecl asciiCompare(const void *elem1, const void *elem2 )
|
||||
{
|
||||
return ((CHuffmanNode*)elem1)->byAscii > ((CHuffmanNode*)elem2)->byAscii ? 1 : -1;
|
||||
}
|
||||
|
||||
CHuffmanNode* PopNode(CHuffmanNode *pNodes[], int nIndex, bool bRight)
|
||||
{
|
||||
CHuffmanNode* pNode = pNodes[nIndex];
|
||||
pNode->dwCode = bRight;
|
||||
pNode->nCodeLength = 1;
|
||||
return pNode;
|
||||
}
|
||||
|
||||
void SetNodeCode(CHuffmanNode* pNode)
|
||||
{
|
||||
CHuffmanNode* pParent = pNode->pParent;
|
||||
while(pParent && pParent->nCodeLength)
|
||||
{
|
||||
pNode->dwCode <<= 1;
|
||||
pNode->dwCode |= pParent->dwCode;
|
||||
pNode->nCodeLength++;
|
||||
pParent = pParent->pParent;
|
||||
}
|
||||
}
|
||||
|
||||
int GetHuffmanTree(CHuffmanNode nodes[], bool bSetCodes = true)
|
||||
{
|
||||
CHuffmanNode* pNodes[256], *pNode;
|
||||
// add used ascii to Huffman queue
|
||||
int nNodeCount = 0;
|
||||
for(int nCount = 0; nCount < 256 && nodes[nCount].nFrequency; nCount++)
|
||||
pNodes[nNodeCount++] = &nodes[nCount];
|
||||
int nParentNode = nNodeCount, nBackNode = nNodeCount-1;
|
||||
while(nBackNode > 0)
|
||||
{
|
||||
// parent node
|
||||
pNode = &nodes[nParentNode++];
|
||||
// pop first child
|
||||
pNode->pLeft = PopNode(pNodes, nBackNode--, false);
|
||||
// pop second child
|
||||
pNode->pRight = PopNode(pNodes, nBackNode--, true);
|
||||
// adjust parent of the two poped nodes
|
||||
pNode->pLeft->pParent = pNode->pRight->pParent = pNode;
|
||||
// adjust parent frequency
|
||||
pNode->nFrequency = pNode->pLeft->nFrequency + pNode->pRight->nFrequency;
|
||||
// insert parent node depending on its frequency
|
||||
for(int i = nBackNode; i >= 0; i--)
|
||||
if(pNodes[i]->nFrequency >= pNode->nFrequency)
|
||||
break;
|
||||
memmove(pNodes+i+2, pNodes+i+1, (nBackNode-i)*sizeof(int));
|
||||
pNodes[i+1] = pNode;
|
||||
nBackNode++;
|
||||
}
|
||||
// set tree leaves nodes code
|
||||
if(bSetCodes)
|
||||
for(nCount = 0; nCount < nNodeCount; nCount++)
|
||||
SetNodeCode(&nodes[nCount]);
|
||||
|
||||
return nNodeCount;
|
||||
}
|
||||
|
||||
bool CompressHuffman(BYTE *pSrc, int nSrcLen, BYTE *&pDes, int &nDesLen)
|
||||
{
|
||||
CHuffmanNode nodes[511];
|
||||
// initialize nodes ascii
|
||||
for(int nCount = 0; nCount < 256; nCount++)
|
||||
nodes[nCount].byAscii = nCount;
|
||||
// get ascii frequencies
|
||||
for(nCount = 0; nCount < nSrcLen; nCount++)
|
||||
nodes[pSrc[nCount]].nFrequency++;
|
||||
// sort ascii chars depending on frequency
|
||||
qsort(nodes, 256, sizeof(CHuffmanNode), frequencyCompare);
|
||||
// construct Huffman tree
|
||||
int nNodeCount = GetHuffmanTree(nodes);
|
||||
// construct compressed buffer
|
||||
int nNodeSize = sizeof(DWORD)+sizeof(BYTE);
|
||||
nDesLen = nSrcLen+nNodeCount*nNodeSize;
|
||||
pDes = (BYTE*)malloc(nDesLen);
|
||||
BYTE *pDesPtr = pDes;
|
||||
memset(pDesPtr, 0, nDesLen);
|
||||
// save source buffer length at the first DWORD
|
||||
*(DWORD*)pDesPtr = nSrcLen;
|
||||
pDesPtr += sizeof(DWORD);
|
||||
// save Huffman tree leaves count-1 (as it may be 256)
|
||||
*pDesPtr = nNodeCount-1;
|
||||
pDesPtr += sizeof(BYTE);
|
||||
// save Huffman tree used leaves nodes
|
||||
for(nCount = 0; nCount < nNodeCount; nCount++)
|
||||
{ // the array sorted on frequency so used nodes come first
|
||||
memcpy(pDesPtr, &nodes[nCount], nNodeSize);
|
||||
pDesPtr += nNodeSize;
|
||||
}
|
||||
// sort nodes depending on ascii to can index nodes with its ascii value
|
||||
qsort(nodes, 256, sizeof(CHuffmanNode), asciiCompare);
|
||||
|
||||
int nDesIndex = 0;
|
||||
// loop to write codes
|
||||
for(nCount = 0; nCount < nSrcLen; nCount++)
|
||||
{
|
||||
*(DWORD*)(pDesPtr+(nDesIndex>>3)) |= nodes[pSrc[nCount]].dwCode << (nDesIndex&7);
|
||||
nDesIndex += nodes[pSrc[nCount]].nCodeLength;
|
||||
}
|
||||
// update destination length
|
||||
nDesLen = (pDesPtr-pDes)+(nDesIndex+7)/8;
|
||||
pDes = (BYTE*)realloc(pDes, nDesLen);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DecompressHuffman(BYTE *pSrc, int nSrcLen, BYTE *&pDes, int &nDesLen)
|
||||
{
|
||||
// copy destination final length
|
||||
nDesLen = *(DWORD*)pSrc;
|
||||
// allocate buffer for decompressed buffer
|
||||
pDes = (BYTE*)malloc(nDesLen+1);
|
||||
int nNodeCount = *(pSrc+sizeof(DWORD))+1;
|
||||
// initialize Huffman nodes with frequency and ascii
|
||||
CHuffmanNode nodes[511], *pNode;
|
||||
int nNodeSize = sizeof(DWORD)+sizeof(BYTE), nSrcIndex = nNodeSize;
|
||||
for(int nCount = 0; nCount < nNodeCount; nCount++)
|
||||
{
|
||||
memcpy(&nodes[nCount], pSrc+nSrcIndex, nNodeSize);
|
||||
nSrcIndex += nNodeSize;
|
||||
}
|
||||
// construct Huffman tree
|
||||
GetHuffmanTree(nodes, false);
|
||||
// get Huffman tree root
|
||||
CHuffmanNode *pRoot = &nodes[0];
|
||||
while(pRoot->pParent)
|
||||
pRoot = pRoot->pParent;
|
||||
|
||||
int nDesIndex = 0;
|
||||
DWORD nCode;
|
||||
nSrcIndex <<= 3; // convert from bits to bytes
|
||||
while(nDesIndex < nDesLen)
|
||||
{
|
||||
nCode = (*(DWORD*)(pSrc+(nSrcIndex>>3)))>>(nSrcIndex&7);
|
||||
pNode = pRoot;
|
||||
while(pNode->pLeft) // if node has pLeft then it must has pRight
|
||||
{ // node not leaf
|
||||
pNode = (nCode&1) ? pNode->pRight : pNode->pLeft;
|
||||
nCode >>= 1;
|
||||
nSrcIndex++;
|
||||
}
|
||||
pDes[nDesIndex++] = pNode->byAscii;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
11
Server/ToolProject/PacketDecoder/Huffman.h
Normal file
11
Server/ToolProject/PacketDecoder/Huffman.h
Normal file
@@ -0,0 +1,11 @@
|
||||
// Huffman.h
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if !defined(__HUFFMAN_COMPRESS_H__)
|
||||
#define __HUFFMAN_COMPRESS_H__
|
||||
|
||||
bool CompressHuffman(BYTE *pSrc, int nSrcLen, BYTE *&pDes, int &nDesLen);
|
||||
bool DecompressHuffman(BYTE *pSrc, int nSrcLen, BYTE *&pDes, int &nDesLen);
|
||||
|
||||
#endif __HUFFMAN_COMPRESS_H__
|
||||
146
Server/ToolProject/PacketDecoder/LZW.cpp
Normal file
146
Server/ToolProject/PacketDecoder/LZW.cpp
Normal file
@@ -0,0 +1,146 @@
|
||||
// LZW.cpp: implementation of the LZW class.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "BinaryTree.h"
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
class CBuffer
|
||||
{
|
||||
public:
|
||||
CBuffer() {}
|
||||
CBuffer(BYTE* pBuffer, int nLength) { m_pBuffer = pBuffer, m_nLength = nLength; }
|
||||
CBuffer(const CBuffer& buffer) { *this = buffer; }
|
||||
|
||||
public:
|
||||
BYTE* m_pBuffer;
|
||||
int m_nLength;
|
||||
inline int compare(const CBuffer* buffer)
|
||||
{
|
||||
int nResult = memcmp(m_pBuffer, buffer->m_pBuffer, min(m_nLength, buffer->m_nLength));
|
||||
if(nResult != 0 || m_nLength == buffer->m_nLength)
|
||||
return nResult;
|
||||
return m_nLength > buffer->m_nLength ? 1 : -1;
|
||||
}
|
||||
inline void operator=(const CBuffer* buffer) { m_pBuffer = buffer->m_pBuffer; m_nLength = buffer->m_nLength; }
|
||||
};
|
||||
|
||||
bool CompressLZW(BYTE *pSrc, int nSrcLen, BYTE *&pDes, int &nDesLen, int nBitsPerSample)
|
||||
{
|
||||
nDesLen = (sizeof(DWORD)+1)<<3;
|
||||
// allocate buffer for destination buffer
|
||||
pDes = (BYTE*)malloc(nSrcLen*2);
|
||||
memset(pDes, 0, nSrcLen*2);
|
||||
// save source buffer length at the first DWORD
|
||||
*(DWORD*)pDes = nSrcLen;
|
||||
*(pDes+sizeof(DWORD)) = nBitsPerSample;
|
||||
int nSample = *pSrc;
|
||||
int nMaxSamples = 1 << nBitsPerSample;
|
||||
// dictionary hash table
|
||||
CBinaryTree<CBuffer, CBuffer*, int, int> dictionary;
|
||||
dictionary.NoRepeat = true;
|
||||
// keep first 256 IDs for ascii Samples
|
||||
dictionary.Serial = 256;
|
||||
// tree node to keep last success search to start with
|
||||
CBinaryTreeNode<CBuffer, int>* pNode = dictionary.Root;
|
||||
// left dictionary Samples points to the source buffer
|
||||
CBuffer node(pSrc, 2);
|
||||
// scan the input buffer
|
||||
while(nSrcLen-- > 0)
|
||||
{
|
||||
if(dictionary.Serial == nMaxSamples)
|
||||
{
|
||||
dictionary.RemoveAll();
|
||||
dictionary.Serial = 256;
|
||||
}
|
||||
pNode = dictionary.Insert(&node, -1, pNode);
|
||||
if(pNode->Count > 1)
|
||||
// (repeated Sample), save success Sample to be used next fail
|
||||
nSample = pNode->ID, node.m_nLength++;
|
||||
else
|
||||
{ // write last success Sample
|
||||
*(DWORD*)(pDes+(nDesLen>>3)) |= nSample << (nDesLen&7);
|
||||
nDesLen += nBitsPerSample;
|
||||
// initialize node to next Sample
|
||||
node.m_pBuffer += node.m_nLength-1;
|
||||
node.m_nLength = 2;
|
||||
// copy first byte of the node as a new Sample
|
||||
nSample = *node.m_pBuffer;
|
||||
// initialize search root
|
||||
pNode = dictionary.Root;
|
||||
}
|
||||
}
|
||||
nDesLen = (nDesLen+7)/8;
|
||||
pDes = (BYTE*)realloc(pDes, nDesLen);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void ClearDictionary(vector<CBuffer *>& dictionary)
|
||||
{
|
||||
for(vector<CBuffer*>::iterator i = dictionary.begin(); i != dictionary.end(); i++)
|
||||
delete (*i);
|
||||
dictionary.clear();
|
||||
}
|
||||
|
||||
bool DecompressLZW(BYTE *pSrc, int nSrcLen, BYTE *&pDes, int &nDesLen)
|
||||
{ // first two DWORDS (final buffer length, Samples sizes bitmap buffer start)
|
||||
// copy destination final length
|
||||
nDesLen = *(DWORD*)pSrc;
|
||||
// copy bits pre Sample
|
||||
int nBitsPerSample = *(pSrc+sizeof(DWORD));
|
||||
// allocate buffer for decompressed buffer
|
||||
pDes = (BYTE*)malloc(nDesLen+1);
|
||||
// copy first char from source to destination
|
||||
*pDes = *(pSrc+sizeof(DWORD)+1);
|
||||
int nMaxSamples = 1 << nBitsPerSample;
|
||||
int nSample, nSrcIndex = ((sizeof(DWORD)+1)<<3) + nBitsPerSample;
|
||||
// dictionary array
|
||||
vector<CBuffer *> dictionary;
|
||||
// let dictionary Samples points to the destination buffer
|
||||
CBuffer node(pDes, 2), *pNodeSample;
|
||||
int nDesIndex = 1, nDesIndexSave, nSampleLen;
|
||||
|
||||
while(nDesIndex < nDesLen)
|
||||
{
|
||||
nSample = (*(DWORD*)(pSrc+(nSrcIndex>>3)))>>(nSrcIndex&7) & (nMaxSamples-1);
|
||||
nSrcIndex += nBitsPerSample;
|
||||
|
||||
if(dictionary.size() == nMaxSamples-256)
|
||||
ClearDictionary(dictionary);
|
||||
|
||||
if(nSample >= 256)
|
||||
if(nSample-256 < (int)dictionary.size())
|
||||
{ // normal case, valid dictionary Sample
|
||||
nDesIndexSave = nDesIndex;
|
||||
pNodeSample = dictionary.at(nSample-256);
|
||||
nSampleLen = pNodeSample->m_nLength+1;
|
||||
// copy dictionary node buffer to decompressed buffer
|
||||
memcpy(pDes+nDesIndex, pNodeSample->m_pBuffer, pNodeSample->m_nLength);
|
||||
nDesIndex += pNodeSample->m_nLength;
|
||||
}
|
||||
else
|
||||
{ // out of range Sample
|
||||
nSampleLen = nDesIndex-nDesIndexSave+2;
|
||||
// copy previous decompressed Sample as a new one + ...
|
||||
memcpy(pDes+nDesIndex, pDes+nDesIndexSave, nDesIndex-nDesIndexSave);
|
||||
nDesIndex += nDesIndex-nDesIndexSave;
|
||||
// add first char of the previous decompressed Sample
|
||||
*(pDes+nDesIndex++) = *(pDes+nDesIndexSave);
|
||||
nDesIndexSave += nSampleLen-2;
|
||||
}
|
||||
else
|
||||
nDesIndexSave = nDesIndex, *(pDes+nDesIndex++) = (BYTE)nSample, nSampleLen = 2;
|
||||
|
||||
// add current segment to the dictionary
|
||||
dictionary.push_back(new CBuffer(node));
|
||||
// increment next node pointer to the last char of the added Sample
|
||||
node.m_pBuffer += node.m_nLength-1;
|
||||
node.m_nLength = nSampleLen;
|
||||
}
|
||||
// free dictionary Samples
|
||||
ClearDictionary(dictionary);
|
||||
|
||||
return true;
|
||||
}
|
||||
11
Server/ToolProject/PacketDecoder/LZW.h
Normal file
11
Server/ToolProject/PacketDecoder/LZW.h
Normal file
@@ -0,0 +1,11 @@
|
||||
// LZW.h
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if !defined(__LZW_H__)
|
||||
#define __LZW_H__
|
||||
|
||||
bool CompressLZW(BYTE *pSrc, int nSrcLen, BYTE *&pDes, int &nDesLen, int nBitsPerSample = 12);
|
||||
bool DecompressLZW(BYTE *pSrc, int nSrcLen, BYTE *&pDes, int &nDesLen);
|
||||
|
||||
#endif __LZW_H__
|
||||
65
Server/ToolProject/PacketDecoder/Lzf/crc32.h
Normal file
65
Server/ToolProject/PacketDecoder/Lzf/crc32.h
Normal file
@@ -0,0 +1,65 @@
|
||||
#ifndef CRC32_H
|
||||
#define CRC32_H
|
||||
|
||||
/* crc32 0xdebb20e3 table and supplementary functions. */
|
||||
|
||||
static const u32 crc_32_tab[] =
|
||||
{
|
||||
0x00000000UL, 0x77073096UL, 0xee0e612cUL, 0x990951baUL, 0x076dc419UL,
|
||||
0x706af48fUL, 0xe963a535UL, 0x9e6495a3UL, 0x0edb8832UL, 0x79dcb8a4UL,
|
||||
0xe0d5e91eUL, 0x97d2d988UL, 0x09b64c2bUL, 0x7eb17cbdUL, 0xe7b82d07UL,
|
||||
0x90bf1d91UL, 0x1db71064UL, 0x6ab020f2UL, 0xf3b97148UL, 0x84be41deUL,
|
||||
0x1adad47dUL, 0x6ddde4ebUL, 0xf4d4b551UL, 0x83d385c7UL, 0x136c9856UL,
|
||||
0x646ba8c0UL, 0xfd62f97aUL, 0x8a65c9ecUL, 0x14015c4fUL, 0x63066cd9UL,
|
||||
0xfa0f3d63UL, 0x8d080df5UL, 0x3b6e20c8UL, 0x4c69105eUL, 0xd56041e4UL,
|
||||
0xa2677172UL, 0x3c03e4d1UL, 0x4b04d447UL, 0xd20d85fdUL, 0xa50ab56bUL,
|
||||
0x35b5a8faUL, 0x42b2986cUL, 0xdbbbc9d6UL, 0xacbcf940UL, 0x32d86ce3UL,
|
||||
0x45df5c75UL, 0xdcd60dcfUL, 0xabd13d59UL, 0x26d930acUL, 0x51de003aUL,
|
||||
0xc8d75180UL, 0xbfd06116UL, 0x21b4f4b5UL, 0x56b3c423UL, 0xcfba9599UL,
|
||||
0xb8bda50fUL, 0x2802b89eUL, 0x5f058808UL, 0xc60cd9b2UL, 0xb10be924UL,
|
||||
0x2f6f7c87UL, 0x58684c11UL, 0xc1611dabUL, 0xb6662d3dUL, 0x76dc4190UL,
|
||||
0x01db7106UL, 0x98d220bcUL, 0xefd5102aUL, 0x71b18589UL, 0x06b6b51fUL,
|
||||
0x9fbfe4a5UL, 0xe8b8d433UL, 0x7807c9a2UL, 0x0f00f934UL, 0x9609a88eUL,
|
||||
0xe10e9818UL, 0x7f6a0dbbUL, 0x086d3d2dUL, 0x91646c97UL, 0xe6635c01UL,
|
||||
0x6b6b51f4UL, 0x1c6c6162UL, 0x856530d8UL, 0xf262004eUL, 0x6c0695edUL,
|
||||
0x1b01a57bUL, 0x8208f4c1UL, 0xf50fc457UL, 0x65b0d9c6UL, 0x12b7e950UL,
|
||||
0x8bbeb8eaUL, 0xfcb9887cUL, 0x62dd1ddfUL, 0x15da2d49UL, 0x8cd37cf3UL,
|
||||
0xfbd44c65UL, 0x4db26158UL, 0x3ab551ceUL, 0xa3bc0074UL, 0xd4bb30e2UL,
|
||||
0x4adfa541UL, 0x3dd895d7UL, 0xa4d1c46dUL, 0xd3d6f4fbUL, 0x4369e96aUL,
|
||||
0x346ed9fcUL, 0xad678846UL, 0xda60b8d0UL, 0x44042d73UL, 0x33031de5UL,
|
||||
0xaa0a4c5fUL, 0xdd0d7cc9UL, 0x5005713cUL, 0x270241aaUL, 0xbe0b1010UL,
|
||||
0xc90c2086UL, 0x5768b525UL, 0x206f85b3UL, 0xb966d409UL, 0xce61e49fUL,
|
||||
0x5edef90eUL, 0x29d9c998UL, 0xb0d09822UL, 0xc7d7a8b4UL, 0x59b33d17UL,
|
||||
0x2eb40d81UL, 0xb7bd5c3bUL, 0xc0ba6cadUL, 0xedb88320UL, 0x9abfb3b6UL,
|
||||
0x03b6e20cUL, 0x74b1d29aUL, 0xead54739UL, 0x9dd277afUL, 0x04db2615UL,
|
||||
0x73dc1683UL, 0xe3630b12UL, 0x94643b84UL, 0x0d6d6a3eUL, 0x7a6a5aa8UL,
|
||||
0xe40ecf0bUL, 0x9309ff9dUL, 0x0a00ae27UL, 0x7d079eb1UL, 0xf00f9344UL,
|
||||
0x8708a3d2UL, 0x1e01f268UL, 0x6906c2feUL, 0xf762575dUL, 0x806567cbUL,
|
||||
0x196c3671UL, 0x6e6b06e7UL, 0xfed41b76UL, 0x89d32be0UL, 0x10da7a5aUL,
|
||||
0x67dd4accUL, 0xf9b9df6fUL, 0x8ebeeff9UL, 0x17b7be43UL, 0x60b08ed5UL,
|
||||
0xd6d6a3e8UL, 0xa1d1937eUL, 0x38d8c2c4UL, 0x4fdff252UL, 0xd1bb67f1UL,
|
||||
0xa6bc5767UL, 0x3fb506ddUL, 0x48b2364bUL, 0xd80d2bdaUL, 0xaf0a1b4cUL,
|
||||
0x36034af6UL, 0x41047a60UL, 0xdf60efc3UL, 0xa867df55UL, 0x316e8eefUL,
|
||||
0x4669be79UL, 0xcb61b38cUL, 0xbc66831aUL, 0x256fd2a0UL, 0x5268e236UL,
|
||||
0xcc0c7795UL, 0xbb0b4703UL, 0x220216b9UL, 0x5505262fUL, 0xc5ba3bbeUL,
|
||||
0xb2bd0b28UL, 0x2bb45a92UL, 0x5cb36a04UL, 0xc2d7ffa7UL, 0xb5d0cf31UL,
|
||||
0x2cd99e8bUL, 0x5bdeae1dUL, 0x9b64c2b0UL, 0xec63f226UL, 0x756aa39cUL,
|
||||
0x026d930aUL, 0x9c0906a9UL, 0xeb0e363fUL, 0x72076785UL, 0x05005713UL,
|
||||
0x95bf4a82UL, 0xe2b87a14UL, 0x7bb12baeUL, 0x0cb61b38UL, 0x92d28e9bUL,
|
||||
0xe5d5be0dUL, 0x7cdcefb7UL, 0x0bdbdf21UL, 0x86d3d2d4UL, 0xf1d4e242UL,
|
||||
0x68ddb3f8UL, 0x1fda836eUL, 0x81be16cdUL, 0xf6b9265bUL, 0x6fb077e1UL,
|
||||
0x18b74777UL, 0x88085ae6UL, 0xff0f6a70UL, 0x66063bcaUL, 0x11010b5cUL,
|
||||
0x8f659effUL, 0xf862ae69UL, 0x616bffd3UL, 0x166ccf45UL, 0xa00ae278UL,
|
||||
0xd70dd2eeUL, 0x4e048354UL, 0x3903b3c2UL, 0xa7672661UL, 0xd06016f7UL,
|
||||
0x4969474dUL, 0x3e6e77dbUL, 0xaed16a4aUL, 0xd9d65adcUL, 0x40df0b66UL,
|
||||
0x37d83bf0UL, 0xa9bcae53UL, 0xdebb9ec5UL, 0x47b2cf7fUL, 0x30b5ffe9UL,
|
||||
0xbdbdf21cUL, 0xcabac28aUL, 0x53b39330UL, 0x24b4a3a6UL, 0xbad03605UL,
|
||||
0xcdd70693UL, 0x54de5729UL, 0x23d967bfUL, 0xb3667a2eUL, 0xc4614ab8UL,
|
||||
0x5d681b02UL, 0x2a6f2b94UL, 0xb40bbe37UL, 0xc30c8ea1UL, 0x5a05df1bUL,
|
||||
0x2d02ef8dL
|
||||
};
|
||||
|
||||
#define crc32(crc,byte) (crc_32_tab[(u8)(crc) ^ (u8)(byte)] ^ ((crc) >> 8))
|
||||
|
||||
#endif
|
||||
|
||||
111
Server/ToolProject/PacketDecoder/Lzf/lzf.h
Normal file
111
Server/ToolProject/PacketDecoder/Lzf/lzf.h
Normal file
@@ -0,0 +1,111 @@
|
||||
/*
|
||||
* Copyright (c) 2000-2005 Marc Alexander Lehmann <schmorp@schmorp.de>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modifica-
|
||||
* tion, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER-
|
||||
* CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
* EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE-
|
||||
* CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH-
|
||||
* ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* the GNU General Public License version 2 (the "GPL"), in which case the
|
||||
* provisions of the GPL are applicable instead of the above. If you wish to
|
||||
* allow the use of your version of this file only under the terms of the
|
||||
* GPL and not to allow others to use your version of this file under the
|
||||
* BSD license, indicate your decision by deleting the provisions above and
|
||||
* replace them with the notice and other provisions required by the GPL. If
|
||||
* you do not delete the provisions above, a recipient may use your version
|
||||
* of this file under either the BSD or the GPL.
|
||||
*/
|
||||
|
||||
#ifndef LZF_H
|
||||
#define LZF_H
|
||||
|
||||
/***********************************************************************
|
||||
**
|
||||
** lzf -- an extremely fast/free compression/decompression-method
|
||||
** http://liblzf.plan9.de/
|
||||
**
|
||||
** This algorithm is believed to be patent-free.
|
||||
**
|
||||
***********************************************************************/
|
||||
|
||||
#define LZF_VERSION 0x0105 /* 1.5 */
|
||||
|
||||
/*
|
||||
* Compress in_len bytes stored at the memory block starting at
|
||||
* in_data and write the result to out_data, up to a maximum length
|
||||
* of out_len bytes.
|
||||
*
|
||||
* If the output buffer is not large enough or any error occurs
|
||||
* return 0, otherwise return the number of bytes used (which might
|
||||
* be considerably larger than in_len, so it makes sense to always
|
||||
* use out_len == in_len - 1), to ensure _some_ compression, and store
|
||||
* the data uncompressed otherwise.
|
||||
*
|
||||
* lzf_compress might use different algorithms on different systems and
|
||||
* even diferent runs, thus might result in different compressed strings
|
||||
* depending on the phase of the moon or similar factors. However, all
|
||||
* these strings are architecture-independent and will result in the
|
||||
* original data when decompressed using lzf_decompress.
|
||||
*
|
||||
* The buffers must not be overlapping.
|
||||
*
|
||||
* If the option LZF_STATE_ARG is enabled, an extra argument must be
|
||||
* supplied which is not reflected in this header file. Refer to lzfP.h
|
||||
* and lzf_c.c.
|
||||
*
|
||||
*/
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
||||
unsigned int
|
||||
lzf_compress (const void *const in_data, unsigned int in_len,
|
||||
void *out_data, unsigned int out_len);
|
||||
}
|
||||
/*
|
||||
* Decompress data compressed with some version of the lzf_compress
|
||||
* function and stored at location in_data and length in_len. The result
|
||||
* will be stored at out_data up to a maximum of out_len characters.
|
||||
*
|
||||
* If the output buffer is not large enough to hold the decompressed
|
||||
* data, a 0 is returned and errno is set to E2BIG. Otherwise the number
|
||||
* of decompressed bytes (i.e. the original length of the data) is
|
||||
* returned.
|
||||
*
|
||||
* If an error in the compressed data is detected, a zero is returned and
|
||||
* errno is set to EINVAL.
|
||||
*
|
||||
* This function is very fast, about as fast as a copying loop.
|
||||
*/
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
||||
unsigned int
|
||||
lzf_decompress (const void *const in_data, unsigned int in_len,
|
||||
void *out_data, unsigned int out_len);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
157
Server/ToolProject/PacketDecoder/Lzf/lzfP.h
Normal file
157
Server/ToolProject/PacketDecoder/Lzf/lzfP.h
Normal file
@@ -0,0 +1,157 @@
|
||||
/*
|
||||
* Copyright (c) 2000-2005 Marc Alexander Lehmann <schmorp@schmorp.de>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modifica-
|
||||
* tion, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER-
|
||||
* CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
* EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE-
|
||||
* CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH-
|
||||
* ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* the GNU General Public License version 2 (the "GPL"), in which case the
|
||||
* provisions of the GPL are applicable instead of the above. If you wish to
|
||||
* allow the use of your version of this file only under the terms of the
|
||||
* GPL and not to allow others to use your version of this file under the
|
||||
* BSD license, indicate your decision by deleting the provisions above and
|
||||
* replace them with the notice and other provisions required by the GPL. If
|
||||
* you do not delete the provisions above, a recipient may use your version
|
||||
* of this file under either the BSD or the GPL.
|
||||
*/
|
||||
|
||||
#ifndef LZFP_h
|
||||
#define LZFP_h
|
||||
|
||||
#define STANDALONE 1 /* at the moment, this is ok. */
|
||||
|
||||
#ifndef STANDALONE
|
||||
# include "lzf.h"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* size of hashtable is (1 << HLOG) * sizeof (char *)
|
||||
* decompression is independent of the hash table size
|
||||
* the difference between 15 and 14 is very small
|
||||
* for small blocks (and 14 is usually a but faster).
|
||||
* For a low-memory/faster configuration, use HLOG == 13;
|
||||
* For best compression, use 15 or 16 (or more).
|
||||
*/
|
||||
#ifndef HLOG
|
||||
# define HLOG 14
|
||||
#endif
|
||||
|
||||
/*
|
||||
* sacrifice very little compression quality in favour of compression speed.
|
||||
* This gives almost the same compression as the default code, and is
|
||||
* (very roughly) 15% faster. This is the preferable mode of operation.
|
||||
*/
|
||||
|
||||
#ifndef VERY_FAST
|
||||
# define VERY_FAST 1
|
||||
#endif
|
||||
|
||||
/*
|
||||
* sacrifice some more compression quality in favour of compression speed.
|
||||
* (roughly 1-2% worse compression for large blocks and
|
||||
* 9-10% for small, redundant, blocks and >>20% better speed in both cases)
|
||||
* In short: when in need for speed, enable this for binary data,
|
||||
* possibly disable this for text data.
|
||||
*/
|
||||
#ifndef ULTRA_FAST
|
||||
# define ULTRA_FAST 0
|
||||
#endif
|
||||
|
||||
/*
|
||||
* unconditionally aligning does not cost very much, so do it if unsure
|
||||
*/
|
||||
#ifndef STRICT_ALIGN
|
||||
# define STRICT_ALIGN !(defined(__i386) || defined (__amd64))
|
||||
#endif
|
||||
|
||||
/*
|
||||
* use string functions to copy memory.
|
||||
* this is usually a loss, even with glibc's optimized memcpy
|
||||
*/
|
||||
#ifndef USE_MEMCPY
|
||||
# define USE_MEMCPY 0
|
||||
#endif
|
||||
|
||||
/*
|
||||
* you may choose to pre-set the hash table (might be faster on some
|
||||
* modern cpus and large (>>64k) blocks)
|
||||
*/
|
||||
#ifndef INIT_HTAB
|
||||
# define INIT_HTAB 0
|
||||
#endif
|
||||
|
||||
/*
|
||||
* avoid assigning values to errno variable? for some embedding purposes
|
||||
* (linux kernel for example), this is neccessary. NOTE: this breaks
|
||||
* the documentation in lzf.h.
|
||||
*/
|
||||
#ifndef AVOID_ERRNO
|
||||
# define AVOID_ERRNO 0
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Wether to pass the LZF_STATE variable as argument, or allocate it
|
||||
* on the stack. For small-stack environments, define this to 1.
|
||||
* NOTE: this breaks the prototype in lzf.h.
|
||||
*/
|
||||
#ifndef LZF_STATE_ARG
|
||||
# define LZF_STATE_ARG 0
|
||||
#endif
|
||||
|
||||
/*****************************************************************************/
|
||||
/* nothing should be changed below */
|
||||
|
||||
typedef unsigned char u8;
|
||||
|
||||
typedef const u8 *LZF_STATE[1 << (HLOG)];
|
||||
|
||||
#if !STRICT_ALIGN
|
||||
/* for unaligned accesses we need a 16 bit datatype. */
|
||||
# include <limits.h>
|
||||
# if USHRT_MAX == 65535
|
||||
typedef unsigned short u16;
|
||||
# elif UINT_MAX == 65535
|
||||
typedef unsigned int u16;
|
||||
# else
|
||||
# undef STRICT_ALIGN
|
||||
# define STRICT_ALIGN 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if ULTRA_FAST
|
||||
# if defined(VERY_FAST)
|
||||
# undef VERY_FAST
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if USE_MEMCPY || INIT_HTAB
|
||||
# ifdef __cplusplus
|
||||
# include <cstring>
|
||||
# else
|
||||
# include <string.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
242
Server/ToolProject/PacketDecoder/Lzf/lzf_c.c
Normal file
242
Server/ToolProject/PacketDecoder/Lzf/lzf_c.c
Normal file
@@ -0,0 +1,242 @@
|
||||
/*
|
||||
* Copyright (c) 2000-2005 Marc Alexander Lehmann <schmorp@schmorp.de>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modifica-
|
||||
* tion, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER-
|
||||
* CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
* EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE-
|
||||
* CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH-
|
||||
* ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* the GNU General Public License version 2 (the "GPL"), in which case the
|
||||
* provisions of the GPL are applicable instead of the above. If you wish to
|
||||
* allow the use of your version of this file only under the terms of the
|
||||
* GPL and not to allow others to use your version of this file under the
|
||||
* BSD license, indicate your decision by deleting the provisions above and
|
||||
* replace them with the notice and other provisions required by the GPL. If
|
||||
* you do not delete the provisions above, a recipient may use your version
|
||||
* of this file under either the BSD or the GPL.
|
||||
*/
|
||||
|
||||
#include "lzfP.h"
|
||||
|
||||
#define HSIZE (1 << (HLOG))
|
||||
|
||||
/*
|
||||
* don't play with this unless you benchmark!
|
||||
* decompression is not dependent on the hash function
|
||||
* the hashing function might seem strange, just believe me
|
||||
* it works ;)
|
||||
*/
|
||||
#ifndef FRST
|
||||
# define FRST(p) (((p[0]) << 8) | p[1])
|
||||
# define NEXT(v,p) (((v) << 8) | p[2])
|
||||
# define IDX(h) ((((h ^ (h << 5)) >> (3*8 - HLOG)) - h*5) & (HSIZE - 1))
|
||||
#endif
|
||||
/*
|
||||
* IDX works because it is very similar to a multiplicative hash, e.g.
|
||||
* ((h * 57321 >> (3*8 - HLOG)) & (HSIZE - 1))
|
||||
* the latter is also quite fast on newer CPUs, and sligthly better
|
||||
*
|
||||
* the next one is also quite good, albeit slow ;)
|
||||
* (int)(cos(h & 0xffffff) * 1e6)
|
||||
*/
|
||||
|
||||
#if 0
|
||||
/* original lzv-like hash function, much worse and thus slower */
|
||||
# define FRST(p) (p[0] << 5) ^ p[1]
|
||||
# define NEXT(v,p) ((v) << 5) ^ p[2]
|
||||
# define IDX(h) ((h) & (HSIZE - 1))
|
||||
#endif
|
||||
|
||||
#define MAX_LIT (1 << 5)
|
||||
#define MAX_OFF (1 << 13)
|
||||
#define MAX_REF ((1 << 8) + (1 << 3))
|
||||
|
||||
/*
|
||||
* compressed format
|
||||
*
|
||||
* 000LLLLL <L+1> ; literal
|
||||
* LLLooooo oooooooo ; backref L
|
||||
* 111ooooo LLLLLLLL oooooooo ; backref L+7
|
||||
*
|
||||
*/
|
||||
|
||||
unsigned int
|
||||
lzf_compress (const void *const in_data, unsigned int in_len,
|
||||
void *out_data, unsigned int out_len
|
||||
#if LZF_STATE_ARG
|
||||
, LZF_STATE *htab
|
||||
#endif
|
||||
)
|
||||
{
|
||||
#if !LZF_STATE_ARG
|
||||
LZF_STATE htab;
|
||||
#endif
|
||||
const u8 **hslot;
|
||||
const u8 *ip = (const u8 *)in_data;
|
||||
u8 *op = (u8 *)out_data;
|
||||
const u8 *in_end = ip + in_len;
|
||||
u8 *out_end = op + out_len;
|
||||
const u8 *ref;
|
||||
|
||||
unsigned int hval = FRST (ip);
|
||||
unsigned long off;
|
||||
int lit = 0;
|
||||
|
||||
#if INIT_HTAB
|
||||
# if USE_MEMCPY
|
||||
memset (htab, 0, sizeof (htab));
|
||||
# else
|
||||
for (hslot = htab; hslot < htab + HSIZE; hslot++)
|
||||
*hslot++ = ip;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
for (;;)
|
||||
{
|
||||
if (ip < in_end - 2)
|
||||
{
|
||||
hval = NEXT (hval, ip);
|
||||
hslot = htab + IDX (hval);
|
||||
ref = *hslot; *hslot = ip;
|
||||
|
||||
if (1
|
||||
#if INIT_HTAB && !USE_MEMCPY
|
||||
&& ref < ip /* the next test will actually take care of this, but this is faster */
|
||||
#endif
|
||||
&& (off = ip - ref - 1) < MAX_OFF
|
||||
&& ip + 4 < in_end
|
||||
&& ref > (u8 *)in_data
|
||||
#if STRICT_ALIGN
|
||||
&& ref[0] == ip[0]
|
||||
&& ref[1] == ip[1]
|
||||
&& ref[2] == ip[2]
|
||||
#else
|
||||
&& *(u16 *)ref == *(u16 *)ip
|
||||
&& ref[2] == ip[2]
|
||||
#endif
|
||||
)
|
||||
{
|
||||
/* match found at *ref++ */
|
||||
unsigned int len = 2;
|
||||
unsigned int maxlen = in_end - ip - len;
|
||||
maxlen = maxlen > MAX_REF ? MAX_REF : maxlen;
|
||||
|
||||
if (op + lit + 1 + 3 >= out_end)
|
||||
return 0;
|
||||
|
||||
do
|
||||
len++;
|
||||
while (len < maxlen && ref[len] == ip[len]);
|
||||
|
||||
if (lit)
|
||||
{
|
||||
*op++ = lit - 1;
|
||||
lit = -lit;
|
||||
do
|
||||
*op++ = ip[lit];
|
||||
while (++lit);
|
||||
}
|
||||
|
||||
len -= 2;
|
||||
ip++;
|
||||
|
||||
if (len < 7)
|
||||
{
|
||||
*op++ = (off >> 8) + (len << 5);
|
||||
}
|
||||
else
|
||||
{
|
||||
*op++ = (off >> 8) + ( 7 << 5);
|
||||
*op++ = len - 7;
|
||||
}
|
||||
|
||||
*op++ = off;
|
||||
|
||||
#if ULTRA_FAST || VERY_FAST
|
||||
ip += len;
|
||||
#if VERY_FAST && !ULTRA_FAST
|
||||
--ip;
|
||||
#endif
|
||||
hval = FRST (ip);
|
||||
|
||||
hval = NEXT (hval, ip);
|
||||
htab[IDX (hval)] = ip;
|
||||
ip++;
|
||||
|
||||
#if VERY_FAST && !ULTRA_FAST
|
||||
hval = NEXT (hval, ip);
|
||||
htab[IDX (hval)] = ip;
|
||||
ip++;
|
||||
#endif
|
||||
#else
|
||||
do
|
||||
{
|
||||
hval = NEXT (hval, ip);
|
||||
htab[IDX (hval)] = ip;
|
||||
ip++;
|
||||
}
|
||||
while (len--);
|
||||
#endif
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else if (ip == in_end)
|
||||
break;
|
||||
|
||||
/* one more literal byte we must copy */
|
||||
lit++;
|
||||
ip++;
|
||||
|
||||
if (lit == MAX_LIT)
|
||||
{
|
||||
if (op + 1 + MAX_LIT >= out_end)
|
||||
return 0;
|
||||
|
||||
*op++ = MAX_LIT - 1;
|
||||
#if USE_MEMCPY
|
||||
memcpy (op, ip - MAX_LIT, MAX_LIT);
|
||||
op += MAX_LIT;
|
||||
lit = 0;
|
||||
#else
|
||||
lit = -lit;
|
||||
do
|
||||
*op++ = ip[lit];
|
||||
while (++lit);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
if (lit)
|
||||
{
|
||||
if (op + lit + 1 >= out_end)
|
||||
return 0;
|
||||
|
||||
*op++ = lit - 1;
|
||||
lit = -lit;
|
||||
do
|
||||
*op++ = ip[lit];
|
||||
while (++lit);
|
||||
}
|
||||
|
||||
return op - (u8 *) out_data;
|
||||
}
|
||||
116
Server/ToolProject/PacketDecoder/Lzf/lzf_d.c
Normal file
116
Server/ToolProject/PacketDecoder/Lzf/lzf_d.c
Normal file
@@ -0,0 +1,116 @@
|
||||
/*
|
||||
* Copyright (c) 2000-2005 Marc Alexander Lehmann <schmorp@schmorp.de>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modifica-
|
||||
* tion, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER-
|
||||
* CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
* EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE-
|
||||
* CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH-
|
||||
* ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* the GNU General Public License version 2 (the "GPL"), in which case the
|
||||
* provisions of the GPL are applicable instead of the above. If you wish to
|
||||
* allow the use of your version of this file only under the terms of the
|
||||
* GPL and not to allow others to use your version of this file under the
|
||||
* BSD license, indicate your decision by deleting the provisions above and
|
||||
* replace them with the notice and other provisions required by the GPL. If
|
||||
* you do not delete the provisions above, a recipient may use your version
|
||||
* of this file under either the BSD or the GPL.
|
||||
*/
|
||||
|
||||
#include "lzfP.h"
|
||||
|
||||
#if AVOID_ERRNO
|
||||
# define SET_ERRNO(n)
|
||||
#else
|
||||
# include <errno.h>
|
||||
# define SET_ERRNO(n) errno = (n)
|
||||
#endif
|
||||
|
||||
unsigned int
|
||||
lzf_decompress (const void *const in_data, unsigned int in_len,
|
||||
void *out_data, unsigned int out_len)
|
||||
{
|
||||
u8 const *ip = (const u8 *)in_data;
|
||||
u8 *op = (u8 *)out_data;
|
||||
u8 const *const in_end = ip + in_len;
|
||||
u8 *const out_end = op + out_len;
|
||||
|
||||
do
|
||||
{
|
||||
unsigned int ctrl = *ip++;
|
||||
|
||||
if (ctrl < (1 << 5)) /* literal run */
|
||||
{
|
||||
ctrl++;
|
||||
|
||||
if (op + ctrl > out_end)
|
||||
{
|
||||
SET_ERRNO (E2BIG);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if USE_MEMCPY
|
||||
memcpy (op, ip, ctrl);
|
||||
op += ctrl;
|
||||
ip += ctrl;
|
||||
#else
|
||||
do
|
||||
*op++ = *ip++;
|
||||
while (--ctrl);
|
||||
#endif
|
||||
}
|
||||
else /* back reference */
|
||||
{
|
||||
unsigned int len = ctrl >> 5;
|
||||
|
||||
u8 *ref = op - ((ctrl & 0x1f) << 8) - 1;
|
||||
|
||||
if (len == 7)
|
||||
len += *ip++;
|
||||
|
||||
ref -= *ip++;
|
||||
|
||||
if (op + len + 2 > out_end)
|
||||
{
|
||||
SET_ERRNO (E2BIG);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ref < (u8 *)out_data)
|
||||
{
|
||||
SET_ERRNO (EINVAL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
*op++ = *ref++;
|
||||
*op++ = *ref++;
|
||||
|
||||
do
|
||||
*op++ = *ref++;
|
||||
while (--len);
|
||||
}
|
||||
}
|
||||
while (op < out_end && ip < in_end);
|
||||
|
||||
return op - (u8 *)out_data;
|
||||
}
|
||||
|
||||
72
Server/ToolProject/PacketDecoder/PacketDecoder.cpp
Normal file
72
Server/ToolProject/PacketDecoder/PacketDecoder.cpp
Normal file
@@ -0,0 +1,72 @@
|
||||
// PacketDecoder.cpp : <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20><><EFBFBD><EFBFBD> Ŭ<><C5AC><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "PacketDecoder.h"
|
||||
#include "PacketDecoderDlg.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#endif
|
||||
|
||||
|
||||
// CPacketDecoderApp
|
||||
|
||||
BEGIN_MESSAGE_MAP(CPacketDecoderApp, CWinApp)
|
||||
ON_COMMAND(ID_HELP, CWinApp::OnHelp)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
// CPacketDecoderApp <20><><EFBFBD><EFBFBD>
|
||||
|
||||
CPacketDecoderApp::CPacketDecoderApp()
|
||||
{
|
||||
// TODO: <20><><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ڵ带 <20>߰<EFBFBD><DFB0>մϴ<D5B4>.
|
||||
// InitInstance<63><65> <20><><EFBFBD><EFBFBD> <20>߿<EFBFBD><DFBF><EFBFBD> <20>ʱ<EFBFBD>ȭ <20>۾<EFBFBD><DBBE><EFBFBD> <20><>ġ<EFBFBD>մϴ<D5B4>.
|
||||
}
|
||||
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> CPacketDecoderApp <20><>ü<EFBFBD>Դϴ<D4B4>.
|
||||
|
||||
CPacketDecoderApp theApp;
|
||||
|
||||
|
||||
// CPacketDecoderApp <20>ʱ<EFBFBD>ȭ
|
||||
|
||||
BOOL CPacketDecoderApp::InitInstance()
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20>Ŵ<EFBFBD><C5B4>佺Ʈ<E4BDBA><C6AE> ComCtl32.dll <20><><EFBFBD><EFBFBD> 6 <20>̻<EFBFBD><CCBB><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD> <20><><EFBFBD>־<EFBFBD> <20><>Ÿ<EFBFBD><C5B8><EFBFBD><EFBFBD>
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20><><EFBFBD><EFBFBD>, Windows XP <20><EFBFBD> <20>ݵ<EFBFBD><DDB5><EFBFBD> InitCommonControls()<29><> <20>ʿ<EFBFBD><CABF>մϴ<D5B4>.
|
||||
// InitCommonControls()<29><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> â<><C3A2> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.
|
||||
InitCommonControls();
|
||||
|
||||
CWinApp::InitInstance();
|
||||
|
||||
AfxEnableControlContainer();
|
||||
|
||||
// ǥ<><C7A5> <20>ʱ<EFBFBD>ȭ
|
||||
// <20>̵<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʰ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ũ<>⸦ <20><><EFBFBD>̷<EFBFBD><CCB7><EFBFBD>
|
||||
// <20>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD><EFBFBD> <20>ʿ<EFBFBD> <20><><EFBFBD><EFBFBD> Ư<><C6AF> <20>ʱ<EFBFBD>ȭ <20><>ƾ<EFBFBD><C6BE> <20><><EFBFBD><EFBFBD><EFBFBD>ؾ<EFBFBD> <20>մϴ<D5B4>.
|
||||
// <20>ش<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> Ű<><C5B0> <20><><EFBFBD><EFBFBD><EFBFBD>Ͻʽÿ<CABD>.
|
||||
// TODO: <20><> <20><><EFBFBD>ڿ<EFBFBD><DABF><EFBFBD> ȸ<><C8B8> <20>Ǵ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20≯<EFBFBD><CCB8><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ؾ<EFBFBD> <20>մϴ<D5B4>.
|
||||
SetRegistryKey(_T("<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD>翡<EFBFBD><E7BFA1> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1>"));
|
||||
|
||||
CPacketDecoderDlg dlg;
|
||||
m_pMainWnd = &dlg;
|
||||
INT_PTR nResponse = dlg.DoModal();
|
||||
if (nResponse == IDOK)
|
||||
{
|
||||
// TODO: <20><><EFBFBD> <20><>ȭ <20><><EFBFBD>ڰ<EFBFBD> Ȯ<><C8AE><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD>
|
||||
// <20>ڵ带 <20><>ġ<EFBFBD>մϴ<D5B4>.
|
||||
}
|
||||
else if (nResponse == IDCANCEL)
|
||||
{
|
||||
// TODO: <20><><EFBFBD> <20><>ȭ <20><><EFBFBD>ڰ<EFBFBD> <20><><EFBFBD>Ҹ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD>
|
||||
// <20>ڵ带 <20><>ġ<EFBFBD>մϴ<D5B4>.
|
||||
}
|
||||
|
||||
// <20><>ȭ <20><><EFBFBD>ڰ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20><EFBFBD><DEBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʰ<EFBFBD>
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20>ֵ<EFBFBD><D6B5><EFBFBD> FALSE<53><45> <20><>ȯ<EFBFBD>մϴ<D5B4>.
|
||||
return FALSE;
|
||||
}
|
||||
31
Server/ToolProject/PacketDecoder/PacketDecoder.h
Normal file
31
Server/ToolProject/PacketDecoder/PacketDecoder.h
Normal file
@@ -0,0 +1,31 @@
|
||||
// PacketDecoder.h : PROJECT_NAME <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __AFXWIN_H__
|
||||
#error PCH<43><48><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϱ<EFBFBD> <20><><EFBFBD><EFBFBD> 'stdafx.h'<27><> <20><><EFBFBD><EFBFBD><EFBFBD>Ͻʽÿ<CABD>.
|
||||
#endif
|
||||
|
||||
#include "resource.h" // <20><> <20><>ȣ
|
||||
|
||||
|
||||
// CPacketDecoderApp:
|
||||
// <20><> Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ؼ<EFBFBD><D8BC><EFBFBD> PacketDecoder.cpp<70><70> <20><><EFBFBD><EFBFBD><EFBFBD>Ͻʽÿ<CABD>.
|
||||
//
|
||||
|
||||
class CPacketDecoderApp : public CWinApp
|
||||
{
|
||||
public:
|
||||
CPacketDecoderApp();
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
public:
|
||||
virtual BOOL InitInstance();
|
||||
|
||||
// <20><><EFBFBD><EFBFBD>
|
||||
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
||||
extern CPacketDecoderApp theApp;
|
||||
211
Server/ToolProject/PacketDecoder/PacketDecoder.rc
Normal file
211
Server/ToolProject/PacketDecoder/PacketDecoder.rc
Normal file
@@ -0,0 +1,211 @@
|
||||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "afxres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// <20>ѱ<EFBFBD><D1B1><EFBFBD> resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_KOR)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT
|
||||
#pragma code_page(949)
|
||||
#endif //_WIN32
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#define _AFX_NO_SPLITTER_RESOURCES\r\n"
|
||||
"#define _AFX_NO_OLE_RESOURCES\r\n"
|
||||
"#define _AFX_NO_TRACKER_RESOURCES\r\n"
|
||||
"#define _AFX_NO_PROPERTY_RESOURCES\r\n"
|
||||
"\r\n"
|
||||
"#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_KOR)\r\n"
|
||||
"LANGUAGE 18, 1\r\n"
|
||||
"#pragma code_page(949)\r\n"
|
||||
"#include ""res\\PacketDecoder.rc2"" // Microsoft Visual C++<2B><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ҽ<EFBFBD>\r\n"
|
||||
"#include ""afxres.rc"" // ǥ<><C7A5> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>\r\n"
|
||||
"#endif\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Icon
|
||||
//
|
||||
|
||||
// Icon with lowest ID value placed first to ensure application icon
|
||||
// remains consistent on all systems.
|
||||
IDR_MAINFRAME ICON "res\\PacketDecoder.ico"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_ABOUTBOX DIALOGEX 0, 0, 235, 55
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION |
|
||||
WS_SYSMENU
|
||||
CAPTION "PacketDecoder <20><><EFBFBD><EFBFBD>"
|
||||
FONT 9, "MS Shell Dlg", 0, 0, 0x1
|
||||
BEGIN
|
||||
ICON IDR_MAINFRAME,IDC_STATIC,11,17,20,20
|
||||
LTEXT "PacketDecoder Version 1.0",IDC_STATIC,40,10,119,8,
|
||||
SS_NOPREFIX
|
||||
LTEXT "Copyright (C) 2005",IDC_STATIC,40,25,119,8
|
||||
DEFPUSHBUTTON "Ȯ<><C8AE>",IDOK,178,7,50,16,WS_GROUP
|
||||
END
|
||||
|
||||
IDD_PACKETDECODER_DIALOG DIALOGEX 0, 0, 410, 417
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION |
|
||||
WS_SYSMENU
|
||||
EXSTYLE WS_EX_APPWINDOW
|
||||
CAPTION "PacketDecoder"
|
||||
FONT 9, "<22><><EFBFBD><EFBFBD>ü", 400, 0, 0x81
|
||||
BEGIN
|
||||
PUSHBUTTON "<22><>Ŷ <20><><EFBFBD><EFBFBD> <20>Ľ<EFBFBD>",IDC_PARSE_HEADER,258,394,69,16
|
||||
PUSHBUTTON "<22><>Ŷ <20><><EFBFBD><EFBFBD>",IDC_COMPRESS_PACKET,334,394,69,16
|
||||
EDITTEXT IDC_COMPRESS_MINILZO,7,354,396,16,ES_AUTOHSCROLL |
|
||||
ES_READONLY
|
||||
EDITTEXT IDC_PACKET_HEADER,7,334,396,16,ES_AUTOHSCROLL |
|
||||
ES_READONLY
|
||||
EDITTEXT IDC_WORKSPACE,7,181,396,145,ES_MULTILINE |
|
||||
ES_AUTOHSCROLL | ES_WANTRETURN | WS_VSCROLL | WS_HSCROLL
|
||||
LTEXT "Parse Packet",IDC_STATIC,7,7,49,8
|
||||
LTEXT "WorkSpace",IDC_STATIC,7,169,37,8
|
||||
EDITTEXT IDC_PACKET_CONTENT,7,17,396,145,ES_MULTILINE |
|
||||
ES_AUTOHSCROLL | ES_WANTRETURN | WS_VSCROLL | WS_HSCROLL
|
||||
EDITTEXT IDC_COMPRESS_ZLIB,7,374,396,16,ES_AUTOHSCROLL |
|
||||
ES_READONLY
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,0,0,1
|
||||
PRODUCTVERSION 1,0,0,1
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x4L
|
||||
FILETYPE 0x1L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "041203b5"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "TODO: <ȸ<><C8B8> <20≯<EFBFBD>>"
|
||||
VALUE "FileDescription", "TODO: <<3C><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>>"
|
||||
VALUE "FileVersion", "1.0.0.1"
|
||||
VALUE "InternalName", "PacketDecoder.exe"
|
||||
VALUE "LegalCopyright", "TODO: (c) <ȸ<><C8B8> <20≯<EFBFBD>>. All rights reserved."
|
||||
VALUE "OriginalFilename", "PacketDecoder.exe"
|
||||
VALUE "ProductName", "TODO: <<3C><>ǰ <20≯<EFBFBD>>"
|
||||
VALUE "ProductVersion", "1.0.0.1"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "<22><>ȯ", 0x412, 949
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DESIGNINFO
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO
|
||||
BEGIN
|
||||
IDD_ABOUTBOX, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 228
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 48
|
||||
END
|
||||
|
||||
IDD_PACKETDECODER_DIALOG, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 403
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 410
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// String Table
|
||||
//
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_ABOUTBOX "PacketDecoder <20><><EFBFBD><EFBFBD>(&A)..."
|
||||
END
|
||||
|
||||
#endif // <20>ѱ<EFBFBD><D1B1><EFBFBD> resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
#define _AFX_NO_SPLITTER_RESOURCES
|
||||
#define _AFX_NO_OLE_RESOURCES
|
||||
#define _AFX_NO_TRACKER_RESOURCES
|
||||
#define _AFX_NO_PROPERTY_RESOURCES
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_KOR)
|
||||
LANGUAGE 18, 1
|
||||
#pragma code_page(949)
|
||||
#include "res\PacketDecoder.rc2" // Microsoft Visual C++<2B><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ҽ<EFBFBD>
|
||||
#include "afxres.rc" // ǥ<><C7A5> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
||||
234
Server/ToolProject/PacketDecoder/PacketDecoder.vcproj
Normal file
234
Server/ToolProject/PacketDecoder/PacketDecoder.vcproj
Normal file
@@ -0,0 +1,234 @@
|
||||
<?xml version="1.0" encoding="ks_c_5601-1987"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="PacketDecoder"
|
||||
ProjectGUID="{E9A9A701-E701-420B-9EEB-D01A8F1F8982}"
|
||||
Keyword="MFCProj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="Debug"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="../;./;../../RylServerProject/;../../RylServerProject/BaseLibrary;../../RylServerProject/RylServerLibrary"
|
||||
PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
TreatWChar_tAsBuiltInType="TRUE"
|
||||
UsePrecompiledHeader="2"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="TRUE"
|
||||
SubSystem="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MkTypLibCompatible="FALSE"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1042"
|
||||
AdditionalIncludeDirectories="$(IntDir)"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="Release"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="../;./;../../RylServerProject/;../../RylServerProject/BaseLibrary;../../RylServerProject/RylServerLibrary"
|
||||
PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG"
|
||||
MinimalRebuild="FALSE"
|
||||
RuntimeLibrary="0"
|
||||
TreatWChar_tAsBuiltInType="TRUE"
|
||||
UsePrecompiledHeader="2"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="TRUE"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
MkTypLibCompatible="FALSE"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1042"
|
||||
AdditionalIncludeDirectories="$(IntDir)"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="<22>ҽ<EFBFBD> <20><><EFBFBD><EFBFBD>"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
|
||||
<File
|
||||
RelativePath=".\FindFFEdit.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Huffman.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\LZW.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\PacketDecoder.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\PacketDecoderDlg.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\stdafx.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
|
||||
<File
|
||||
RelativePath=".\BinaryTree.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\FindFFEdit.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Huffman.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\LZW.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\PacketDecoder.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\PacketDecoderDlg.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Resource.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\stdafx.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="<22><><EFBFBD>ҽ<EFBFBD> <20><><EFBFBD><EFBFBD>"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
|
||||
<File
|
||||
RelativePath=".\res\PacketDecoder.ico">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\PacketDecoder.rc">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\res\PacketDecoder.rc2">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="LIBLZF"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath=".\Lzf\crc32.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Lzf\lzf.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Lzf\lzf_c.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Lzf\lzf_d.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Lzf\lzfP.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath=".\res\PacketDecoder.manifest">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ReadMe.txt">
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
<Global
|
||||
Name="RESOURCE_FILE"
|
||||
Value="PacketDecoder.rc"/>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
619
Server/ToolProject/PacketDecoder/PacketDecoderDlg.cpp
Normal file
619
Server/ToolProject/PacketDecoder/PacketDecoderDlg.cpp
Normal file
@@ -0,0 +1,619 @@
|
||||
// PacketDecoderDlg.cpp : <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "PacketDecoder.h"
|
||||
#include "PacketDecoderDlg.h"
|
||||
#include "Huffman.h"
|
||||
#include "LZW.h"
|
||||
#include <LZF/lzf.h>
|
||||
|
||||
#include <Network/Packet/PacketBase.h>
|
||||
#include <Network/Packet/PacketCommand.h>
|
||||
#include <Network/Packet/WrapPacket.h>
|
||||
#include <Network/XORCrypt/XORCrypt.h>
|
||||
#include <Utility/Compress/MiniLZO/MiniLZOWrapper.h>
|
||||
|
||||
#include <zlib/zlib.h>
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#endif
|
||||
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ǵ<EFBFBD> CAboutDlg <20><>ȭ <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
|
||||
class CAboutDlg : public CDialog
|
||||
{
|
||||
public:
|
||||
CAboutDlg();
|
||||
|
||||
// <20><>ȭ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
enum { IDD = IDD_ABOUTBOX };
|
||||
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV <20><><EFBFBD><EFBFBD>
|
||||
|
||||
// <20><><EFBFBD><EFBFBD>
|
||||
protected:
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
||||
CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
|
||||
{
|
||||
}
|
||||
|
||||
void CAboutDlg::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
}
|
||||
|
||||
BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
// CPacketDecoderDlg <20><>ȭ <20><><EFBFBD><EFBFBD>
|
||||
|
||||
|
||||
|
||||
CPacketDecoderDlg::CPacketDecoderDlg(CWnd* pParent /*=NULL*/)
|
||||
: CDialog(CPacketDecoderDlg::IDD, pParent)
|
||||
, m_szParseResult(_T(""))
|
||||
, m_szCompressMiniLZO(_T(""))
|
||||
, m_szCompressZLIB(_T(""))
|
||||
{
|
||||
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
|
||||
}
|
||||
|
||||
void CPacketDecoderDlg::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
DDX_Control(pDX, IDC_PACKET_CONTENT, m_edPacketContents);
|
||||
DDX_Control(pDX, IDC_WORKSPACE, m_edWorkspace);
|
||||
DDX_Text(pDX, IDC_PACKET_HEADER, m_szParseResult);
|
||||
DDX_Text(pDX, IDC_COMPRESS_MINILZO, m_szCompressMiniLZO);
|
||||
DDX_Text(pDX, IDC_COMPRESS_ZLIB, m_szCompressZLIB);
|
||||
|
||||
|
||||
}
|
||||
|
||||
BEGIN_MESSAGE_MAP(CPacketDecoderDlg, CDialog)
|
||||
ON_WM_SYSCOMMAND()
|
||||
ON_WM_PAINT()
|
||||
ON_WM_QUERYDRAGICON()
|
||||
//}}AFX_MSG_MAP
|
||||
ON_BN_CLICKED(IDC_PARSE_HEADER, OnBnClickedParseHeader)
|
||||
ON_BN_CLICKED(IDC_COMPRESS_PACKET, OnBnClickedCompressPacket)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
// CPacketDecoderDlg <20><EFBFBD><DEBD><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD>
|
||||
|
||||
BOOL CPacketDecoderDlg::OnInitDialog()
|
||||
{
|
||||
CDialog::OnInitDialog();
|
||||
|
||||
// <20>ý<EFBFBD><C3BD><EFBFBD> <20><EFBFBD><DEB4><EFBFBD> "<22><><EFBFBD><EFBFBD>..." <20><EFBFBD> <20><EFBFBD><D7B8><EFBFBD> <20>߰<EFBFBD><DFB0>մϴ<D5B4>.
|
||||
|
||||
// IDM_ABOUTBOX<4F><58> <20>ý<EFBFBD><C3BD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>־<EFBFBD><D6BE><EFBFBD> <20>մϴ<D5B4>.
|
||||
ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
|
||||
ASSERT(IDM_ABOUTBOX < 0xF000);
|
||||
|
||||
CMenu* pSysMenu = GetSystemMenu(FALSE);
|
||||
if (pSysMenu != NULL)
|
||||
{
|
||||
CString strAboutMenu;
|
||||
strAboutMenu.LoadString(IDS_ABOUTBOX);
|
||||
if (!strAboutMenu.IsEmpty())
|
||||
{
|
||||
pSysMenu->AppendMenu(MF_SEPARATOR);
|
||||
pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
|
||||
}
|
||||
}
|
||||
|
||||
// <20><> <20><>ȭ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>. <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20><> â<><C3A2> <20><>ȭ <20><><EFBFBD>ڰ<EFBFBD> <20>ƴ<EFBFBD> <20><><EFBFBD>쿡<EFBFBD><ECBFA1>
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD>ӿ<EFBFBD>ũ<EFBFBD><C5A9> <20><> <20>۾<EFBFBD><DBBE><EFBFBD> <20>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
|
||||
SetIcon(m_hIcon, TRUE); // ū <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
|
||||
SetIcon(m_hIcon, FALSE); // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
|
||||
|
||||
ShowWindow(SW_MINIMIZE);
|
||||
|
||||
// TODO: <20><><EFBFBD> <20>߰<EFBFBD> <20>ʱ<EFBFBD>ȭ <20>۾<EFBFBD><DBBE><EFBFBD> <20>߰<EFBFBD><DFB0>մϴ<D5B4>.
|
||||
|
||||
return TRUE; // <20><>Ʈ<EFBFBD>ѿ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> TRUE<55><45> <20><>ȯ<EFBFBD>մϴ<D5B4>.
|
||||
}
|
||||
|
||||
void CPacketDecoderDlg::OnSysCommand(UINT nID, LPARAM lParam)
|
||||
{
|
||||
if ((nID & 0xFFF0) == IDM_ABOUTBOX)
|
||||
{
|
||||
CAboutDlg dlgAbout;
|
||||
dlgAbout.DoModal();
|
||||
}
|
||||
else
|
||||
{
|
||||
CDialog::OnSysCommand(nID, lParam);
|
||||
}
|
||||
}
|
||||
|
||||
// <20><>ȭ <20><><EFBFBD>ڿ<EFBFBD> <20>ּ<EFBFBD>ȭ <20><><EFBFBD>߸<EFBFBD> <20>߰<EFBFBD><DFB0><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><D7B8><EFBFBD><EFBFBD><EFBFBD>
|
||||
// <20>Ʒ<EFBFBD> <20>ڵ尡 <20>ʿ<EFBFBD><CABF>մϴ<D5B4>. <20><><EFBFBD><EFBFBD>/<2F><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> MFC <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20><><EFBFBD>쿡<EFBFBD><ECBFA1>
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD>ӿ<EFBFBD>ũ<EFBFBD><C5A9><EFBFBD><EFBFBD> <20><> <20>۾<EFBFBD><DBBE><EFBFBD> <20>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
|
||||
|
||||
void CPacketDecoderDlg::OnPaint()
|
||||
{
|
||||
if (IsIconic())
|
||||
{
|
||||
CPaintDC dc(this); // <20><EFBFBD><D7B8>⸦ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>̽<EFBFBD> <20><><EFBFBD>ؽ<EFBFBD>Ʈ
|
||||
|
||||
SendMessage(WM_ICONERASEBKGND, reinterpret_cast<WPARAM>(dc.GetSafeHdc()), 0);
|
||||
|
||||
// Ŭ<><C5AC><EFBFBD>̾<EFBFBD>Ʈ <20>簢<EFBFBD><E7B0A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EEB5A5> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.
|
||||
int cxIcon = GetSystemMetrics(SM_CXICON);
|
||||
int cyIcon = GetSystemMetrics(SM_CYICON);
|
||||
CRect rect;
|
||||
GetClientRect(&rect);
|
||||
int x = (rect.Width() - cxIcon + 1) / 2;
|
||||
int y = (rect.Height() - cyIcon + 1) / 2;
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><D7B8>ϴ<EFBFBD>.
|
||||
dc.DrawIcon(x, y, m_hIcon);
|
||||
}
|
||||
else
|
||||
{
|
||||
CDialog::OnPaint();
|
||||
}
|
||||
}
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD>ڰ<EFBFBD> <20>ּ<EFBFBD>ȭ<EFBFBD><C8AD> â<><C3A2> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ȿ<EFBFBD> Ŀ<><C4BF><EFBFBD><EFBFBD> ǥ<>õǵ<C3B5><C7B5><EFBFBD> <20>ý<EFBFBD><C3BD>ۿ<EFBFBD><DBBF><EFBFBD>
|
||||
// <20><> <20>Լ<EFBFBD><D4BC><EFBFBD> ȣ<><C8A3><EFBFBD>մϴ<D5B4>.
|
||||
HCURSOR CPacketDecoderDlg::OnQueryDragIcon()
|
||||
{
|
||||
return static_cast<HCURSOR>(m_hIcon);
|
||||
}
|
||||
|
||||
|
||||
BYTE CharToHexNum(TCHAR cChar)
|
||||
{
|
||||
BYTE nVal = 0;
|
||||
|
||||
switch(cChar)
|
||||
{
|
||||
case _T('0'): nVal = 0; break;
|
||||
case _T('1'): nVal = 1; break;
|
||||
case _T('2'): nVal = 2; break;
|
||||
case _T('3'): nVal = 3; break;
|
||||
case _T('4'): nVal = 4; break;
|
||||
case _T('5'): nVal = 5; break;
|
||||
case _T('6'): nVal = 6; break;
|
||||
case _T('7'): nVal = 7; break;
|
||||
case _T('8'): nVal = 8; break;
|
||||
case _T('9'): nVal = 9; break;
|
||||
case _T('a'): nVal = 0xa; break;
|
||||
case _T('b'): nVal = 0xb; break;
|
||||
case _T('c'): nVal = 0xc; break;
|
||||
case _T('d'): nVal = 0xd; break;
|
||||
case _T('e'): nVal = 0xe; break;
|
||||
case _T('f'): nVal = 0xf; break;
|
||||
case _T('A'): nVal = 0xa; break;
|
||||
case _T('B'): nVal = 0xb; break;
|
||||
case _T('C'): nVal = 0xc; break;
|
||||
case _T('D'): nVal = 0xd; break;
|
||||
case _T('E'): nVal = 0xe; break;
|
||||
case _T('F'): nVal = 0xf; break;
|
||||
}
|
||||
|
||||
return nVal;
|
||||
}
|
||||
|
||||
LPCTSTR GetPacketNameFromCommand(PktBase::CMDType cPacketCmd)
|
||||
{
|
||||
#define ENUM_RETURN_STRING(x) case x: return _T(#x)
|
||||
|
||||
switch(cPacketCmd)
|
||||
{
|
||||
ENUM_RETURN_STRING(CmdNull);
|
||||
ENUM_RETURN_STRING(CmdAuthAccount);
|
||||
ENUM_RETURN_STRING(CmdServerGroup);
|
||||
ENUM_RETURN_STRING(CmdUserLogin);
|
||||
ENUM_RETURN_STRING(CmdUserKill);
|
||||
ENUM_RETURN_STRING(CmdCharSelect);
|
||||
ENUM_RETURN_STRING(CmdCharCreate);
|
||||
ENUM_RETURN_STRING(CmdCharDelete);
|
||||
ENUM_RETURN_STRING(CmdCharLogin);
|
||||
ENUM_RETURN_STRING(CmdCharSuicide);
|
||||
ENUM_RETURN_STRING(CmdCharRespawn);
|
||||
ENUM_RETURN_STRING(CmdCharMove);
|
||||
ENUM_RETURN_STRING(CmdCharMoveUpdate);
|
||||
ENUM_RETURN_STRING(CmdCharChat);
|
||||
ENUM_RETURN_STRING(CmdCharAttack);
|
||||
ENUM_RETURN_STRING(CmdCharCastObject);
|
||||
ENUM_RETURN_STRING(CmdCharUseSkill);
|
||||
ENUM_RETURN_STRING(CmdCharTakeItem);
|
||||
ENUM_RETURN_STRING(CmdCharSwapItem);
|
||||
ENUM_RETURN_STRING(CmdCharRepairItem);
|
||||
ENUM_RETURN_STRING(CmdCharUseItem);
|
||||
ENUM_RETURN_STRING(CmdCharTradeItem);
|
||||
ENUM_RETURN_STRING(CmdCharSkillLock);
|
||||
ENUM_RETURN_STRING(CmdCharSkillCreate);
|
||||
ENUM_RETURN_STRING(CmdCharSkillErase);
|
||||
ENUM_RETURN_STRING(CmdCharClassUpgrade);
|
||||
ENUM_RETURN_STRING(CmdCharShapeInfo);
|
||||
ENUM_RETURN_STRING(CmdCharIncreasePoint);
|
||||
ENUM_RETURN_STRING(CmdCharBindPosition);
|
||||
ENUM_RETURN_STRING(CmdCharRequireInfo);
|
||||
ENUM_RETURN_STRING(CmdCharUpdateAddress);
|
||||
ENUM_RETURN_STRING(CmdCharPartyCmd);
|
||||
ENUM_RETURN_STRING(CmdCharPartyMemInfo);
|
||||
ENUM_RETURN_STRING(CmdCharExchangeCmd);
|
||||
ENUM_RETURN_STRING(CmdSysConnectAgent);
|
||||
ENUM_RETURN_STRING(CmdSysPacketTransmit);
|
||||
ENUM_RETURN_STRING(CmdCharLogout);
|
||||
ENUM_RETURN_STRING(CmdDBGetData);
|
||||
ENUM_RETURN_STRING(CmdDBUpdateData);
|
||||
ENUM_RETURN_STRING(CmdAgentParty);
|
||||
ENUM_RETURN_STRING(CmdSysServerLogin);
|
||||
ENUM_RETURN_STRING(CmdServerZone);
|
||||
ENUM_RETURN_STRING(CmdGameCellInfo);
|
||||
ENUM_RETURN_STRING(CmdCharInfo);
|
||||
ENUM_RETURN_STRING(CmdCharAddressInfo);
|
||||
ENUM_RETURN_STRING(CmdCharCellLogin);
|
||||
ENUM_RETURN_STRING(CmdCharCellLogout);
|
||||
ENUM_RETURN_STRING(CmdMonMove);
|
||||
ENUM_RETURN_STRING(CmdCharAttackInfo);
|
||||
ENUM_RETURN_STRING(CmdCharAttacked);
|
||||
ENUM_RETURN_STRING(CmdCharAward);
|
||||
ENUM_RETURN_STRING(CmdCharItemInfo);
|
||||
ENUM_RETURN_STRING(CmdCharPickUp);
|
||||
ENUM_RETURN_STRING(CmdCharPullDown);
|
||||
ENUM_RETURN_STRING(CmdCharPickUpInfo);
|
||||
ENUM_RETURN_STRING(CmdCharPullDownInfo);
|
||||
ENUM_RETURN_STRING(CmdCharCastObjectInfo);
|
||||
ENUM_RETURN_STRING(CmdCharInstallSocket);
|
||||
ENUM_RETURN_STRING(CmdCharLevelUp);
|
||||
ENUM_RETURN_STRING(CmdCharPartyInfo);
|
||||
ENUM_RETURN_STRING(CmdCharUpgradeItem);
|
||||
ENUM_RETURN_STRING(CmdCharHPRegen);
|
||||
ENUM_RETURN_STRING(CmdCharLevelUpInfo);
|
||||
ENUM_RETURN_STRING(CmdCharSplitItem);
|
||||
ENUM_RETURN_STRING(CmdUpdateUIDTable);
|
||||
ENUM_RETURN_STRING(CmdCharQuickSlotMove);
|
||||
ENUM_RETURN_STRING(CmdCharSwitchEQ);
|
||||
ENUM_RETURN_STRING(CmdSysMngerRegistry);
|
||||
ENUM_RETURN_STRING(CmdSysMngerRequest);
|
||||
ENUM_RETURN_STRING(CmdSysMngerResponse);
|
||||
ENUM_RETURN_STRING(CmdCharTakeItems);
|
||||
ENUM_RETURN_STRING(CmdCharTakeGold);
|
||||
ENUM_RETURN_STRING(CmdCharExchangeItem);
|
||||
ENUM_RETURN_STRING(CmdCellBroadCasting);
|
||||
ENUM_RETURN_STRING(CmdSysPatchAddress);
|
||||
ENUM_RETURN_STRING(CmdCharPartyCmdInfo);
|
||||
ENUM_RETURN_STRING(CmdServerLog);
|
||||
ENUM_RETURN_STRING(CmdCharWhisper);
|
||||
ENUM_RETURN_STRING(CmdSysServerVerUpdate);
|
||||
ENUM_RETURN_STRING(CmdSysMng);
|
||||
ENUM_RETURN_STRING(CmdSysChannelUpdate);
|
||||
ENUM_RETURN_STRING(CmdCharPartyFind);
|
||||
ENUM_RETURN_STRING(CmdCharPartyMemData);
|
||||
ENUM_RETURN_STRING(CmdCharControlOption);
|
||||
ENUM_RETURN_STRING(CmdCharDuelCmd);
|
||||
ENUM_RETURN_STRING(CmdCharFameInfo);
|
||||
ENUM_RETURN_STRING(CmdLoginServerList);
|
||||
ENUM_RETURN_STRING(CmdCharSpellInfo);
|
||||
ENUM_RETURN_STRING(CmdCharSkillUnLock);
|
||||
ENUM_RETURN_STRING(CmdSysPing);
|
||||
ENUM_RETURN_STRING(CmdCharMoveZone);
|
||||
ENUM_RETURN_STRING(CmdAgentZone);
|
||||
ENUM_RETURN_STRING(CmdDeposit);
|
||||
ENUM_RETURN_STRING(CmdDepositUpdate);
|
||||
ENUM_RETURN_STRING(CmdCharStallOpen);
|
||||
ENUM_RETURN_STRING(CmdCharStallRegisterItem);
|
||||
ENUM_RETURN_STRING(CmdCharStallEnter);
|
||||
ENUM_RETURN_STRING(CmdCharStallItemInfo);
|
||||
ENUM_RETURN_STRING(CmdCharAdminCmd);
|
||||
ENUM_RETURN_STRING(CmdCharTeamBattleInfo);
|
||||
ENUM_RETURN_STRING(CmdFriendAddRequest);
|
||||
ENUM_RETURN_STRING(CmdFriendRemoveRequest);
|
||||
ENUM_RETURN_STRING(CmdFriendEtcRequest);
|
||||
ENUM_RETURN_STRING(CmdFriendAck);
|
||||
ENUM_RETURN_STRING(CmdFriendDB);
|
||||
ENUM_RETURN_STRING(CmdEliteBonus);
|
||||
ENUM_RETURN_STRING(CmdCharStartQuest);
|
||||
ENUM_RETURN_STRING(CmdCharOperateTrigger);
|
||||
ENUM_RETURN_STRING(CmdQuestDB);
|
||||
ENUM_RETURN_STRING(CmdCharEndQuest);
|
||||
ENUM_RETURN_STRING(CmdCharDisappearItem);
|
||||
ENUM_RETURN_STRING(CmdCharAuthorizePanel);
|
||||
ENUM_RETURN_STRING(CmdCharPeaceMode);
|
||||
ENUM_RETURN_STRING(CmdConfigInfoDB);
|
||||
ENUM_RETURN_STRING(CmdCharAutoRouting);
|
||||
ENUM_RETURN_STRING(CmdRankingInfo);
|
||||
ENUM_RETURN_STRING(CmdCharStateRedistribution);
|
||||
ENUM_RETURN_STRING(CmdBillingTimeoutNotify);
|
||||
ENUM_RETURN_STRING(CmdAdminToolGetData);
|
||||
ENUM_RETURN_STRING(CmdAdminToolSetData);
|
||||
ENUM_RETURN_STRING(CmdEventDropItem);
|
||||
ENUM_RETURN_STRING(CmdCharCancelQuest);
|
||||
ENUM_RETURN_STRING(CmdBillingTimeCheckNotify);
|
||||
ENUM_RETURN_STRING(CmdCharLotteryResult);
|
||||
ENUM_RETURN_STRING(CmdCharSummonCmd);
|
||||
ENUM_RETURN_STRING(CmdChatClientLogin);
|
||||
ENUM_RETURN_STRING(CmdChatLogin);
|
||||
ENUM_RETURN_STRING(CmdChatLogout);
|
||||
ENUM_RETURN_STRING(CmdChatInfoChanged);
|
||||
ENUM_RETURN_STRING(CmdCharSummon);
|
||||
ENUM_RETURN_STRING(CmdJapanAuthAccount);
|
||||
ENUM_RETURN_STRING(CmdCharBattleGroundRespawn);
|
||||
ENUM_RETURN_STRING(CmdCharRespawnWaitQueue);
|
||||
ENUM_RETURN_STRING(CmdStatueInfo);
|
||||
ENUM_RETURN_STRING(CmdCameraScript);
|
||||
ENUM_RETURN_STRING(CmdCharEquipDurability);
|
||||
ENUM_RETURN_STRING(CmdCreateGuild);
|
||||
ENUM_RETURN_STRING(CmdGuildCmd);
|
||||
ENUM_RETURN_STRING(CmdGuildMark);
|
||||
ENUM_RETURN_STRING(CmdGuildLevel);
|
||||
ENUM_RETURN_STRING(CmdGuildRelation);
|
||||
ENUM_RETURN_STRING(CmdGuildList);
|
||||
ENUM_RETURN_STRING(CmdGuildDB);
|
||||
ENUM_RETURN_STRING(CmdGuildRight);
|
||||
ENUM_RETURN_STRING(CmdGuildMemberList);
|
||||
ENUM_RETURN_STRING(CmdMyGuildInfo);
|
||||
ENUM_RETURN_STRING(CmdGuildSafe);
|
||||
ENUM_RETURN_STRING(CmdGuildMemberInfoUpdate);
|
||||
ENUM_RETURN_STRING(CmdCharStatusRetrain);
|
||||
ENUM_RETURN_STRING(CmdSysServerLogout);
|
||||
//ENUM_RETURN_STRING(CmdCharPartyAddress);
|
||||
//ENUM_RETURN_STRING(CmdCharPartyMemAddress);
|
||||
ENUM_RETURN_STRING(CmdBGServerMapList);
|
||||
ENUM_RETURN_STRING(CmdBGServerResultList);
|
||||
ENUM_RETURN_STRING(CmdBGServerMoveZone);
|
||||
ENUM_RETURN_STRING(CmdBGServerMileageChange);
|
||||
ENUM_RETURN_STRING(CmdBGServerCharSlot);
|
||||
ENUM_RETURN_STRING(CmdHanBTNWarning);
|
||||
ENUM_RETURN_STRING(CmdHanBTNUserKill);
|
||||
ENUM_RETURN_STRING(CmdCharRepairAllItem);
|
||||
ENUM_RETURN_STRING(CmdCSAuth);
|
||||
ENUM_RETURN_STRING(CmdCharItemChemical);
|
||||
ENUM_RETURN_STRING(CmdGuildInclination);
|
||||
ENUM_RETURN_STRING(CmdGuildMemberFameUpdate);
|
||||
ENUM_RETURN_STRING(CmdCastleInfo);
|
||||
ENUM_RETURN_STRING(CmdCampInfo);
|
||||
ENUM_RETURN_STRING(CmdCreateCastle);
|
||||
ENUM_RETURN_STRING(CmdCreateCamp);
|
||||
ENUM_RETURN_STRING(CmdCreateSiegeArms);
|
||||
ENUM_RETURN_STRING(CmdCastleCmd);
|
||||
ENUM_RETURN_STRING(CmdCampCmd);
|
||||
ENUM_RETURN_STRING(CmdSiegeArmsCmd);
|
||||
ENUM_RETURN_STRING(CmdCastleRight);
|
||||
ENUM_RETURN_STRING(CmdCampRight);
|
||||
ENUM_RETURN_STRING(CmdSiegeBroadCast);
|
||||
//ENUM_RETURN_STRING(CmdSiegeTimeInfo);
|
||||
ENUM_RETURN_STRING(CmdStealthInfo);
|
||||
//ENUM_RETURN_STRING(CmdCastleUpdate);
|
||||
ENUM_RETURN_STRING(CmdCellBroadCast2nd);
|
||||
ENUM_RETURN_STRING(CmdCharRespawnInfo);
|
||||
ENUM_RETURN_STRING(CmdCharRespawnAreaInfo);
|
||||
ENUM_RETURN_STRING(CmdCharEquipShopInfo);
|
||||
ENUM_RETURN_STRING(CmdSiegeBroadCast2nd);
|
||||
ENUM_RETURN_STRING(CmdCharItemOptionGraft);
|
||||
ENUM_RETURN_STRING(CmdCharItemCompensation);
|
||||
ENUM_RETURN_STRING(CmdGuildMemberGoldUpdate);
|
||||
ENUM_RETURN_STRING(CmdCampMessage);
|
||||
ENUM_RETURN_STRING(CmdNewSiegeBroadCast);
|
||||
ENUM_RETURN_STRING(CmdSelectAccountNation);
|
||||
ENUM_RETURN_STRING(CmdNationChangeResult);
|
||||
ENUM_RETURN_STRING(CmdUnifiedCharInfo);
|
||||
ENUM_RETURN_STRING(CmdUnifiedCharSelect);
|
||||
ENUM_RETURN_STRING(CmdChatBan);
|
||||
ENUM_RETURN_STRING(CmdGiveItemToTempInven);
|
||||
ENUM_RETURN_STRING(CmdCharNameChange);
|
||||
ENUM_RETURN_STRING(CmdFertilityInfo);
|
||||
ENUM_RETURN_STRING(CmdProcessMining);
|
||||
ENUM_RETURN_STRING(CmdWorldWeaponInfo);
|
||||
ENUM_RETURN_STRING(CmdCampShopInfo);
|
||||
ENUM_RETURN_STRING(CmdCharInstallRuneSocket);
|
||||
ENUM_RETURN_STRING(CmdTakeMaterial);
|
||||
ENUM_RETURN_STRING(CmdCastleTaxMove);
|
||||
ENUM_RETURN_STRING(CmdCastleSiegeCount);
|
||||
ENUM_RETURN_STRING(CmdCompressedPacket);
|
||||
ENUM_RETURN_STRING(CmdFinalPacketNum);
|
||||
}
|
||||
|
||||
return _T("Unknown Packet");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
PktBase* CPacketDecoderDlg::DecodePacket(LPBYTE lpBuffer, int nBufferLen, int& nPacketSize)
|
||||
{
|
||||
PktBase* lpPktBase = 0;
|
||||
|
||||
if (0 != lpBuffer)
|
||||
{
|
||||
CString szPacketContents;
|
||||
m_edPacketContents.GetWindowText(szPacketContents);
|
||||
|
||||
const LPCTSTR lpSeparator = _T(" \t\r\n");
|
||||
LPBYTE lpPacketCopyPos = lpBuffer;
|
||||
|
||||
int nTokenPos = 0;
|
||||
CString szToken;
|
||||
|
||||
szToken = szPacketContents.Tokenize(lpSeparator, nTokenPos);
|
||||
while(_T("") != szToken && lpPacketCopyPos - lpBuffer < nBufferLen)
|
||||
{
|
||||
szToken.MakeUpper();
|
||||
|
||||
if (2 == szToken.GetLength() &&
|
||||
_istxdigit(szToken.GetString()[0]) &&
|
||||
_istxdigit(szToken.GetString()[1]))
|
||||
{
|
||||
(*lpPacketCopyPos)
|
||||
= CharToHexNum(szToken.GetString()[0]) * 16
|
||||
+ CharToHexNum(szToken.GetString()[1]);
|
||||
|
||||
++lpPacketCopyPos;
|
||||
}
|
||||
|
||||
szToken = szPacketContents.Tokenize(lpSeparator, nTokenPos);
|
||||
}
|
||||
|
||||
nPacketSize = static_cast<int>(lpPacketCopyPos - lpBuffer);
|
||||
|
||||
CXORCrypt::GetInstance().DecodeHeader((char*)lpBuffer + 1, sizeof(PktBase) - 1, 0, 0);
|
||||
lpPktBase = reinterpret_cast<PktBase*>(lpBuffer);
|
||||
|
||||
if(lpPktBase->IsCrypt())
|
||||
{
|
||||
CXORCrypt::GetInstance().DecodePacket((char*)lpBuffer + sizeof(PktBase),
|
||||
nPacketSize - sizeof(PktBase), lpPktBase->GetCodePage());
|
||||
}
|
||||
else if(lpPktBase->IsCompress())
|
||||
{
|
||||
BYTE aryBuffer[PktMaxLen];
|
||||
memcpy(aryBuffer, lpBuffer, min(PktMaxLen, nPacketSize));
|
||||
|
||||
DWORD dwDecompressedSize = PktMaxLen;
|
||||
|
||||
if (!CMiniLZO::Decompress(
|
||||
(char*)aryBuffer + sizeof(PktBase),
|
||||
nPacketSize - sizeof(PktBase),
|
||||
(char*)lpBuffer + sizeof(PktBase),
|
||||
&dwDecompressedSize))
|
||||
{
|
||||
lpPktBase = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
lpPktBase->SetLen(
|
||||
static_cast<PktBase::LengthType>(dwDecompressedSize + sizeof(PktBase)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return lpPktBase;
|
||||
}
|
||||
|
||||
void CPacketDecoderDlg::OnBnClickedParseHeader()
|
||||
{
|
||||
// TODO: <20><><EFBFBD> <20><>Ʈ<EFBFBD><C6AE> <20>˸<EFBFBD> ó<><C3B3><EFBFBD><EFBFBD> <20>ڵ带 <20>߰<EFBFBD><DFB0>մϴ<D5B4>.
|
||||
|
||||
BYTE aryBuffer[PktMaxLen];
|
||||
|
||||
int nPacketSize = 0;
|
||||
|
||||
PktBase* lpPktBase = DecodePacket(aryBuffer, PktMaxLen, nPacketSize);
|
||||
if (0 != lpPktBase)
|
||||
{
|
||||
m_szParseResult.Format(_T("%s:%3d(0x%02x) : Real(%dByte)/Decoded(%dByte) (%s:%s)"),
|
||||
GetPacketNameFromCommand(lpPktBase->GetCmd()), lpPktBase->GetCmd(), lpPktBase->GetCmd(),
|
||||
nPacketSize, lpPktBase->GetLen(),
|
||||
lpPktBase->IsCrypt() ? _T("XOR Crypted") : _T("No Crypt"),
|
||||
lpPktBase->IsCompress() ? _T("MiniLZO Compressed") : _T("No Compressed"));
|
||||
}
|
||||
else
|
||||
{
|
||||
m_szParseResult.Empty();
|
||||
}
|
||||
|
||||
UpdateData(FALSE);
|
||||
}
|
||||
|
||||
void CPacketDecoderDlg::OnBnClickedCompressPacket()
|
||||
{
|
||||
// TODO: <20><><EFBFBD> <20><>Ʈ<EFBFBD><C6AE> <20>˸<EFBFBD> ó<><C3B3><EFBFBD><EFBFBD> <20>ڵ带 <20>߰<EFBFBD><DFB0>մϴ<D5B4>.
|
||||
BYTE aryBuffer[PktMaxLen];
|
||||
|
||||
int nPacketSize = 0;
|
||||
PktBase* lpPktBase = DecodePacket(aryBuffer, PktMaxLen, nPacketSize);
|
||||
if (0 != lpPktBase && sizeof(PktBase) <= lpPktBase->GetLen())
|
||||
{
|
||||
BYTE aryCompressedBuffer[PktMaxLen];
|
||||
DWORD dwCompressedSize = PktMaxLen;
|
||||
|
||||
if (PacketWrap::WrapCompress(
|
||||
reinterpret_cast<char*>(aryCompressedBuffer), dwCompressedSize,
|
||||
reinterpret_cast<char*>(lpPktBase), lpPktBase->GetLen(), 0, 0, 0))
|
||||
{
|
||||
m_szCompressMiniLZO.Format(_T("MiniLZO : <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>Ŷ <20><><EFBFBD><EFBFBD> : %5d / <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>Ŷ <20><><EFBFBD><EFBFBD> : %5d"),
|
||||
lpPktBase->GetLen(), dwCompressedSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_szCompressMiniLZO.Format(_T("MiniLZO : <20><>Ŷ <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD>"));
|
||||
}
|
||||
|
||||
/*
|
||||
dwCompressedSize = PktMaxLen;
|
||||
if (Z_OK == compress(aryCompressedBuffer, &dwCompressedSize,
|
||||
reinterpret_cast<LPBYTE>(lpPktBase + 1), lpPktBase->GetLen() - sizeof(PktBase)))
|
||||
{
|
||||
m_szCompressZLIB.Format(_T("ZLIB : <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>Ŷ <20><><EFBFBD><EFBFBD> : %5d / <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>Ŷ <20><><EFBFBD><EFBFBD> : %5d"),
|
||||
lpPktBase->GetLen(), dwCompressedSize + sizeof(PktBase));
|
||||
}
|
||||
else
|
||||
{
|
||||
m_szCompressZLIB.Format(_T("ZLIB : <20><>Ŷ <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD>"));
|
||||
}*/
|
||||
|
||||
/*
|
||||
LPBYTE lpBuffer = 0;
|
||||
int nDecompressSize = PktMaxLen;
|
||||
|
||||
if (CompressHuffman(reinterpret_cast<LPBYTE>(lpPktBase + 1),
|
||||
lpPktBase->GetLen() - sizeof(PktBase), lpBuffer, nDecompressSize))
|
||||
{
|
||||
m_szCompressZLIB.Format(_T("Huffman : <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>Ŷ <20><><EFBFBD><EFBFBD> : %5d / <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>Ŷ <20><><EFBFBD><EFBFBD> : %5d"),
|
||||
lpPktBase->GetLen(), nDecompressSize + sizeof(PktBase));
|
||||
|
||||
free(lpBuffer);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_szCompressZLIB.Format(_T("Huffman : <20><>Ŷ <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD>"));
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
LPBYTE lpBuffer = 0;
|
||||
int nDecompressSize = PktMaxLen;
|
||||
|
||||
if (CompressLZW(reinterpret_cast<LPBYTE>(lpPktBase + 1),
|
||||
lpPktBase->GetLen() - sizeof(PktBase), lpBuffer, nDecompressSize))
|
||||
{
|
||||
m_szCompressZLIB.Format(_T("LZW : <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>Ŷ <20><><EFBFBD><EFBFBD> : %5d / <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>Ŷ <20><><EFBFBD><EFBFBD> : %5d"),
|
||||
lpPktBase->GetLen(), nDecompressSize + sizeof(PktBase));
|
||||
|
||||
free(lpBuffer);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_szCompressZLIB.Format(_T("LZW : <20><>Ŷ <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD>"));
|
||||
}*/
|
||||
|
||||
unsigned int nDecompressSize = lzf_compress(lpPktBase + 1,
|
||||
lpPktBase->GetLen() - sizeof(PktBase), aryCompressedBuffer, PktMaxLen);
|
||||
|
||||
if (0 != nDecompressSize)
|
||||
{
|
||||
m_szCompressZLIB.Format(_T("LZF : <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>Ŷ <20><><EFBFBD><EFBFBD> : %5d / <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>Ŷ <20><><EFBFBD><EFBFBD> : %5d"),
|
||||
lpPktBase->GetLen(), nDecompressSize + sizeof(PktBase));
|
||||
}
|
||||
else
|
||||
{
|
||||
m_szCompressZLIB.Format(_T("LZF : <20><>Ŷ <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD>"));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
m_szCompressMiniLZO.Empty();
|
||||
m_szCompressZLIB.Empty();
|
||||
}
|
||||
|
||||
UpdateData(FALSE);
|
||||
}
|
||||
|
||||
49
Server/ToolProject/PacketDecoder/PacketDecoderDlg.h
Normal file
49
Server/ToolProject/PacketDecoder/PacketDecoderDlg.h
Normal file
@@ -0,0 +1,49 @@
|
||||
// PacketDecoderDlg.h : <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
//
|
||||
|
||||
#pragma once
|
||||
#include "afxwin.h"
|
||||
#include "FindFFEdit.h"
|
||||
|
||||
// forward decl
|
||||
struct PktBase;
|
||||
|
||||
// CPacketDecoderDlg <20><>ȭ <20><><EFBFBD><EFBFBD>
|
||||
// <20><>Ʈ<EFBFBD><C6AE>ũ<EFBFBD><C5A9> ĸ<><C4B8><EFBFBD><EFBFBD> <20><>Ŷ<EFBFBD><C5B6> <20>Է<EFBFBD><D4B7>ϸ<EFBFBD>, <20><><EFBFBD>ڵ<EFBFBD><DAB5>ؼ<EFBFBD> <20><><EFBFBD>ϴ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>̾Ƴ<CCBE><C6B3>ϴ<EFBFBD>.
|
||||
class CPacketDecoderDlg : public CDialog
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD>
|
||||
public:
|
||||
CPacketDecoderDlg(CWnd* pParent = NULL); // ǥ<><C7A5> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
// <20><>ȭ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
enum { IDD = IDD_PACKETDECODER_DIALOG };
|
||||
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV <20><><EFBFBD><EFBFBD>
|
||||
|
||||
|
||||
// <20><><EFBFBD><EFBFBD>
|
||||
protected:
|
||||
HICON m_hIcon;
|
||||
|
||||
// <20><EFBFBD><DEBD><EFBFBD> <20><> <20>Լ<EFBFBD><D4BC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD>.
|
||||
virtual BOOL OnInitDialog();
|
||||
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
|
||||
afx_msg void OnPaint();
|
||||
afx_msg HCURSOR OnQueryDragIcon();
|
||||
DECLARE_MESSAGE_MAP()
|
||||
|
||||
private:
|
||||
|
||||
afx_msg void OnBnClickedParseHeader();
|
||||
afx_msg void OnBnClickedCompressPacket();
|
||||
|
||||
PktBase* DecodePacket(LPBYTE lpBuffer, int nBufferLen, int& nPacketSize);
|
||||
|
||||
CFindFFEdit m_edPacketContents;
|
||||
CFindFFEdit m_edWorkspace;
|
||||
CString m_szParseResult;
|
||||
CString m_szCompressMiniLZO;
|
||||
CString m_szCompressZLIB;
|
||||
};
|
||||
77
Server/ToolProject/PacketDecoder/ReadMe.txt
Normal file
77
Server/ToolProject/PacketDecoder/ReadMe.txt
Normal file
@@ -0,0 +1,77 @@
|
||||
================================================================================
|
||||
MFC <20><><EFBFBD>̺귯<CCBA><EAB7AF> : PacketDecoder <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD>
|
||||
================================================================================
|
||||
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD>縦 <20><><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD> PacketDecoder <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>. <20><> <20><><EFBFBD><EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD>α<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>⺻<EFBFBD><E2BABB><EFBFBD><EFBFBD> MFC <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20>ۼ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
|
||||
|
||||
<EFBFBD><EFBFBD> <20><><EFBFBD>Ͽ<EFBFBD><CFBF><EFBFBD> PacketDecoder <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20><> <20><><EFBFBD>Ͽ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>䰡 <20><><EFBFBD>ԵǾ<D4B5>
|
||||
<EFBFBD>ֽ<EFBFBD><EFBFBD>ϴ<EFBFBD>.
|
||||
|
||||
PacketDecoder.vcproj
|
||||
<20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD>縦 <20><><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> VC++ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
<20><> <20><><EFBFBD>Ͽ<EFBFBD><CFBF><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Visual C++ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD>翡<EFBFBD><E7BFA1> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>÷<EFBFBD><C3B7><EFBFBD>,
|
||||
<20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>Ե˴ϴ<CBB4>.
|
||||
|
||||
PacketDecoder.h
|
||||
<20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>. <20><> <20><><EFBFBD>Ͽ<EFBFBD><CFBF><EFBFBD> <20>ٸ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD>õ<EFBFBD> Resource.h<><68> <20><><EFBFBD><EFBFBD>
|
||||
Ư<><C6AF> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ԵǸ<D4B5> CPacketDecoderApp <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>˴ϴ<CBB4>.
|
||||
|
||||
PacketDecoder.cpp
|
||||
CPacketDecoderApp <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20>ҽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
|
||||
PacketDecoder.rc
|
||||
<20><><EFBFBD>α<CEB1><D7B7><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20><><EFBFBD><EFBFBD> Microsoft Windows <20><><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
<20><> <20><><EFBFBD>Ͽ<EFBFBD><CFBF><EFBFBD> RES <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><CDB8><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><>Ʈ<EFBFBD><C6AE> <20><> Ŀ<><C4BF><EFBFBD><EFBFBD> <20><><EFBFBD>ԵǸ<D4B5>
|
||||
Microsoft Visual C++<2B><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ
|
||||
<20><><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD> 1042<34><32> <20><><EFBFBD><EFBFBD> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.
|
||||
|
||||
res\PacketDecoder.ico
|
||||
<20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ǵ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
<20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD>ҽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> PacketDecoder.rc<72><63> <20><><EFBFBD>Ե˴ϴ<CBB4>.
|
||||
|
||||
res\PacketDecoder.rc2
|
||||
Microsoft Visual C++<2B><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD> <20><><EFBFBD>Ե<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
<20><><EFBFBD>ҽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E2BFA1> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD> <20><> <20><><EFBFBD>Ͽ<EFBFBD> <20><><EFBFBD>ԵǾ<D4B5> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD>翡<EFBFBD><E7BFA1><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>ȭ <20><><EFBFBD><EFBFBD> Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.
|
||||
PacketDecoderDlg.h, PacketDecoderDlg.cpp - <20><>ȭ <20><><EFBFBD><EFBFBD>
|
||||
CPacketDecoderDlg Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>. <20><> Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD>
|
||||
<20><> <20><>ȭ <20><><EFBFBD>ڿ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ǵ˴ϴ<CBB4>. <20><>ȭ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ø<EFBFBD><C3B8><EFBFBD> PacketDecoder.rc<72><63>
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Microsoft Visual C++<2B><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
<EFBFBD><EFBFBD>Ÿ <20><><EFBFBD><EFBFBD>
|
||||
|
||||
ActiveX <20><>Ʈ<EFBFBD><C6AE>
|
||||
<20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD><EFBFBD><EFBFBD> ActiveX <20><>Ʈ<EFBFBD><C6AE><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
<EFBFBD><EFBFBD>Ÿ ǥ<><C7A5> <20><><EFBFBD><EFBFBD>
|
||||
|
||||
StdAfx.h, StdAfx.cpp
|
||||
<20≯<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>(PCH) PacketDecoder.pch <20><> <20≯<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD>
|
||||
<20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> StdAfx.obj<62><6A> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>Ǵ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
|
||||
Resource.h
|
||||
<20><><EFBFBD>ο<EFBFBD> <20><><EFBFBD>ҽ<EFBFBD> ID<49><44> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> ǥ<><C7A5> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
Microsoft Visual C++<2B><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>а<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD>մϴ<D5B4>.
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
<EFBFBD><EFBFBD>Ÿ <20><><EFBFBD><EFBFBD>
|
||||
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD>翡<EFBFBD><E7BFA1><EFBFBD><EFBFBD> "TODO:"<22><> <20><><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD> <20>߰<EFBFBD><DFB0>ϰų<CFB0> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ؾ<EFBFBD> <20>ϴ<EFBFBD>
|
||||
<EFBFBD>ҽ<EFBFBD> <20>ڵ带 <20><>Ÿ<EFBFBD><C5B8><EFBFBD>ϴ<EFBFBD>.
|
||||
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> DLL<4C><4C> MFC<46><43> <20><><EFBFBD><EFBFBD><EFBFBD>ϰ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20><><EFBFBD> <20> ü<><C3BC><EFBFBD><EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ٸ<EFBFBD> <20><><EFBFBD><EFBFBD> Microsoft Visual C++ CD-ROM<4F><4D> Win\System <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><CDB8><EFBFBD> <20>ִ<EFBFBD>
|
||||
<EFBFBD>ش<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD> MFC70XXX.DLL<4C><4C> <20><>ǻ<EFBFBD><C7BB><EFBFBD><EFBFBD> system <20>Ǵ<EFBFBD> system32 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><CDB8><EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> MFCLOC.DLL<4C><4C> <20≯<EFBFBD><CCB8><EFBFBD> <20>ٲپ<D9B2><D9BE><EFBFBD> <20>մϴ<D5B4>. "XXX"<22><> <20>ش<EFBFBD> <20><><EFBFBD> <20><>Ÿ<EFBFBD><C5B8><EFBFBD><EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Դϴ<EFBFBD>. <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> MFC70DEU.DLL<4C><4C><EFBFBD><EFBFBD> <20><><EFBFBD>Ͼ<EFBFBD><CFBE><EFBFBD> <20><>ȯ<EFBFBD><C8AF> <20><><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD> <20><><EFBFBD>Ե˴ϴ<CBB4>.
|
||||
<EFBFBD>̷<EFBFBD> <20>۾<EFBFBD><DBBE><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20>Ϻ<EFBFBD> UI <20><><EFBFBD>Ұ<EFBFBD> <20> ü<><C3BC><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ְ<EFBFBD> <20>˴ϴ<CBB4>.
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
27
Server/ToolProject/PacketDecoder/Resource.h
Normal file
27
Server/ToolProject/PacketDecoder/Resource.h
Normal file
@@ -0,0 +1,27 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by PacketDecoder.rc
|
||||
//
|
||||
#define IDM_ABOUTBOX 0x0010
|
||||
#define IDD_ABOUTBOX 100
|
||||
#define IDS_ABOUTBOX 101
|
||||
#define IDD_PACKETDECODER_DIALOG 102
|
||||
#define IDR_MAINFRAME 128
|
||||
#define IDC_PARSE_HEADER 1000
|
||||
#define IDC_COMPRESS_PACKET 1001
|
||||
#define IDC_PACKET_CONTENT 1002
|
||||
#define IDC_COMPRESS_MINILZO 1003
|
||||
#define IDC_PACKET_HEADER 1004
|
||||
#define IDC_WORKSPACE 1005
|
||||
#define IDC_COMPRESS_ZLIB 1006
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 129
|
||||
#define _APS_NEXT_COMMAND_VALUE 32771
|
||||
#define _APS_NEXT_CONTROL_VALUE 1006
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
BIN
Server/ToolProject/PacketDecoder/res/PacketDecoder.ico
Normal file
BIN
Server/ToolProject/PacketDecoder/res/PacketDecoder.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
22
Server/ToolProject/PacketDecoder/res/PacketDecoder.manifest
Normal file
22
Server/ToolProject/PacketDecoder/res/PacketDecoder.manifest
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<assemblyIdentity
|
||||
version="1.0.0.0"
|
||||
processorArchitecture="X86"
|
||||
name="Microsoft.Windows.PacketDecoder"
|
||||
type="win32"
|
||||
/>
|
||||
<description>여기에 응용 프로그램 설명을 추가합니다.</description>
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity
|
||||
type="win32"
|
||||
name="Microsoft.Windows.Common-Controls"
|
||||
version="6.0.0.0"
|
||||
processorArchitecture="X86"
|
||||
publicKeyToken="6595b64144ccf1df"
|
||||
language="*"
|
||||
/>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
</assembly>
|
||||
13
Server/ToolProject/PacketDecoder/res/PacketDecoder.rc2
Normal file
13
Server/ToolProject/PacketDecoder/res/PacketDecoder.rc2
Normal file
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// PacketDecoder.RC2 - resources Microsoft Visual C++<2B><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʴ<EFBFBD> <20><><EFBFBD>ҽ<EFBFBD>
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#error <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Microsoft Visual C++<2B><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.
|
||||
#endif //APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD> <20>߰<EFBFBD><DFB0>մϴ<D5B4>.
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
7
Server/ToolProject/PacketDecoder/stdafx.cpp
Normal file
7
Server/ToolProject/PacketDecoder/stdafx.cpp
Normal file
@@ -0,0 +1,7 @@
|
||||
// stdafx.cpp : ǥ<><C7A5> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20>ҽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
// PacketDecoder.pch<63><68> <20≯<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>˴ϴ<CBB4>.
|
||||
// stdafx.obj<62><6A> <20≯<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
|
||||
42
Server/ToolProject/PacketDecoder/stdafx.h
Normal file
42
Server/ToolProject/PacketDecoder/stdafx.h
Normal file
@@ -0,0 +1,42 @@
|
||||
// stdafx.h : <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʰ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>
|
||||
// ǥ<><C7A5> <20>ý<EFBFBD><C3BD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
// <20><><EFBFBD><EFBFBD> <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef VC_EXTRALEAN
|
||||
#define VC_EXTRALEAN // Windows <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʴ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ܽ<EFBFBD>ŵ<EFBFBD>ϴ<EFBFBD>.
|
||||
#endif
|
||||
|
||||
// <20>Ʒ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>÷<EFBFBD><C3B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>켱<EFBFBD>ϴ<EFBFBD> <20>÷<EFBFBD><C3B7><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ϴ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>Ǹ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ͻʽÿ<CABD>.
|
||||
// <20>ٸ<EFBFBD> <20>÷<EFBFBD><C3B7><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ǵ<EFBFBD> <20>ش<EFBFBD> <20><><EFBFBD><EFBFBD> <20>ֽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> MSDN<44><4E> <20><><EFBFBD><EFBFBD><EFBFBD>Ͻʽÿ<CABD>.
|
||||
#ifndef WINVER // Windows 95 <20><> Windows NT 4 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.
|
||||
#define WINVER 0x0400 // Windows 98<39><38> Windows 2000 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>µ<EFBFBD><C2B5><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ֽʽÿ<CABD>.
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32_WINNT // Windows NT 4 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.
|
||||
#define _WIN32_WINNT 0x0400 // Windows 98<39><38> Windows 2000 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>µ<EFBFBD><C2B5><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ֽʽÿ<CABD>.
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32_WINDOWS // Windows 98 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.
|
||||
#define _WIN32_WINDOWS 0x0410 // Windows Me <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>µ<EFBFBD><C2B5><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ֽʽÿ<CABD>.
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32_IE // IE 4.0 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.
|
||||
#define _WIN32_IE 0x0400 // IE 5.0 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>µ<EFBFBD><C2B5><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ֽʽÿ<CABD>.
|
||||
#endif
|
||||
|
||||
#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // <20>Ϻ<EFBFBD> CString <20><><EFBFBD><EFBFBD><EFBFBD>ڴ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>˴ϴ<CBB4>.
|
||||
|
||||
// MFC<46><43> <20><><EFBFBD><EFBFBD> <20>κа<CEBA> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><EFBFBD><DEBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>⸦ <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
|
||||
#define _AFX_ALL_WARNINGS
|
||||
|
||||
#include <afxwin.h> // MFC <20>ٽ<EFBFBD> <20><> ǥ<><C7A5> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
#include <afxext.h> // MFC <20>ͽ<EFBFBD><CDBD>ټ<EFBFBD>
|
||||
#include <afxdisp.h> // MFC <20>ڵ<EFBFBD>ȭ Ŭ<><C5AC><EFBFBD><EFBFBD>
|
||||
|
||||
#include <afxdtctl.h> // Internet Explorer 4 <20><><EFBFBD><EFBFBD> <20><>Ʈ<EFBFBD>ѿ<EFBFBD> <20><><EFBFBD><EFBFBD> MFC <20><><EFBFBD><EFBFBD>
|
||||
#ifndef _AFX_NO_AFXCMN_SUPPORT
|
||||
#include <afxcmn.h> // Windows <20><><EFBFBD><EFBFBD> <20><>Ʈ<EFBFBD>ѿ<EFBFBD> <20><><EFBFBD><EFBFBD> MFC <20><><EFBFBD><EFBFBD>
|
||||
#endif // _AFX_NO_AFXCMN_SUPPORT
|
||||
|
||||
Reference in New Issue
Block a user