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

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

?? spp_rpc_decode.c

?? 著名的入侵檢測系統snort的最新版本的源碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*** Copyright (C) 1998-2002 Martin Roesch <roesch@sourcefire.com>**** This program is free software; you can redistribute it and/or modify** it under the terms of the GNU General Public License Version 2 as** published by the Free Software Foundation.  You may not use, modify or** distribute this program under any other version of the GNU General** Public License.**** This program is distributed in the hope that it will be useful,** but WITHOUT ANY WARRANTY; without even the implied warranty of** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the** GNU General Public License for more details.**** You should have received a copy of the GNU General Public License** along with this program; if not, write to the Free Software** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.*//* $Id$ *//* spp_rpc_decode  *  * Purpose: * * This preprocessor normalizes the RPC requests from remote machines by * converting all fragments into one continous stream. * This is very useful for doing things like defeating hostile attackers * trying to stealth themselves from IDSs by fragmenting the request so the * string 0186A0 is broken up. * * Arguments: *    * This plugin takes a list of integers representing the TCP ports that the * user is interested in having normalized * * Effect: * * Changes the data in the packet payload and changes * p->dsize to reflect the new (smaller) payload size. * * Comments: * */#ifdef HAVE_CONFIG_H	 #include "config.h"	 #endif#include <sys/types.h>#include <stdlib.h>#include <ctype.h>#ifdef HAVE_STRINGS_H	 #include <strings.h>	 #endif#include "decode.h"#include "plugbase.h"#include "parser.h"#include "log.h"#include "debug.h"#include "util.h"#include "mstring.h"#include "snort.h"#include "detect.h"#include "log.h"#include "generators.h"#include "event_queue.h"#include "profiler.h"#include "bounds.h"#include "strlcatu.h"extern char *file_name;extern int file_line;extern int do_detect;extern u_int8_t DecodeBuffer[DECODE_BLEN];#define OPT_ALERT_FRAGMENTS "alert_fragments"#define OPT_ALERT_MULTIPLE_REQUESTS "no_alert_multiple_requests"#define OPT_ALERT_LARGE_FRAGMENTS "no_alert_large_fragments"#define OPT_ALERT_INCOMPLETE "no_alert_incomplete"#define TEXT_ALERT_MULTIPLE_REQUESTS "alert_multiple_requests"#define TEXT_ALERT_LARGE_FRAGMENTS "alert_large_fragments"#define TEXT_ALERT_INCOMPLETE "alert_incomplete"#define RPC_CLASS DECODE_CLASS /* use the same classification as the other decoder alerts */typedef struct _RpcDecodeData{    char alert_fragments;    /* Alert when we see ANY fragmented RPC requests */    char alert_incomplete; /* Alert when we don't see all of a request in one packet */    char alert_multi;        /* Alert when we see multiple requests in one packet */    char alert_large;        /* Alert when we see multiple requests in one packet */} RpcDecodeData;static RpcDecodeData rpcpreprocdata; /* Configuration Set */static char RpcDecodePorts[65536/8];#ifdef PERF_PROFILINGPreprocStats rpcdecodePerfStats;#endifvoid RpcDecodeInit(char *);void RpcDecodeInitIgnore(char *);void PreprocRpcDecode(Packet *, void *);void SetRpcPorts(char *);int ConvertRPC(Packet *);/* * Function: SetupRpcDecode() * * Purpose: Registers the preprocessor keyword and initialization  *          function into the preprocessor list. * * Arguments: None. * * Returns: void function * */void SetupRpcDecode(void){    /* link the preprocessor keyword to the init function in        the preproc list */    RegisterPreprocessor("rpc_decode", RpcDecodeInit);    DEBUG_WRAP(DebugMessage(DEBUG_RPC,"Preprocessor: RpcDecode in setup...\n"););}/* * Function: RpcDecodeInit(char *) * * Purpose: Processes the args sent to the preprocessor, sets up the *          port list, links the processing function into the preproc *          function list * * Arguments: args => ptr to argument string * * Returns: void function * */void RpcDecodeInit(char *args){    DEBUG_WRAP(DebugMessage(DEBUG_RPC,"Preprocessor: RpcDecode Initialized\n"););    bzero(&rpcpreprocdata,sizeof(RpcDecodeData));    /* turn on the following alerts by default */    rpcpreprocdata.alert_multi = 1;    rpcpreprocdata.alert_incomplete = 1;    rpcpreprocdata.alert_large = 1;        /* parse the argument list into a list of ports to normalize */    SetRpcPorts((char *)args);    /* Set the preprocessor function into the function list */    AddFuncToPreprocList(PreprocRpcDecode, PRIORITY_APPLICATION, PP_RPCDECODE);#ifdef PREF_PROFILING    RegisterPreprocessorProfile("rpcdecode", &rpcdecodePerfStats, 0, &totalPerfStats);#endif}/* * Function: SetRpcPorts(char *) * * Purpose: Reads the list of port numbers from the argument string and *          parses them into the port list data struct * * Arguments: portlist => argument list * * Returns: void function * */void SetRpcPorts(char *portlist){    char portstr[STD_BUF];    char **toks;    int is_reset = 0;    int num_toks;    int num;    if(portlist == NULL || *portlist == '\0')    {        portlist = "111 32771";    }    /* tokenize the argument list */    toks = mSplit(portlist, " ", 31, &num_toks, '\\');    LogMessage("rpc_decode arguments:\n");        /* convert the tokens and place them into the port list */    for(num = 0; num < num_toks; num++)    {        if(isdigit((int)toks[num][0]))        {            char *num_p = NULL; /* used to determine last position in string */            long t_num;            t_num = strtol(toks[num], &num_p, 10);            if(*num_p != '\0')            {                FatalError("ERROR %s(%d) => Port Number invalid format: %s\n",                           file_name, file_line, toks[num]);            }            else if(t_num < 0 || t_num > 65535)            {	        FatalError("ERROR %s(%d) => Port Number out of range: %ld\n",                           file_name, file_line, t_num);            }            /* user specified a legal port number and it should override the default               port list, so reset it unless already done */            if(!is_reset)            {                bzero(&RpcDecodePorts, sizeof(RpcDecodePorts));                portstr[0] = '\0';                is_reset = 1;            }            /* mark this port as being interesting using some portscan2-type voodoo,               and also add it to the port list string while we're at it so we can               later print out all the ports with a single LogMessage() */            RpcDecodePorts[(t_num/8)] |= 1<<(t_num%8);            strlcat(portstr, toks[num], STD_BUF - 1);            strlcat(portstr, " ", STD_BUF - 1);        }        else if(!strcasecmp(OPT_ALERT_MULTIPLE_REQUESTS,toks[num]))        {            rpcpreprocdata.alert_multi = 0;        }        else if(!strcasecmp(OPT_ALERT_INCOMPLETE,toks[num]))        {            rpcpreprocdata.alert_incomplete = 0;        }        else if(!strcasecmp(OPT_ALERT_LARGE_FRAGMENTS,toks[num]))        {            rpcpreprocdata.alert_large = 0;        }        else if(!strcasecmp(OPT_ALERT_FRAGMENTS,toks[num]))        {            rpcpreprocdata.alert_fragments = 1;        }        else        {            FatalError("ERROR %s(%d) => Unknown argument to rpc_decode "                       "preprocessor: \"%s\"\n",                       file_name, file_line, toks[num]);        }    }    mSplitFree(&toks, num_toks);    /* print out final port list */    LogMessage("    Ports to decode RPC on: %s\n", portstr);    LogMessage("    %s: %s\n", OPT_ALERT_FRAGMENTS, rpcpreprocdata.alert_fragments ? "ACTIVE": "INACTIVE");    LogMessage("    %s: %s\n", TEXT_ALERT_LARGE_FRAGMENTS, rpcpreprocdata.alert_large ? "ACTIVE": "INACTIVE");    LogMessage("    %s: %s\n", TEXT_ALERT_INCOMPLETE, rpcpreprocdata.alert_incomplete ? "ACTIVE": "INACTIVE");    LogMessage("    %s: %s\n", TEXT_ALERT_MULTIPLE_REQUESTS, rpcpreprocdata.alert_multi ? "ACTIVE": "INACTIVE");}                                                                                  /* * Function: PreprocRpcDecode(Packet *) * * Purpose: Inspects the packet's payload for fragment records and  *          converts them into one infragmented record. * * Arguments: p => pointer to the current packet data struct  * * Returns: void function * */void PreprocRpcDecode(Packet *p, void *context){    int ret = 0; /* return code for ConvertRPC */    PROFILE_VARS;        DEBUG_WRAP(DebugMessage(DEBUG_RPC,"rpc decoder init on %d bytes\n", p->dsize););    /* check to make sure we're talking TCP and that the TWH has already       completed before processing anything */    if(!PacketIsTCP(p))    {        DEBUG_WRAP(DebugMessage(DEBUG_RPC,"It isn't TCP session traffic\n"););        return;    }    if((snort_runtime.capabilities.stateful_inspection == 1) &&       (p->packet_flags & PKT_FROM_SERVER))    {        DEBUG_WRAP(DebugMessage(DEBUG_RPC,"This is from a server\n"););        return;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91精品福利视频| 欧美一区二区在线不卡| 欧美人体做爰大胆视频| 亚洲一区二区三区中文字幕| 在线亚洲一区二区| 99久久综合99久久综合网站| 日韩一区二区三区电影| 国产一区在线观看视频| 久久精品水蜜桃av综合天堂| 麻豆国产欧美一区二区三区| 精品日韩在线观看| 狠狠色狠狠色综合| 国产精品欧美一区喷水| 91免费看片在线观看| 丝袜亚洲另类欧美综合| 日韩午夜三级在线| 欧美一区二区三区白人| 精品久久国产字幕高潮| 国产情人综合久久777777| 91精品国产高清一区二区三区| 欧美一区永久视频免费观看| 欧美一区二区日韩| 久久人人97超碰com| 欧美日韩在线播放三区四区| 国产一区二区三区免费| 粉嫩aⅴ一区二区三区四区五区 | 久久久777精品电影网影网 | 激情文学综合网| 国产91丝袜在线观看| 色呦呦一区二区三区| 国产精品亚洲第一| 免费久久99精品国产| 亚洲国产精品一区二区尤物区| 国产欧美日韩另类视频免费观看| 国产精品久久影院| 欧美电影免费提供在线观看| 欧美日韩精品一区二区三区蜜桃 | 亚洲日本中文字幕区| 久久影院午夜片一区| 日韩你懂的电影在线观看| 国产三级欧美三级| 亚洲va欧美va国产va天堂影院| 亚洲国产激情av| 久久久久久久久一| 亚洲一区二区三区影院| 国产精品资源网站| 欧美日本一区二区三区| 国产精品成人免费精品自在线观看| 午夜伦理一区二区| 日韩中文字幕1| eeuss鲁片一区二区三区在线看| 欧美精品久久天天躁| 51精品秘密在线观看| 欧美二区在线观看| 亚洲免费观看高清| 亚洲免费三区一区二区| 精品在线播放免费| 国产大陆亚洲精品国产| 国产精品1024| 日韩一区二区三区视频在线 | 黑人巨大精品欧美一区| 欧美三级韩国三级日本一级| 成人免费视频在线观看| 一区二区三区精品在线| 亚洲成人精品一区| 色就色 综合激情| 国产精品全国免费观看高清| 久久国产精品第一页| 国产精品123区| 国产亚洲欧美在线| 国产一区久久久| 日本一区免费视频| 黄色日韩三级电影| 日韩一卡二卡三卡四卡| 天天操天天色综合| 8x8x8国产精品| 日韩精品五月天| 欧美视频在线观看一区| 欧美丰满一区二区免费视频| 亚洲国产精品久久不卡毛片| 欧美午夜免费电影| 天堂va蜜桃一区二区三区| 欧美巨大另类极品videosbest | 欧美一区二区黄色| 免费成人在线观看视频| 日韩精品一区二区三区视频| 国产麻豆精品视频| 国产精品久久久久9999吃药| 成人黄色777网| 日韩久久久久久| 国产成人av一区二区三区在线| 欧美激情在线一区二区三区| av动漫一区二区| 亚洲高清不卡在线| 久久综合九色综合97_久久久| 成人一区二区三区在线观看| 欧美中文字幕一区| 亚洲国产精品传媒在线观看| 99国产精品一区| 亚洲v日本v欧美v久久精品| 日韩欧美激情在线| 国产夫妻精品视频| 一区二区激情视频| 日韩欧美中文字幕制服| 波多野结衣精品在线| 日日骚欧美日韩| 国产欧美精品日韩区二区麻豆天美| jizzjizzjizz欧美| 亚洲一区二区欧美日韩| 精品国产1区2区3区| 热久久免费视频| 国产欧美一区二区精品忘忧草 | 精品视频色一区| 国产精品一二三四| 视频一区在线视频| 中文字幕欧美区| 欧美一区二视频| 91麻豆精品一区二区三区| 久久丁香综合五月国产三级网站| 亚洲欧洲三级电影| 日韩视频一区在线观看| 91电影在线观看| 成人国产精品免费观看视频| 日韩成人精品在线观看| 欧美日韩成人高清| 成人av集中营| 精品伊人久久久久7777人| 亚洲最大的成人av| 亚洲欧美综合在线精品| 欧美电视剧免费全集观看| 精品视频一区二区不卡| 色综合中文字幕| 亚洲精品欧美激情| 欧美精品乱码久久久久久| 成人午夜看片网址| 国产在线日韩欧美| 久久精品国产成人一区二区三区| 亚洲欧美日韩精品久久久久| 久久精品夜夜夜夜久久| 日韩精品一区二区三区在线观看| 一本一道久久a久久精品| 成人黄色网址在线观看| 国内久久婷婷综合| 九九精品视频在线看| 亚洲不卡在线观看| 亚洲成人7777| 亚洲一二三四在线观看| 一区二区三区国产| 亚洲美女淫视频| 一区二区三区四区国产精品| 综合久久给合久久狠狠狠97色| 国产午夜精品一区二区三区四区| 欧美不卡视频一区| 欧美不卡激情三级在线观看| 欧美成人乱码一区二区三区| 欧美一区二区女人| 日韩欧美国产电影| 亚洲精品在线电影| 中文字幕精品一区二区精品绿巨人 | 亚洲精品日韩一| 亚洲一区二区中文在线| 亚洲成a天堂v人片| 日韩国产精品久久| 美女爽到高潮91| 国产一区视频在线看| 国产91高潮流白浆在线麻豆| 99久久伊人网影院| 欧美无砖专区一中文字| 91.麻豆视频| 久久久久久久电影| 1024亚洲合集| 亚洲国产精品一区二区尤物区| 日本不卡一区二区三区高清视频| 免费一级欧美片在线观看| 极品少妇xxxx精品少妇| 国产经典欧美精品| 97精品超碰一区二区三区| 欧美天堂亚洲电影院在线播放| 日韩一级大片在线观看| 国产欧美日韩在线看| 亚洲一区二区中文在线| 国产综合久久久久久鬼色| 99久久久久久| 在线不卡一区二区| 日本一区二区视频在线| 亚洲一区在线免费观看| 日产欧产美韩系列久久99| 国产精品综合一区二区| 欧美色网一区二区| 91麻豆精品国产91久久久| 日本一区二区三区高清不卡| 亚洲综合免费观看高清完整版| 捆绑调教一区二区三区| 色综合久久综合网97色综合 | 99精品视频一区二区三区| 欧美一区永久视频免费观看| 亚洲欧美日韩久久精品| 国产精品亚洲一区二区三区在线| 欧美日韩不卡在线| 综合电影一区二区三区 |