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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? snort_httpinspect.c

?? 著名的入侵檢測(cè)系統(tǒng)snort的最新版本的源碼
?? C
?? 第 1 頁(yè) / 共 5 頁(yè)
字號(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       snort_httpinspect.c****  @author     Daniel Roelker <droelker@sourcefire.com>****  @brief      This file wraps the HttpInspect functionality for Snort**              and starts the HttpInspect flow.******  The file takes a Packet structure from the Snort IDS to start the**  HttpInspect flow.  This also uses the Stream Interface Module which**  is also Snort-centric.  Mainly, just a wrapper to HttpInspect               **  functionality, but a key part to starting the basic flow.****  The main bulk of this file is taken up with user configuration and**  parsing.  The reason this is so large is because HttpInspect takes**  very detailed configuration parameters for each specified server.**  Hopefully every web server that is out there can be emulated**  with these configuration options.**  **  The main functions of note are:**    - HttpInspectSnortConf::this is the configuration portion**    - SnortHttpInspect::this is the actual inspection flow**    - LogEvents:this is where we log the HttpInspect events****  NOTES:****  - 2.11.03:  Initial Development.  DJR**  - 2.4.05:   Added tab_uri_delimiter config option.  AJM.*/#include <stdlib.h>#include <string.h>#include <sys/types.h>#ifndef WIN32#include <sys/socket.h>#include <netinet/in.h>#include <arpa/inet.h>#endif#include "snort.h"#include "detect.h"#include "decode.h"#include "log.h"#include "event.h"#include "generators.h"#include "debug.h"#include "plugbase.h"#include "util.h"#include "event_queue.h"#include "stream_api.h"#include "sfsnprintfappend.h"#include "hi_return_codes.h"#include "hi_ui_config.h"#include "hi_ui_iis_unicode_map.h"#include "hi_si.h"#include "hi_mi.h"#include "hi_norm.h"#include "profiler.h"#ifdef PERF_PROFILINGextern PreprocStats hiDetectPerfStats;extern int hiDetectCalled;#endifextern PV pv;/* Stats tracking for HTTP Inspect */HIStats hi_stats;#define MAX_FILENAME    1000/****  The definition of the configuration separators in the snort.conf**  configure line.*/#define CONF_SEPARATORS " \t\n\r"/***  These are the definitions of the parser section delimiting **  keywords to configure HttpInspect.  When one of these keywords**  are seen, we begin a new section.*/#define GLOBAL        "global"#define GLOBAL_SERVER "global_server"#define SERVER        "server"/***  GLOBAL subkeywords.*//****  Takes an integer arugment*/#define MAX_PIPELINE  "max_pipeline"/****  Specifies whether to alert on anomalous**  HTTP servers or not.*/#define ANOMALOUS_SERVERS "detect_anomalous_servers"/****  Alert on general proxy use*/#define PROXY_ALERT "proxy_alert"/****  Takes an inspection type argument**  stateful or stateless*/#define INSPECT_TYPE  "inspection_type"#define DEFAULT       "default"/***  GLOBAL subkeyword values*/#define INSPECT_TYPE_STATELESS "stateless"#define INSPECT_TYPE_STATEFUL  "stateful"/***  SERVER subkeywords.*/#define PORTS             "ports"#define FLOW_DEPTH        "flow_depth"#define POST_DEPTH        "post_depth"#define IIS_UNICODE_MAP   "iis_unicode_map"#define CHUNK_LENGTH      "chunk_length"#define PIPELINE          "no_pipeline_req"#define ASCII             "ascii"#define DOUBLE_DECODE     "double_decode"#define U_ENCODE          "u_encode"#define BARE_BYTE         "bare_byte"#define BASE36            "base36"#define UTF_8             "utf_8"#define IIS_UNICODE       "iis_unicode"#define NON_RFC_CHAR      "non_rfc_char"#define MULTI_SLASH       "multi_slash"#define IIS_BACKSLASH     "iis_backslash"#define DIRECTORY         "directory"#define APACHE_WS         "apache_whitespace"#define IIS_DELIMITER     "iis_delimiter"#define PROFILE           "profile"#define NON_STRICT        "non_strict"#define ALLOW_PROXY       "allow_proxy_use"#define OVERSIZE_DIR      "oversize_dir_length"#define INSPECT_URI_ONLY  "inspect_uri_only"#define GLOBAL_ALERT      "no_alerts"#define WEBROOT           "webroot"#define TAB_URI_DELIMITER "tab_uri_delimiter"#define WHITESPACE        "whitespace_chars"/***  Alert subkeywords*/#define BOOL_YES     "yes"#define BOOL_NO      "no"/***  PROFILE subkeywords*/#define APACHE        "apache"#define IIS           "iis"#define IIS4_0        "iis4_0"#define IIS5_0        "iis5_0" /* 5.0 only. For 5.1 and beyond, use IIS */#define ALL           "all"/***  Port list delimiters*/#define START_PORT_LIST "{"#define END_PORT_LIST   "}"/***  Keyword for the default server configuration*/#define SERVER_DEFAULT "default"/***  NAME**    ProcessGlobalAlert::*//****  Process the global alert keyword.****  There is no arguments to this keyword, because you can only turn**  all the alerts off.  As of now, we aren't going to support turning**  all the alerts on.****  @param GlobalConf  pointer to the global configuration**  @param ErrorString error string buffer**  @param ErrStrLen   the lenght of the error string buffer****  @return an error code integer **          (0 = success, >0 = non-fatal error, <0 = fatal error)****  @retval  0 successs**  @retval -1 generic fatal error**  @retval  1 generic non-fatal error*//*static int ProcessGlobalAlert(HTTPINSPECT_GLOBAL_CONF *GlobalConf,                              char *ErrorString, int ErrStrLen){    GlobalConf->no_alerts = 1;    return 0;}*//* **  NAME**    ProcessMaxPipeline::*//****  Process the max pipeline configuration.****  This sets the maximum number of pipeline requests that we**  will buffer while waiting for responses, before inspection.**  There is a maximum limit on this, but we can track a user**  defined amount.****  @param GlobalConf  pointer to the global configuration**  @param ErrorString error string buffer**  @param ErrStrLen   the lenght of the error string buffer****  @return an error code integer **          (0 = success, >0 = non-fatal error, <0 = fatal error)****  @retval  0 successs**  @retval -1 generic fatal error**  @retval  1 generic non-fatal error*/static int ProcessMaxPipeline(HTTPINSPECT_GLOBAL_CONF *GlobalConf,                              char *ErrorString, int ErrStrLen){    char *pcToken;    char *pcEnd = NULL;    pcToken = strtok(NULL, CONF_SEPARATORS);    if(pcToken == NULL)    {        SnortSnprintf(ErrorString, ErrStrLen,                      "No argument to token '%s'.", MAX_PIPELINE);        return -1;    }    GlobalConf->max_pipeline_requests = strtol(pcToken, &pcEnd, 10);    /*    **  Let's check to see if the entire string was valid.    **  If there is an address here, then there was an    **  invalid character in the string.    */    if(*pcEnd)    {        SnortSnprintf(ErrorString, ErrStrLen,                      "Invalid argument to token '%s'.  Must be a positive "                      "number between 0 and %d.", MAX_PIPELINE,                      HI_UI_CONFIG_MAX_PIPE);        return -1;    }    if(GlobalConf->max_pipeline_requests < 0 ||        GlobalConf->max_pipeline_requests > HI_UI_CONFIG_MAX_PIPE)    {        SnortSnprintf(ErrorString, ErrStrLen,                      "Invalid argument to token '%s'.  Must be a positive "                      "number between 0 and %d.", MAX_PIPELINE, HI_UI_CONFIG_MAX_PIPE);        return -1;    }    return 0;}/* **  NAME**    ProcessInspectType::*//****  Process the type of inspection.****  This sets the type of inspection for HttpInspect to do.****  @param GlobalConf  pointer to the global configuration**  @param ErrorString error string buffer****  @param ErrStrLen   the lenght of the error string buffer****  @return an error code integer **          (0 = success, >0 = non-fatal error, <0 = fatal error)****  @retval  0 successs**  @retval -1 generic fatal error**  @retval  1 generic non-fatal error*/static int ProcessInspectType(HTTPINSPECT_GLOBAL_CONF *GlobalConf,                              char *ErrorString, int ErrStrLen){    char *pcToken;    pcToken = strtok(NULL, CONF_SEPARATORS);    if(pcToken == NULL)    {        SnortSnprintf(ErrorString, ErrStrLen,                      "No argument to token '%s'.", INSPECT_TYPE);        return -1;    }    if(!strcmp(INSPECT_TYPE_STATEFUL, pcToken))    {        GlobalConf->inspection_type = HI_UI_CONFIG_STATEFUL;        /*        **  We don't support this option yet, so we'll give an error and        **  bail.        */        SnortSnprintf(ErrorString, ErrStrLen,                      "Stateful HttpInspect processing is not yet available.  "                      "Please use stateless processing for now.");        return -1;    }    else if(!strcmp(INSPECT_TYPE_STATELESS, pcToken))    {        GlobalConf->inspection_type = HI_UI_CONFIG_STATELESS;    }    else    {        SnortSnprintf(ErrorString, ErrStrLen,                      "Invalid argument to token '%s'.  Must be either '%s' or '%s'.",                      INSPECT_TYPE, INSPECT_TYPE_STATEFUL, INSPECT_TYPE_STATELESS);        return -1;    }    return 0;}static int ProcessIISUnicodeMap(int **iis_unicode_map,                                 char **iis_unicode_map_filename,                                int *iis_unicode_map_codepage,                                char *ErrorString, int ErrStrLen){    char *pcToken;    int  iRet;    char filename[MAX_FILENAME];    char *pcEnd;    int  iCodeMap;    pcToken = strtok(NULL, CONF_SEPARATORS);    if(pcToken == NULL)    {        SnortSnprintf(ErrorString, ErrStrLen,                      "No argument to token '%s'.", IIS_UNICODE_MAP);        return -1;    }    /*    **  If an absolute path is specified, then use that.    */#ifndef WIN32    if(pcToken[0] == '/')    {        iRet = SnortSnprintf(filename, sizeof(filename), "%s", pcToken);    }    else    {        /*        **  Set up the file name directory        */        if(pv.config_dir[strlen(pv.config_dir)-1] == '/')        {            iRet = SnortSnprintf(filename, sizeof(filename),                                  "%s%s", pv.config_dir, pcToken);        }        else        {            iRet = SnortSnprintf(filename, sizeof(filename),                                 "%s/%s", pv.config_dir, pcToken);        }    }#else    if(strlen(pcToken)>3 && pcToken[1]==':' && pcToken[2]=='\\')    {        iRet = SnortSnprintf(filename, sizeof(filename), "%s", pcToken);    }    else    {        /*        **  Set up the file name directory        */        if(pv.config_dir[strlen(pv.config_dir)-1] == '\\' ||           pv.config_dir[strlen(pv.config_dir)-1] == '/' )        {            iRet = SnortSnprintf(filename, sizeof(filename),                                  "%s%s", pv.config_dir, pcToken);        }        else        {            iRet = SnortSnprintf(filename, sizeof(filename),                                 "%s\\%s", pv.config_dir, pcToken);        }    }#endif    if(iRet != SNORT_SNPRINTF_SUCCESS)    {        SnortSnprintf(ErrorString, ErrStrLen,                 "Filename too long for token '%s'.", IIS_UNICODE_MAP);        return -1;    }    /*    **  Set the filename    */    *iis_unicode_map_filename = strdup(filename);    if(*iis_unicode_map_filename == NULL)    {        SnortSnprintf(ErrorString, ErrStrLen,                      "Could not strdup() '%s' filename.",                      IIS_UNICODE_MAP);        return -1;    }    pcToken = strtok(NULL, CONF_SEPARATORS);    if(pcToken == NULL)    {        SnortSnprintf(ErrorString, ErrStrLen,                      "No codemap to select from IIS Unicode Map file.");        return -1;    }    /*    **  Grab the unicode codemap to use    */    iCodeMap = strtol(pcToken, &pcEnd, 10);    if(*pcEnd || iCodeMap < 0)    {        SnortSnprintf(ErrorString, ErrStrLen,                      "Invalid IIS codemap argument.");        return -1;    }    /*    **  Set the codepage    */    *iis_unicode_map_codepage = iCodeMap;    /*    **  Assume that the pcToken we now have is the filename of the map    **  table.    */    iRet = hi_ui_parse_iis_unicode_map(iis_unicode_map, filename, iCodeMap);    if (iRet)    {        if(iRet == HI_INVALID_FILE)        {

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲综合色自拍一区| 这里只有精品免费| 国产亚洲女人久久久久毛片| 丝袜国产日韩另类美女| 91亚洲精品乱码久久久久久蜜桃| 欧美大片免费久久精品三p| 亚洲电影激情视频网站| 在线一区二区三区四区| 国产精品美女www爽爽爽| 国产一区二区三区免费看| 日韩欧美亚洲国产精品字幕久久久| 亚洲国产aⅴ成人精品无吗| 91国在线观看| 亚洲一区二区三区在线看| 91视视频在线直接观看在线看网页在线看| 国产午夜亚洲精品午夜鲁丝片 | 亚洲欧美一区二区三区极速播放| 国产xxx精品视频大全| 欧美激情一区二区三区在线| 国产夫妻精品视频| 中文字幕乱码亚洲精品一区| 成人深夜视频在线观看| 国产精品成人在线观看| 欧美亚一区二区| 午夜av一区二区| 精品少妇一区二区三区在线视频 | 亚洲精品成a人| 欧美一区二区视频在线观看| 欧美aaaaaa午夜精品| 久久老女人爱爱| 在线欧美日韩精品| 久久精品国产成人一区二区三区 | 欧美人动与zoxxxx乱| 久久国产精品区| 亚洲日本丝袜连裤袜办公室| 欧美肥妇bbw| 大尺度一区二区| 亚瑟在线精品视频| 国产精品天美传媒| 4438x亚洲最大成人网| 国产不卡视频一区| 天天爽夜夜爽夜夜爽精品视频| 26uuu精品一区二区三区四区在线| 国产成a人亚洲精品| 秋霞成人午夜伦在线观看| 国产精品日韩成人| 日韩视频一区二区| 欧美性色欧美a在线播放| 国产真实乱偷精品视频免| 亚洲综合激情网| 久久精品人人做人人综合| 欧美一区二区高清| 欧美日韩一本到| 在线观看中文字幕不卡| 成人黄色电影在线 | 欧美一区二区三区公司| 在线精品视频一区二区| 91蜜桃网址入口| 成人18视频日本| 成人午夜激情片| 不卡影院免费观看| 成人黄色小视频在线观看| 国产成人综合亚洲网站| 国内精品伊人久久久久av一坑| 日韩精品乱码免费| 六月丁香综合在线视频| 免费成人在线影院| 免费观看30秒视频久久| 婷婷六月综合网| 另类中文字幕网| 久草这里只有精品视频| 激情文学综合插| 精品日本一线二线三线不卡| 日韩你懂的在线观看| 欧美va亚洲va香蕉在线| 国产亚洲精品久| 日韩美女精品在线| 亚洲gay无套男同| 美国十次综合导航| 风流少妇一区二区| 一本大道久久a久久综合| 欧美三区在线视频| 欧美精品一区二区在线播放| 国产欧美日韩不卡| 亚洲乱码国产乱码精品精的特点| 亚洲午夜电影在线| 韩国女主播成人在线观看| 成人在线视频一区二区| 欧美性猛交xxxxxx富婆| 欧美电影免费观看高清完整版| 国产欧美日韩麻豆91| 天天影视涩香欲综合网| 国产一区二区免费看| 色综合久久久久网| 日韩免费高清电影| 一区av在线播放| 狠狠色丁香九九婷婷综合五月| 成人国产免费视频| 欧美成人在线直播| 一区二区三区av电影| 国内精品写真在线观看| 91国偷自产一区二区三区成为亚洲经典| 欧美一区二区精品| 亚洲永久免费av| 成人午夜免费av| 精品国内片67194| 亚洲午夜视频在线| av电影在线观看完整版一区二区| 欧美日韩国产影片| 亚洲人成人一区二区在线观看| 经典三级一区二区| 91精品啪在线观看国产60岁| 一区二区三区在线免费| 高清在线不卡av| 欧美国产激情一区二区三区蜜月| 免费观看在线综合| 日韩欧美亚洲国产精品字幕久久久| 亚洲国产美女搞黄色| 日本道精品一区二区三区| 国产精品乱码一区二三区小蝌蚪| 黄页网站大全一区二区| 日韩一级完整毛片| 男女男精品视频| 91精品免费观看| 日产精品久久久久久久性色| 欧美日韩精品是欧美日韩精品| 亚洲激情六月丁香| av网站免费线看精品| 一区二区三区精品在线观看| 日本黄色一区二区| 亚洲午夜av在线| 日韩精品中文字幕一区二区三区 | 色综合久久九月婷婷色综合| 亚洲综合色在线| 欧美一区二区三区小说| 蜜桃视频在线一区| 国产欧美日韩久久| 色噜噜久久综合| 五月婷婷综合在线| 久久综合久久综合久久综合| 北岛玲一区二区三区四区| 1000精品久久久久久久久| 91丝袜高跟美女视频| 五月天欧美精品| ww亚洲ww在线观看国产| 色综合久久久久久久久| 另类综合日韩欧美亚洲| 国产精品久久久久久久久快鸭 | 国产女人18水真多18精品一级做| av福利精品导航| 免费av成人在线| 国产精品久久久久久妇女6080 | 午夜精品一区二区三区电影天堂| 精品国产免费人成在线观看| 成人黄色一级视频| 毛片av一区二区| 亚洲日本免费电影| 精品成人免费观看| 欧美主播一区二区三区美女| 久久66热偷产精品| 亚洲成av人片| 国产精品你懂的在线| 欧美一区二区三区免费大片| 91色porny蝌蚪| 国产精品 日产精品 欧美精品| 亚洲自拍偷拍av| 国产大片一区二区| 蜜臀av性久久久久蜜臀av麻豆| 亚洲精品午夜久久久| 久久精品综合网| 久久人人97超碰com| 欧美日韩国产a| 在线看不卡av| 色成年激情久久综合| 北条麻妃一区二区三区| 国产乱子轮精品视频| 美女视频黄久久| 美脚の诱脚舐め脚责91| 日韩黄色免费电影| 日韩影院在线观看| 亚洲国产视频一区| 亚洲成人av中文| 肉丝袜脚交视频一区二区| 亚洲一区二区三区四区五区中文| 亚洲精品乱码久久久久久| 亚洲精品免费播放| 亚洲在线中文字幕| 亚洲成人精品影院| 日本aⅴ免费视频一区二区三区| 午夜电影网一区| 久久机这里只有精品| 国产专区综合网| 99国产精品久久久久| 色一区在线观看| 日韩欧美中文字幕公布| 精品国产sm最大网站免费看| 国产视频一区在线观看| 国产精品美女久久久久久久网站| 亚洲欧洲日韩女同| 日韩电影在线一区二区|