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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? spp_httpinspect.c

?? 著名的入侵檢測(cè)系統(tǒng)snort的最新版本的源碼
?? C
字號(hào):
/**************************************************************************** * * Copyright (C) 2003-2007 Sourcefire, Inc. * * 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. * ****************************************************************************/ /****  @file       preproc_setup.c**  **  @author     Daniel Roelker <droelker@sourcefire.com>****  @brief      This file initializes HttpInspect as a Snort **              preprocessor.****  This file registers the HttpInspect initialization function,**  adds the HttpInspect function into the preprocessor list, reads**  the user configuration in the snort.conf file, and prints out**  the configuration that is read.****  In general, this file is a wrapper to HttpInspect functionality,**  by interfacing with the Snort preprocessor functions.  The rest**  of HttpInspect should be separate from the preprocessor hooks.****  NOTES****  - 2.10.03:  Initial Development.  DJR*/#include <string.h>#include <sys/types.h>#include "decode.h"#include "plugbase.h"#include "debug.h"#include "util.h"#include "hi_ui_config.h"#include "hi_client.h"#include "hi_norm.h"#include "snort_httpinspect.h"#include "hi_util_kmap.h"#include "hi_util_xmalloc.h"#include "snort.h"#include "profiler.h"/***  Defines for preprocessor initialization*//****  snort.conf preprocessor keyword*/#define GLOBAL_KEYWORD   "http_inspect"#define SERVER_KEYWORD   "http_inspect_server"/****  The length of the error string buffer.*/#define ERRSTRLEN 1000/***  External Global Variables**  Variables that we need from Snort to log errors correctly and such.*/extern char *file_name;extern char *file_line;extern HttpUri UriBufs[URI_COUNT];/***  Global Variables**  This is the only way to work with Snort preprocessors because**  the user configuration must be kept between the Init function**  the actual preprocessor.  There is no interaction between the**  two except through global variable usage.*/HTTPINSPECT_GLOBAL_CONF GlobalConf;#ifdef PERF_PROFILINGPreprocStats hiPerfStats;PreprocStats hiDetectPerfStats;int hiDetectCalled = 0;#endif/*** Prototypes*/static void HttpInspectDropStats(int);static void HttpInspect(Packet *, void *);static void HttpInspectCleanExit(int, void *);static void HttpInspectInit(char *);/***  NAME**    HttpInspect::*//****  This function wraps the functionality in the generic HttpInspect**  processing.  We get a Packet structure and pass this into the**  HttpInspect module where the first stage in HttpInspect is the**  Session Inspection stage where most of the other Snortisms are**  taken care of.  After that, the modules should be fairly generic,**  and that's what we're trying to do here.****  @param p a Packet structure that contains Snort info about the**  packet.****  @return void*/static void HttpInspect(Packet *p, void *context){    PROFILE_VARS;    /*    **  IMPORTANT:    **  This is where we initialize any variables that can impact other    **  aspects of detection/processing.    **    **  First thing that we do is reset the p->uri_count to zero, so there    **  is no way that we would inspect a buffer that was completely bogus.    */    p->uri_count = 0;    UriBufs[0].decode_flags = 0;    /*    **  Check for valid packet    **  if neither header or data is good, then we just abort.    */    if(!IPH_IS_VALID(p) || !p->tcph || !p->data || !p->dsize)    {        return;    }    PREPROC_PROFILE_START(hiPerfStats);    /*    **  Pass in the configuration and the packet.    */    SnortHttpInspect(&GlobalConf, p);    p->uri_count = 0;    UriBufs[0].decode_flags = 0;    /* XXX:     * NOTE: this includes the HTTPInspect directly     * calling the detection engine -      * to get the true HTTPInspect only stats, have another     * var inside SnortHttpInspect that tracks the time     * spent in Detect().     * Subtract the ticks from this if iCallDetect == 0     */    PREPROC_PROFILE_END(hiPerfStats);#ifdef PERF_PROFILING    if (hiDetectCalled)    {        hiPerfStats.ticks -= hiDetectPerfStats.ticks;        /* And Reset ticks to 0 */        hiDetectPerfStats.ticks = 0;        hiDetectCalled = 0;    }#endif    return;}static void HttpInspectDropStats(int exiting) {    if(!hi_stats.total)        return;    LogMessage("HTTP Inspect - encodings (Note: stream-reassembled "               "packets included):\n");#ifdef WIN32    LogMessage("    POST methods:                   %-10I64u\n", hi_stats.post);    LogMessage("    GET methods:                    %-10I64u\n", hi_stats.get);    LogMessage("    Post parameters extracted:      %-10I64u\n", hi_stats.post_params);    LogMessage("    Unicode:                        %-10I64u\n", hi_stats.unicode);    LogMessage("    Double unicode:                 %-10I64u\n", hi_stats.double_unicode);    LogMessage("    Non-ASCII representable:        %-10I64u\n", hi_stats.non_ascii);    LogMessage("    Base 36:                        %-10I64u\n", hi_stats.base36);    LogMessage("    Directory traversals:           %-10I64u\n", hi_stats.dir_trav);    LogMessage("    Extra slashes (\"//\"):           %-10I64u\n", hi_stats.slashes);    LogMessage("    Self-referencing paths (\"./\"):  %-10I64u\n", hi_stats.self_ref);    LogMessage("    Total packets processed:        %-10I64u\n", hi_stats.total);#else    LogMessage("    POST methods:                   %-10llu\n", hi_stats.post);    LogMessage("    GET methods:                    %-10llu\n", hi_stats.get);    LogMessage("    Post parameters extracted:      %-10llu\n", hi_stats.post_params);    LogMessage("    Unicode:                        %-10llu\n", hi_stats.unicode);    LogMessage("    Double unicode:                 %-10llu\n", hi_stats.double_unicode);    LogMessage("    Non-ASCII representable:        %-10llu\n", hi_stats.non_ascii);    LogMessage("    Base 36:                        %-10llu\n", hi_stats.base36);    LogMessage("    Directory traversals:           %-10llu\n", hi_stats.dir_trav);    LogMessage("    Extra slashes (\"//\"):           %-10llu\n", hi_stats.slashes);    LogMessage("    Self-referencing paths (\"./\"):  %-10llu\n", hi_stats.self_ref);    LogMessage("    Total packets processed:        %-10llu\n", hi_stats.total);#endif}static void HttpInspectCleanExit(int signal, void *data){    /* Cleanup */    KMapDelete(GlobalConf.server_lookup);    xfree(GlobalConf.iis_unicode_map);}/***  NAME**    HttpInspectInit::*//****  This function initializes HttpInspect with a user configuration.****  The function is called when HttpInspect is configured in **  snort.conf.  It gets passed a string of arguments, which gets**  parsed into configuration constructs that HttpInspect understands.****  This function gets called for every HttpInspect configure line.  We**  use this characteristic to split up the configuration, so each line**  is a configuration construct.  We need to keep track of what part**  of the configuration has been configured, so we don't configure one**  part, then configure it again.****  Any upfront memory is allocated here (if necessary).****  @param args a string to the preprocessor arguments.****  @return void*/static void HttpInspectInit(char *args){    char ErrorString[ERRSTRLEN];    int  iErrStrLen = ERRSTRLEN;    int  iRet;    static int siFirstConfig = 1;    int  iGlobal = 0;    if(siFirstConfig)    {        memset(&hi_stats, 0, sizeof(HIStats));         iRet = hi_ui_config_init_global_conf(&GlobalConf);        if (iRet)        {            snprintf(ErrorString, iErrStrLen,                    "Error initializing Global Configuration.");            FatalError("%s(%d) => %s\n", file_name, file_line, ErrorString);            return;        }        iRet = hi_ui_config_default(&GlobalConf);        if (iRet)        {            snprintf(ErrorString, iErrStrLen,                    "Error configuring default global configuration.");            FatalError("%s(%d) => %s\n", file_name, file_line, ErrorString);            return;        }        iRet = hi_client_init(&GlobalConf);        if (iRet)        {            snprintf(ErrorString, iErrStrLen,                    "Error initializing client module.");            FatalError("%s(%d) => %s\n", file_name, file_line, ErrorString);            return;        }        iRet = hi_norm_init(&GlobalConf);        if (iRet)        {            snprintf(ErrorString, iErrStrLen,                     "Error initializing normalization module.");            FatalError("%s(%d) => %s\n", file_name, file_line, ErrorString);            return;        }        /*        **  We set the global configuration variable        */        iGlobal = 1;    }        iRet = HttpInspectSnortConf(&GlobalConf, args, iGlobal, ErrorString, iErrStrLen);    if (iRet)    {        if(iRet > 0)        {            /*            **  Non-fatal Error            */            if(ErrorString)            {                ErrorMessage("%s(%d) => %s\n",                         file_name, file_line, ErrorString);            }        }        else        {            /*            **  Fatal Error, log error and exit.            */            if(ErrorString)            {                FatalError("%s(%d) => %s\n",                         file_name, file_line, ErrorString);            }            else            {                /*                **  Check if ErrorString is undefined.                */                if(iRet == -2)                {                    FatalError("%s(%d) => ErrorString is undefined.\n",                             file_name, file_line);                }                else                {                    FatalError("%s(%d) => Undefined Error.\n",                             file_name, file_line);                }            }        }    }    /*    **  Only add the functions one time to the preproc list.    */    if(siFirstConfig)    {        /*        **  Add HttpInspect into the preprocessor list        */        AddFuncToPreprocList(HttpInspect, PRIORITY_APPLICATION, PP_HTTPINSPECT);        RegisterPreprocStats("http_inspect", HttpInspectDropStats);        /*        **  Remember to add any cleanup functions into the appropriate        **  lists.        */        AddFuncToPreprocCleanExitList(HttpInspectCleanExit, NULL, PRIORITY_APPLICATION, PP_HTTPINSPECT);        AddFuncToPreprocRestartList(HttpInspectCleanExit, NULL, PRIORITY_APPLICATION, PP_HTTPINSPECT);        siFirstConfig = 0;#ifdef PERF_PROFILING        RegisterPreprocessorProfile("httpinspect", &hiPerfStats, 0, &totalPerfStats);#endif    }    return;}/***  NAME**    SetupHttpInspect::*//****  This function initializes HttpInspect as a Snort preprocessor.****  It registers the preprocessor keyword for use in the snort.conf**  and sets up the initialization module for the preprocessor, in**  case it is configured.****  This function must be called in InitPreprocessors() in plugbase.c**  in order to be recognized by Snort.****  @param none****  @return void*/void SetupHttpInspect(){    RegisterPreprocessor(GLOBAL_KEYWORD, HttpInspectInit);    RegisterPreprocessor(SERVER_KEYWORD, HttpInspectInit);    AddFuncToConfigCheckList(HttpInspectCheckConfig);    DEBUG_WRAP(DebugMessage(DEBUG_HTTPINSPECT, "Preprocessor: HttpInspect is "                "setup . . .\n"););}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91精品国产一区二区三区| 国产精品亚洲成人| 老司机午夜精品| 国产乱子伦视频一区二区三区| 成人一级黄色片| 欧美色综合天天久久综合精品| 91精品国产综合久久国产大片| 久久精品人人爽人人爽| 亚洲欧美日韩一区二区三区在线观看| 亚洲国产日韩综合久久精品| 日韩av一二三| 不卡电影免费在线播放一区| 欧美顶级少妇做爰| 久久久久久久网| 亚洲一级二级三级在线免费观看| 乱中年女人伦av一区二区| 丁香激情综合五月| 欧美性猛交xxxxxxxx| 久久综合色8888| 一区二区三区精品久久久| 久久精品72免费观看| 91片在线免费观看| 日韩欧美综合在线| 亚洲人成网站在线| 久久99精品国产麻豆婷婷洗澡| 成人免费视频免费观看| 69堂成人精品免费视频| 国精产品一区一区三区mba视频| 不卡的av中国片| 精品成人私密视频| 夜色激情一区二区| 粉嫩嫩av羞羞动漫久久久| 91精品午夜视频| 亚洲六月丁香色婷婷综合久久| 精品亚洲欧美一区| 欧美日韩中文国产| 最新久久zyz资源站| 蜜桃视频一区二区三区| 色先锋aa成人| 欧美高清在线精品一区| 蜜桃久久久久久久| 欧洲日韩一区二区三区| 国产欧美日韩久久| 美日韩一级片在线观看| 欧美视频一区二区三区四区| 国产精品久久久久久久久久久免费看 | 亚洲一区在线观看免费| 成人午夜激情影院| 日韩精品最新网址| 午夜影院久久久| 色噜噜狠狠色综合中国| 国产精品美女久久久久久久久久久 | 91麻豆国产福利精品| 久久九九影视网| 精品一区二区三区免费观看| 欧美日本在线一区| 亚洲综合视频在线观看| 99这里只有久久精品视频| 日本一区二区视频在线| 国内成人自拍视频| 精品免费视频一区二区| 日韩国产精品久久久| 欧美日韩视频第一区| 亚洲精品免费在线观看| 色婷婷av久久久久久久| 亚洲欧美在线视频| eeuss鲁片一区二区三区在线观看 eeuss鲁片一区二区三区在线看 | 欧美www视频| 蜜桃精品视频在线| 日韩视频123| 免费成人在线网站| 日韩一区二区三区在线视频| 婷婷六月综合网| 欧美日韩视频不卡| 日韩精品亚洲一区二区三区免费| 在线视频欧美精品| 亚洲第一综合色| 欧美三级韩国三级日本一级| 亚洲444eee在线观看| 欧美日本国产一区| 青草av.久久免费一区| 欧美高清性hdvideosex| 日韩高清不卡一区二区三区| 4438x亚洲最大成人网| 日韩精品视频网站| 精品国产露脸精彩对白 | 国产日韩欧美精品综合| 精品国精品国产尤物美女| 蜜臂av日日欢夜夜爽一区| 日韩欧美国产一区在线观看| 精品一区二区三区的国产在线播放| 精品国产乱子伦一区| 国产精品一区二区黑丝| 国产精品视频一区二区三区不卡| 93久久精品日日躁夜夜躁欧美| 日韩一区中文字幕| 欧美日韩久久久久久| 肉色丝袜一区二区| 欧美精品一区二| 成人听书哪个软件好| 亚洲免费在线视频| 91精品国产品国语在线不卡| 精品一二三四区| 中文字幕一区在线观看视频| 在线视频欧美区| 免费成人你懂的| 国产区在线观看成人精品| 91丨九色丨蝌蚪富婆spa| 图片区日韩欧美亚洲| 欧美变态tickle挠乳网站| 成人av网站免费| 亚洲成人第一页| 久久久久综合网| 欧美在线一区二区三区| 美国十次了思思久久精品导航| 国产欧美日韩精品在线| 欧美无人高清视频在线观看| 精品一区二区三区的国产在线播放| 国产精品乱码一区二三区小蝌蚪| 欧美日韩国产成人在线91| 国产激情视频一区二区三区欧美 | 99视频超级精品| 午夜精品福利久久久| 久久久午夜精品理论片中文字幕| 色婷婷av一区二区三区软件| 激情综合色丁香一区二区| 亚洲欧美中日韩| 欧美本精品男人aⅴ天堂| 色偷偷成人一区二区三区91| 久久国产乱子精品免费女| 亚洲精品视频观看| 亚洲精品一线二线三线无人区| 色婷婷久久久亚洲一区二区三区| 久久99精品网久久| 亚洲精品国产a| 国产欧美一区二区精品性色| 欧美久久一区二区| av不卡免费电影| 久久99国产精品久久| 亚洲一区二区三区四区中文字幕| 久久久久99精品一区| 欧美日本韩国一区| 99久久99久久精品免费看蜜桃| 麻豆精品视频在线观看| 亚洲三级在线免费观看| 国产亚洲综合在线| 91精品婷婷国产综合久久| 色国产综合视频| 国产69精品久久777的优势| 日本91福利区| 亚洲一区二区五区| 国产精品美女久久久久久久久| 日韩久久久久久| 欧美精品在线一区二区三区| 一本色道久久加勒比精品| 成人免费高清在线| 韩国女主播一区| 日本欧美肥老太交大片| www.66久久| 国产激情一区二区三区四区 | 欧美精品一区二区三区在线播放 | 欧美a一区二区| 亚洲综合999| 亚洲精品网站在线观看| 国产精品系列在线| 久久亚洲精精品中文字幕早川悠里| 欧美高清dvd| 欧美日韩一区二区三区四区| 91久久精品一区二区三| 99久久夜色精品国产网站| 国产高清在线精品| 国产综合色在线| 狠狠久久亚洲欧美| 国产在线播放一区三区四| 免费成人在线观看视频| 日本人妖一区二区| 免费人成黄页网站在线一区二区| 日日夜夜一区二区| 首页综合国产亚洲丝袜| 亚洲午夜久久久久中文字幕久| 亚洲乱码日产精品bd| 亚洲精品视频观看| 一区二区在线观看视频| 一区二区三区四区不卡在线 | 欧美嫩在线观看| 欧美日韩高清一区二区不卡| 欧美午夜在线一二页| 欧美视频精品在线观看| 欧美色视频在线| 7777精品伊人久久久大香线蕉完整版 | 久久中文字幕电影| 久久亚洲一区二区三区明星换脸| 久久久久久麻豆| 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | 国产成人av一区二区三区在线| 国产精品一区二区久久不卡| 成人涩涩免费视频| 91网页版在线| 欧美性色黄大片| 日韩亚洲欧美综合|