亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? jitter.h

?? Windows XP下的抓包程序實現
?? H
字號:
/*
 * Copyright (c) 2002 - 2005 NetGroup, Politecnico di Torino (Italy)
 * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California)
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, 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. Neither the name of the Politecnico di Torino, CACE Technologies 
 * nor the names of its contributors may be used to endorse or promote 
 * products derived from this software without specific prior written 
 * permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, 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 OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 */

/** @addtogroup NPF 
 *  @{
 */

//
// Registers
//
#define EAX 0
#define ECX 1
#define EDX 2
#define EBX 3
#define ESP 4
#define EBP 5
#define ESI 6
#define EDI 7

#define AX 0
#define CX 1
#define DX 2
#define BX 3
#define SP 4
#define BP 5
#define SI 6
#define DI 7

#define AL 0
#define CL 1
#define DL 2
#define BL 3

/*! \brief A stream of X86 binary code.*/
typedef struct binary_stream{
	INT cur_ip;		///< Current X86 instruction pointer.
	INT bpf_pc;		///< Current BPF instruction pointer, i.e. position in the BPF program reached by the jitter.
	PCHAR ibuf;		///< Instruction buffer, contains the X86 generated code.
	PUINT refs;		///< Jumps reference table.
}binary_stream;


/*! \brief Prototype of a filtering function created by the jitter. 

  The syntax and the meaning of the parameters is analogous to the one of bpf_filter(). Notice that the filter
  is not among the parameters, because it is hardwired in the function.
*/
typedef UINT (__cdecl *BPF_filter_function)( PVOID *, ULONG, UINT);

/*! \brief Prototype of the emit functions.

  Different emit functions are used to create the reference table and to generate the actual filtering code.
  This allows to have simpler instruction macros.
  The first parameter is the stream that will receive the data. The secon one is a variable containing
  the data, the third one is the length, that can be 1,2 or 4 since it is possible to emit a byte, a short
  or a work at a time.
*/
typedef void (*emit_func)(binary_stream *stream, ULONG value, UINT n);

/*! \brief Structure describing a x86 filtering program created by the jitter.*/
typedef struct JIT_BPF_Filter{
	BPF_filter_function Function;	///< The x86 filtering binary, in the form of a BPF_filter_function.
	PINT mem;
}
JIT_BPF_Filter;




/**************************/
/* X86 INSTRUCTION MACROS */
/**************************/

/// mov r32,i32
#define MOVid(r32, i32) \
  emitm(&stream, 11 << 4 | 1 << 3 | r32 & 0x7, 1); emitm(&stream, i32, 4);

/// mov dr32,sr32
#define MOVrd(dr32, sr32) \
  emitm(&stream, 8 << 4 | 3 | 1 << 3, 1); emitm(&stream,  3 << 6 | (dr32 & 0x7) << 3 | sr32 & 0x7, 1);

/// mov dr32,sr32[off]
#define MOVodd(dr32, sr32, off) \
  emitm(&stream, 8 << 4 | 3 | 1 << 3, 1); \
  emitm(&stream,  1 << 6 | (dr32 & 0x7) << 3 | sr32 & 0x7, 1);\
  emitm(&stream,  off, 1);

/// mov dr32,sr32[or32]
#define MOVobd(dr32, sr32, or32) \
  emitm(&stream, 8 << 4 | 3 | 1 << 3, 1); \
  emitm(&stream,  (dr32 & 0x7) << 3 | 4 , 1);\
  emitm(&stream,  (or32 & 0x7) << 3 | (sr32 & 0x7) , 1);

/// mov dr16,sr32[or32]
#define MOVobw(dr32, sr32, or32) \
  emitm(&stream, 0x66, 1); \
  emitm(&stream, 8 << 4 | 3 | 1 << 3, 1); \
  emitm(&stream,  (dr32 & 0x7) << 3 | 4 , 1);\
  emitm(&stream,  (or32 & 0x7) << 3 | (sr32 & 0x7) , 1);

/// mov dr8,sr32[or32]
#define MOVobb(dr8, sr32, or32) \
  emitm(&stream, 0x8a, 1); \
  emitm(&stream,  (dr8 & 0x7) << 3 | 4 , 1);\
  emitm(&stream,  (or32 & 0x7) << 3 | (sr32 & 0x7) , 1);

/// mov [dr32][or32],sr32
#define MOVomd(dr32, or32, sr32) \
  emitm(&stream, 0x89, 1); \
  emitm(&stream,  (sr32 & 0x7) << 3 | 4 , 1);\
  emitm(&stream,  (or32 & 0x7) << 3 | (dr32 & 0x7) , 1);

/// bswap dr32
#define BSWAP(dr32) \
  emitm(&stream, 0xf, 1); \
  emitm(&stream,  0x19 << 3 | dr32 , 1);

/// xchg al,ah
#define SWAP_AX() \
  emitm(&stream, 0x86, 1); \
  emitm(&stream,  0xc4 , 1);

/// push r32
#define PUSH(r32) \
  emitm(&stream, 5 << 4 | 0 << 3 | r32 & 0x7, 1);

/// pop r32
#define POP(r32) \
  emitm(&stream, 5 << 4 | 1 << 3 | r32 & 0x7, 1);

/// ret
#define RET() \
  emitm(&stream, 12 << 4 | 0 << 3 | 3, 1);

/// add dr32,sr32
#define ADDrd(dr32, sr32) \
  emitm(&stream, 0x03, 1);\
  emitm(&stream, 3 << 6 | (dr32 & 0x7) << 3 | (sr32 & 0x7), 1);

/// add eax,i32
#define ADD_EAXi(i32) \
  emitm(&stream, 0x05, 1);\
  emitm(&stream, i32, 4);

/// add r32,i32
#define ADDid(r32, i32) \
  emitm(&stream, 0x81, 1);\
  emitm(&stream, 24 << 3 | r32, 1);\
  emitm(&stream, i32, 4);

/// add r32,i8
#define ADDib(r32, i8) \
  emitm(&stream, 0x83, 1);\
  emitm(&stream, 24 << 3 | r32, 1);\
  emitm(&stream, i8, 1);

/// sub dr32,sr32
#define SUBrd(dr32, sr32) \
  emitm(&stream, 0x2b, 1);\
  emitm(&stream, 3 << 6 | (dr32 & 0x7) << 3 | (sr32 & 0x7), 1);

/// sub eax,i32
#define SUB_EAXi(i32) \
  emitm(&stream, 0x2d, 1);\
  emitm(&stream, i32, 4);

/// mul r32
#define MULrd(r32) \
  emitm(&stream, 0xf7, 1);\
  emitm(&stream, 7 << 5 | (r32 & 0x7), 1);

/// div r32
#define DIVrd(r32) \
  emitm(&stream, 0xf7, 1);\
  emitm(&stream, 15 << 4 | (r32 & 0x7), 1);

/// and r8,i8
#define ANDib(r8, i8) \
  emitm(&stream, 0x80, 1);\
  emitm(&stream, 7 << 5 | r8, 1);\
  emitm(&stream, i8, 1);

/// and r32,i32
#define ANDid(r32, i32) \
  if (r32 == EAX){ \
  emitm(&stream, 0x25, 1);\
  emitm(&stream, i32, 4);}\
  else{ \
  emitm(&stream, 0x81, 1);\
  emitm(&stream, 7 << 5 | r32, 1);\
  emitm(&stream, i32, 4);}

/// and dr32,sr32
#define ANDrd(dr32, sr32) \
  emitm(&stream, 0x23, 1);\
  emitm(&stream,  3 << 6 | (dr32 & 0x7) << 3 | sr32 & 0x7, 1);

/// or dr32,sr32
#define ORrd(dr32, sr32) \
  emitm(&stream, 0x0b, 1);\
  emitm(&stream,  3 << 6 | (dr32 & 0x7) << 3 | sr32 & 0x7, 1);

/// or r32,i32
#define ORid(r32, i32) \
  if (r32 == EAX){ \
  emitm(&stream, 0x0d, 1);\
  emitm(&stream, i32, 4);}\
  else{ \
  emitm(&stream, 0x81, 1);\
  emitm(&stream, 25 << 3 | r32, 1);\
  emitm(&stream, i32, 4);}

/// shl r32,i8
#define SHLib(r32, i8) \
  emitm(&stream, 0xc1, 1);\
  emitm(&stream, 7 << 5 | r32 & 0x7, 1);\
  emitm(&stream, i8, 1);

/// shl dr32,cl
#define SHL_CLrb(dr32) \
  emitm(&stream, 0xd3, 1);\
  emitm(&stream,  7 << 5 | dr32 & 0x7, 1);

/// shr r32,i8
#define SHRib(r32, i8) \
  emitm(&stream, 0xc1, 1);\
  emitm(&stream, 29 << 3 | r32 & 0x7, 1);\
  emitm(&stream, i8, 1);

/// shr dr32,cl
#define SHR_CLrb(dr32) \
  emitm(&stream, 0xd3, 1);\
  emitm(&stream,  29 << 3 | dr32 & 0x7, 1);

/// neg r32
#define NEGd(r32) \
  emitm(&stream, 0xf7, 1);\
  emitm(&stream,  27 << 3 | r32 & 0x7, 1);

/// cmp dr32,sr32[off]
#define CMPodd(dr32, sr32, off) \
  emitm(&stream, 3 << 4 | 3 | 1 << 3, 1); \
  emitm(&stream,  1 << 6 | (dr32 & 0x7) << 3 | sr32 & 0x7, 1);\
  emitm(&stream,  off, 1);

/// cmp dr32,sr32
#define CMPrd(dr32, sr32) \
  emitm(&stream, 0x3b, 1); \
  emitm(&stream,  3 << 6 | (dr32 & 0x7) << 3 | sr32 & 0x7, 1);

/// cmp dr32,i32
#define CMPid(dr32, i32) \
  if (dr32 == EAX){ \
  emitm(&stream, 0x3d, 1); \
  emitm(&stream,  i32, 4);} \
  else{ \
  emitm(&stream, 0x81, 1); \
  emitm(&stream,  0x1f << 3 | (dr32 & 0x7), 1);\
  emitm(&stream,  i32, 4);}

/// jne off32
#define JNEb(off8) \
   emitm(&stream, 0x75, 1);\
   emitm(&stream, off8, 1);

/// je off32
#define JE(off32) \
   emitm(&stream, 0x0f, 1);\
   emitm(&stream, 0x84, 1);\
   emitm(&stream, off32, 4);

/// jle off32
#define JLE(off32) \
   emitm(&stream, 0x0f, 1);\
   emitm(&stream, 0x8e, 1);\
   emitm(&stream, off32, 4);

/// jle off8
#define JLEb(off8) \
   emitm(&stream, 0x7e, 1);\
   emitm(&stream, off8, 1);

/// ja off32
#define JA(off32) \
   emitm(&stream, 0x0f, 1);\
   emitm(&stream, 0x87, 1);\
   emitm(&stream, off32, 4);
   
/// jae off32
#define JAE(off32) \
   emitm(&stream, 0x0f, 1);\
   emitm(&stream, 0x83, 1);\
   emitm(&stream, off32, 4);

/// jg off32
#define JG(off32) \
   emitm(&stream, 0x0f, 1);\
   emitm(&stream, 0x8f, 1);\
   emitm(&stream, off32, 4);

/// jge off32
#define JGE(off32) \
   emitm(&stream, 0x0f, 1);\
   emitm(&stream, 0x8d, 1);\
   emitm(&stream, off32, 4);

/// jmp off32
#define JMP(off32) \
   emitm(&stream, 0xe9, 1);\
   emitm(&stream, off32, 4);

/**
 *  @}
 */

/**************************/
/* Prototypes             */
/**************************/

/** @addtogroup NPF_code 
 *  @{
 */

/*!
  \brief BPF jitter, builds an x86 function from a BPF program.
  \param fp The BPF pseudo-assembly filter that will be translated into x86 code.
  \param nins Number of instructions of the input filter.
  \return The JIT_BPF_Filter structure containing the x86 filtering binary.

  BPF_jitter allocates the buffers for the new native filter and then translates the program pointed by fp
  calling BPFtoX86().
*/ 
JIT_BPF_Filter* BPF_jitter(struct bpf_insn *fp, INT nins);

/*!
  \brief Translates a set of BPF instructions in a set of x86 ones.
  \param ins Pointer to the BPF instructions that will be translated into x86 code.
  \param nins Number of instructions to translate.
  \param mem Memory used by the x86 function to emulate the RAM of the BPF pseudo processor.
  \return The x86 filtering function.

  This function does the hard work for the JIT compilation. It takes a group of BPF pseudo instructions and 
  through the instruction macros defined in jitter.h it is able to create an function directly executable
  by NPF.
*/ 
BPF_filter_function BPFtoX86(struct bpf_insn *ins, UINT nins, INT *mem);
/*!
  \brief Deletes a filtering function that was previously created by BPF_jitter().
  \param Filter The filter to destroy.

  This function frees the variuos buffers (code, memory, etc.) associated with a filtering function.
*/ 
void BPF_Destroy_JIT_Filter(JIT_BPF_Filter *Filter);

/**
 *  @}
 */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
北岛玲一区二区三区四区| 亚洲最大的成人av| 国产一区二区三区最好精华液| 欧美日本韩国一区| 午夜精品爽啪视频| 日韩精品专区在线影院观看| 国产自产2019最新不卡| 亚洲国产精品成人综合色在线婷婷| 成人综合激情网| 亚洲精品视频在线看| 欧美日韩精品电影| 国产在线一区二区| 亚洲四区在线观看| 欧美精品丝袜久久久中文字幕| 日韩av不卡一区二区| 精品动漫一区二区三区在线观看| 国产精品综合一区二区| 亚洲欧美在线另类| 69久久99精品久久久久婷婷| 国内久久精品视频| 亚洲欧美在线观看| 日韩欧美国产午夜精品| 丁香天五香天堂综合| 亚洲精品中文在线影院| 精品国产一区a| 99精品久久只有精品| 奇米色一区二区| 国产亚洲精品7777| 欧美日韩专区在线| 国产麻豆精品theporn| 亚洲色大成网站www久久九九| 欧美男生操女生| 成人av影院在线| 日本视频一区二区| 亚洲图片你懂的| 日韩欧美成人一区| 色噜噜狠狠成人中文综合| 激情深爱一区二区| 樱花影视一区二区| 国产欧美综合在线观看第十页 | 久久久亚洲高清| 色哟哟国产精品| 国产精品99久久久久久久女警 | 欧美精品亚洲一区二区在线播放| 国产91丝袜在线播放| 午夜精品久久久久久不卡8050 | 亚洲精品欧美专区| 欧美精品一区在线观看| 欧美日韩在线免费视频| www.在线成人| 国产乱人伦精品一区二区在线观看 | 国产成人亚洲综合色影视| 日韩精品一级二级| 一区二区三区.www| 中文字幕在线观看不卡| 久久久久久**毛片大全| 欧美丰满一区二区免费视频| 色婷婷狠狠综合| 成人午夜精品一区二区三区| 国产九色sp调教91| 国内成人精品2018免费看| 视频一区二区三区中文字幕| 亚洲一区在线观看免费| 亚洲精品视频免费观看| 亚洲人精品午夜| 综合久久久久久久| 国产清纯在线一区二区www| 久久久蜜臀国产一区二区| 欧美一级欧美三级在线观看| 欧美美女bb生活片| 欧美日韩国产免费| 欧美精品第1页| 欧美日韩激情在线| 欧美日韩精品高清| 欧美人xxxx| 欧美一区二区三区人| 91精品国产91久久久久久一区二区 | 国产精品免费aⅴ片在线观看| 精品久久久久香蕉网| 精品av久久707| 精品对白一区国产伦| 久久久一区二区三区| 欧美激情一区二区三区| 亚洲国产精品精华液ab| 国产精品久久久久久久久图文区| 国产精品系列在线| 亚洲人xxxx| 亚洲第一二三四区| 免费精品视频在线| 国产精品538一区二区在线| 国产成人99久久亚洲综合精品| 不卡一区在线观看| 色婷婷av一区二区三区软件| 91麻豆国产在线观看| 欧美日韩国产综合一区二区三区| 欧美日韩电影一区| 精品久久久久久无| 中文字幕乱码亚洲精品一区| 一区二区三区蜜桃网| 亚洲午夜激情网页| 看电视剧不卡顿的网站| 高清国产一区二区| 色国产综合视频| 制服.丝袜.亚洲.另类.中文 | 日韩一卡二卡三卡四卡| 日韩一级片在线播放| 国产日产欧产精品推荐色| 国产精品久久久久国产精品日日| 亚洲精品va在线观看| 美国毛片一区二区| 99久久久久久| 欧美一区二区三区精品| 久久久99精品久久| 亚洲高清免费观看| 激情小说欧美图片| 91电影在线观看| 久久久久亚洲蜜桃| 亚洲第一激情av| 成人黄色在线看| 337p亚洲精品色噜噜狠狠| 久久先锋资源网| 一区二区三区日韩| 国产一区二区h| 91无套直看片红桃| 欧美岛国在线观看| 亚洲在线视频网站| 国产成人亚洲精品青草天美| 欧美中文字幕久久| 国产视频一区二区三区在线观看 | 亚洲精品视频在线观看免费| 精品在线观看视频| 欧美色综合天天久久综合精品| 久久精品网站免费观看| 亚洲mv在线观看| 92国产精品观看| 久久青草欧美一区二区三区| 午夜久久福利影院| 色天使色偷偷av一区二区| 日韩一区二区精品| 亚洲福利一二三区| 91一区一区三区| 国产精品三级av| 国产呦萝稀缺另类资源| 日韩一区二区三| 五月天亚洲精品| 欧洲一区二区三区免费视频| 国产精品网站一区| 国产一区二区三区四区在线观看| 91麻豆精品国产无毒不卡在线观看| 亚洲日穴在线视频| av中文字幕不卡| 国产日韩亚洲欧美综合| 久久99精品国产.久久久久| 欧美喷水一区二区| 亚洲第一在线综合网站| 欧美午夜电影一区| 1024成人网| 99久久婷婷国产综合精品电影| 久久先锋资源网| 国产精品一二三四| 欧美精品一区二区三区在线 | 日韩视频123| 日本不卡一区二区三区高清视频| 欧美亚洲国产bt| 亚洲一区二区三区在线| 欧美私人免费视频| 亚洲成人一二三| 欧美福利一区二区| 蜜臀av一区二区三区| 欧美成人性战久久| 国产一区二区网址| 国产精品午夜春色av| 91网址在线看| 亚洲r级在线视频| 日韩一区二区三区视频| 国产一区二区三区不卡在线观看| 久久影音资源网| 国产成人鲁色资源国产91色综| 欧美经典三级视频一区二区三区| 岛国av在线一区| 综合电影一区二区三区| 欧美亚一区二区| 日韩成人精品视频| 日韩精品中文字幕一区二区三区| 蜜臀av国产精品久久久久 | 国产精品99久| 中文字幕成人网| 91激情在线视频| 人人爽香蕉精品| 久久久美女毛片| 91久久精品一区二区| 青青草国产精品97视觉盛宴| 国产亚洲短视频| 色老综合老女人久久久| 秋霞午夜鲁丝一区二区老狼| 久久久久免费观看| 在线一区二区三区做爰视频网站| 日韩国产欧美视频| 国产亚洲人成网站| 欧美性欧美巨大黑白大战|