?? stdafx.h
字號(hào):
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#if !defined(AFX_STDAFX_H__3BD776CD_ACBE_4A2A_94F8_83E8D63C4506__INCLUDED_)
#define AFX_STDAFX_H__3BD776CD_ACBE_4A2A_94F8_83E8D63C4506__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#include <afx.h>
#include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions
#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h> // MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT
#include <iostream>
#define MAX_PACK_LEN 65536
#define MAX_HOSTNAME_LAN 256
#define MAX_ADDR_LEN 24
#define SIO_RCVALL _WSAIOW(IOC_VENDOR,1)
#define SIO_RCVALL_MCAST _WSAIOW(IOC_VENDOR,2)
#define SIO_RCVALL_IGMPMCAST _WSAIOW(IOC_VENDOR,3)
#define SIO_KEEPALIVE_VALS _WSAIOW(IOC_VENDOR,4)
#define SIO_ABSORB_RTRALERT _WSAIOW(IOC_VENDOR,5)
#define SIO_UCAST_IF _WSAIOW(IOC_VENDOR,6)
#define SIO_LIMIT_BROADCASTS _WSAIOW(IOC_VENDOR,7)
#define SIO_INDEX_BIND _WSAIOW(IOC_VENDOR,8)
#define SIO_INDEX_MCASTIF _WSAIOW(IOC_VENDOR,9)
#define SIO_INDEX_ADD_MCAST _WSAIOW(IOC_VENDOR,10)
#define SIO_INDEX_DEL_MCAST _WSAIOW(IOC_VENDOR,11)
#define GAME_SERVER_PORT 6900
#include <malloc.h>
#include <winsock2.h>
#pragma comment(lib, "ws2_32.lib")
#include <process.h>
struct IP_HEADER
{
unsigned char h_lenver; //4位首部長(zhǎng)度+4位IP版本號(hào)
unsigned char tos; //8位服務(wù)類型TOS
unsigned short total_len; //16位總長(zhǎng)度(字節(jié))
unsigned short ident; //16位標(biāo)識(shí)
unsigned short frag_and_flags; //3位標(biāo)志位+13位片偏移
unsigned char ttl; //8位生存時(shí)間 TTL
unsigned char proto; //8位協(xié)議 (TCP, UDP 或其他)
unsigned short checksum; //16位IP首部校驗(yàn)和
unsigned int sourceIP; //32位源IP地址
unsigned int destIP; //32位目的IP地址
};
struct TCP_HEADER //定義TCP首部
{
USHORT th_sport; //16位源端口
USHORT th_dport; //16位目的端口
unsigned int th_seq; //32位序列號(hào)
unsigned int th_ack; //32位確認(rèn)號(hào)
unsigned char th_lenres; //4位首部長(zhǎng)度/6位保留字
unsigned char th_flag; //6位標(biāo)志位(USG ACK PSH PST SYN FIN)
USHORT th_win; //16位窗口大小
USHORT th_sum; //16位校驗(yàn)和
USHORT th_urp; //16位緊急數(shù)據(jù)偏移量
};
char SourceIPAddress[MAX_ADDR_LEN];
char DestIPAddress[MAX_ADDR_LEN];
bool GameLogined = false;
char GameWorld[MAX_PATH] = {0};
char GameUid[MAX_PATH] = {0};
char GamePwd[MAX_PATH] = {0};
volatile bool IIACSLogined = false;
BOOL InitSocket();
BOOL DoSniffing();
BOOL DecodeIPPack(const char *Buffer,const int BufferSize);
BOOL DecodeTCPPack(const char * TCPBuffer,const int BufferSize);
void CheckGameQuit(void * p);
#include "../common/geco.h"
#include "../accl/accl.h"
// TODO: reference additional headers your program requires here
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_STDAFX_H__3BD776CD_ACBE_4A2A_94F8_83E8D63C4506__INCLUDED_)
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -