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

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

?? spp_ftptelnet.c

?? 著名的入侵檢測系統snort的最新版本的源碼
?? C
字號:
/* * spp_ftptelnet.c * * Copyright (C) 2004 Sourcefire,Inc * Steven A. Sturges <ssturges@sourcefire.com> * Daniel J. Roelker <droelker@sourcefire.com> * Marc A. Norton <mnorton@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. * * Description: * * This file initializes FTPTelnet as a Snort preprocessor. * * This file registers the FTPTelnet initialization function, * adds the FTPTelnet 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 FTPTelnet functionality, * by interfacing with the Snort preprocessor functions.  The rest * of FTPTelnet should be separate from the preprocessor hooks. * * NOTES: * - 16.09.04:  Initial Development.  SAS * */#include <string.h>#include <stdio.h>#include <sys/types.h>#ifdef HAVE_CONFIG_H#include "config.h"#endif//#include "decode.h"//#include "plugbase.h"#include "debug.h"//#include "util.h"#include "ftpp_ui_config.h"#ifdef CLIENT_READY#include "ftp_client.h"#include "ftp_norm.h"#endif#include "snort_ftptelnet.h"#include "profiler.h"#ifdef DYNAMIC_PLUGIN//#include "dynamic-plugins/sp_preprocopt.h"#endif/* * Defines for preprocessor initialization *//* * snort.conf preprocessor keyword */#define GLOBAL_KEYWORD   "ftp_telnet"#define PROTOCOL_KEYWORD "ftp_telnet_protocol"/* * 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 int file_line;#ifdef PERF_PROFILINGPreprocStats ftpPerfStats;PreprocStats telnetPerfStats;#endif/* * 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. */FTPTELNET_GLOBAL_CONF FTPTelnetGlobalConf;/* * Function: FTPTelnetChecks(Packet *p) * * Purpose: This function wraps the functionality in the generic FTPTelnet *          processing.  We get a Packet structure and pass this into the *          FTPTelnet module where the first stage in FTPTelnet is the *          Normalization stage where most of the other Snortisms are *          taken care of.  After that, the modules are generic. * * Arguments: p         => pointer to a Packet structure that contains *                         Snort info about the packet. * * Returns: None * */static void FTPTelnetChecks(void *pkt, void *context){    /*     * IMPORTANT:     * This is where we initialize any variables that can impact other     * aspects of detection/processing.     *     */    SFSnortPacket *p = (SFSnortPacket*)pkt;    /*     * Check for valid packet     * if neither header or data is good, then we just abort.     */    if(!p->ip4_header || !p->tcp_header || !p->payload || !p->payload_size)    {        return;    }    /*     * Pass in the configuration and the packet.     */    SnortFTPTelnet(&FTPTelnetGlobalConf, p);    return;}/* * Function: FTPTelnetInit(char *args) * * Purpose: This function cleans up FTPTelnet memory from the configuration *          data. * * Arguments: sig       => signal causing this to be called *            args      => pointer to a context strucutre * * Returns: None * */void FTPTelnetCleanExit(int sig, void *args){    FTPTelnetCleanupSnortConf(&FTPTelnetGlobalConf);}/* * Function: FTPTelnetInit(char *args) * * Purpose: This function initializes FTPTelnetInit with a user configuration. *          The function is called when FTPTelnet is configured in snort.conf. *          It gets passed a string of arguments, which gets parsed into *          configuration constructs that FTPTelnet understands. * *          This function gets called for every FTPTelnet 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). * * Arguments: args      => pointer to a string to the preprocessor arguments. * * Returns: None * */static void FTPTelnetInit(char *args){    char ErrorString[ERRSTRLEN];    int  iErrStrLen = ERRSTRLEN;    int  iRet;    static int siFirstConfig = 1;#ifdef SUP_IP6    DynamicPreprocessorFatalMessage(        "FTPTelnet is not currently supported when IPv6 is enabled.\n"    );#endif    if(siFirstConfig)    {        iRet = ftpp_ui_config_init_global_conf(&FTPTelnetGlobalConf);        if (iRet)        {            snprintf(ErrorString, iErrStrLen,                    "Error initializing Global Configuration.");            DynamicPreprocessorFatalMessage("%s(%d) => %s\n",                                            *(_dpd.config_file), *(_dpd.config_line), ErrorString);            return;        }        iRet = ftpp_ui_config_default(&FTPTelnetGlobalConf);        if (iRet)        {            snprintf(ErrorString, iErrStrLen,                    "Error configuring default global configuration.");            DynamicPreprocessorFatalMessage("%s(%d) => %s\n",                                            *(_dpd.config_file), *(_dpd.config_line), ErrorString);            return;        }#ifdef CLIENT_READY        iRet = ftpp_client_init(&FTPTelnetGlobalConf);        if (iRet)        {            snprintf(ErrorString, iErrStrLen,                    "Error initializing client module.");            DynamicPreprocessorFatalMessage("%s(%d) => %s\n",                                            *(_dpd.config_file), *(_dpd.config_line), ErrorString);            return;        }        iRet = ftpp_norm_init(&FTPTelnetGlobalConf);        if (iRet)        {            snprintf(ErrorString, iErrStrLen,                     "Error initializing normalization module.");            DynamicPreprocessorFatalMessage("%s(%d) => %s\n",                                            *(_dpd.config_file), *(_dpd.config_line), ErrorString);            return;        }#endif    }        iRet = FTPTelnetSnortConf(&FTPTelnetGlobalConf, args, ErrorString, iErrStrLen);    if (iRet)    {        if(iRet > 0)        {            /*             * Non-fatal Error             */            if(ErrorString)            {                _dpd.errMsg("WARNING: %s(%d) => %s\n",                             *(_dpd.config_file), *(_dpd.config_line), ErrorString);            }        }        else        {            /*             * Fatal Error, log error and exit.             */            if(ErrorString)            {                DynamicPreprocessorFatalMessage("%s(%d) => %s\n",                                                 *(_dpd.config_file), *(_dpd.config_line), ErrorString);            }            else            {                /*                 * Check if ErrorString is undefined.                 */                if(iRet == -2)                {                    DynamicPreprocessorFatalMessage("%s(%d) => ErrorString is undefined.\n",                                                     *(_dpd.config_file), *(_dpd.config_line));                }                else                {                    DynamicPreprocessorFatalMessage("%s(%d) => Undefined Error.\n",                                                     *(_dpd.config_file), *(_dpd.config_line));                }            }        }    }    /*     * Only add the functions one time to the preproc list.     */    if(siFirstConfig)    {        /*         * Add FTPTelnet into the preprocessor list         */        _dpd.addPreproc(FTPTelnetChecks, PRIORITY_APPLICATION, PP_FTPTELNET);        _dpd.addPreprocExit(FTPTelnetCleanExit, NULL, PRIORITY_APPLICATION, PP_FTPTELNET);        /*         * Remember to add any cleanup functions into the appropriate         * lists.         */        siFirstConfig = 0;#ifdef PERF_PROFILING        _dpd.addPreprocProfileFunc("ftptelnet_ftp", (void*)&ftpPerfStats, 0, _dpd.totalPerfStats);        _dpd.addPreprocProfileFunc("ftptelnet_telnet", (void*)&telnetPerfStats, 0, _dpd.totalPerfStats);#endif    }        return;}/* * Function: SetupFTPTelnet() * * Purpose: This function initializes FTPTelnet 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. * * Arguments: None * * Returns: None * */void SetupFTPTelnet(){    _dpd.registerPreproc(GLOBAL_KEYWORD, FTPTelnetInit);    _dpd.registerPreproc(PROTOCOL_KEYWORD, FTPTelnetInit);    _dpd.addPreprocConfCheck(FTPConfigCheck);#ifdef DYNAMIC_PLUGIN    /* Cleanup func is NULL -- free() will be used as necessary */    _dpd.preprocOptRegister("ftp.bounce", &FTPPBounceInit, &FTPPBounceEval, NULL);#endif    DEBUG_WRAP(DebugMessage(DEBUG_FTPTELNET, "Preprocessor: FTPTelnet is "                "setup . . .\n"););}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲人成网站在线| 国产精品久线在线观看| 337p粉嫩大胆噜噜噜噜噜91av| 欧美精品一区二区精品网| 久久先锋影音av鲁色资源| xvideos.蜜桃一区二区| 亚洲精品国产一区二区三区四区在线| 亚洲电影你懂得| 国产老肥熟一区二区三区| 一本大道综合伊人精品热热| 日韩美女一区二区三区| 亚洲欧美日韩国产中文在线| 精品系列免费在线观看| 91免费国产在线| 欧美日韩精品欧美日韩精品一综合| 久久精品亚洲乱码伦伦中文| 亚洲影院在线观看| 国产麻豆日韩欧美久久| 91国产免费看| 欧美激情一区二区三区不卡 | 国精产品一区一区三区mba视频 | 视频一区欧美日韩| 99精品黄色片免费大全| 日本一区二区免费在线| 国产精品综合av一区二区国产馆| 日韩欧美高清在线| 婷婷综合五月天| 欧美日本一区二区三区四区| 亚洲韩国一区二区三区| 91免费国产在线观看| 悠悠色在线精品| 欧美亚一区二区| 亚洲一区二区三区自拍| 欧美美女网站色| 亚洲电影第三页| 欧美一区二区视频网站| 麻豆久久一区二区| 精品久久国产字幕高潮| 91麻豆国产自产在线观看| 久久久久久久久久久久久女国产乱| 久久国产综合精品| 久久久久久久久久久久久久久99| 国产91丝袜在线播放0| 中文在线一区二区| 一本色道久久综合亚洲aⅴ蜜桃 | 国产精品久久久久久亚洲毛片| 成人天堂资源www在线| 日韩一区在线播放| 欧洲另类一二三四区| 日韩制服丝袜先锋影音| 久久在线免费观看| 91在线国产观看| 日韩国产高清在线| 国产午夜精品理论片a级大结局| 成人av在线影院| 亚洲国产精品久久久久婷婷884| 日韩一区二区免费在线电影| 国产成人精品免费| 亚洲精品免费在线| 日韩视频一区在线观看| 播五月开心婷婷综合| 亚洲国产视频一区二区| 久久影视一区二区| 日本精品视频一区二区| 久久国产精品无码网站| 日韩美女视频一区二区| 欧美二区在线观看| 成人午夜电影小说| 日本不卡的三区四区五区| 成人欧美一区二区三区1314| 日韩欧美中文字幕一区| 成人激情av网| 青青青伊人色综合久久| 国产精品成人在线观看| 日韩一区二区不卡| 91玉足脚交白嫩脚丫在线播放| 日本特黄久久久高潮| 最新欧美精品一区二区三区| 亚洲精品一区二区三区99| 欧美精品一区二区三区四区 | 精品国产制服丝袜高跟| 色综合久久综合| 国产另类ts人妖一区二区| 亚洲sss视频在线视频| 国产亚洲一区二区三区| 日韩亚洲欧美中文三级| 在线免费亚洲电影| 波多野结衣中文字幕一区二区三区 | 在线一区二区三区四区| 国产精品123区| 蜜桃精品视频在线| 亚洲国产日韩a在线播放性色| 亚洲国产精品激情在线观看 | 久久狠狠亚洲综合| 午夜精品久久久久| 亚洲欧美成人一区二区三区| 久久久久久久久久久黄色| 日韩欧美电影在线| 51精品秘密在线观看| 欧洲亚洲国产日韩| 色婷婷狠狠综合| 99国产精品一区| av电影天堂一区二区在线观看| 狠狠色综合日日| 精品一区二区日韩| 久久成人羞羞网站| 国模娜娜一区二区三区| 九一久久久久久| 久久国产精品色| 国内精品写真在线观看| 乱中年女人伦av一区二区| 青青青爽久久午夜综合久久午夜| 日日摸夜夜添夜夜添精品视频 | 欧美一区二区免费| 3atv在线一区二区三区| 欧美一区二区三区免费观看视频| 在线免费精品视频| 欧美日韩高清一区| 日韩一区二区三区观看| 6080日韩午夜伦伦午夜伦| 制服丝袜国产精品| 欧美成人在线直播| 国产偷国产偷亚洲高清人白洁| 久久久精品国产免大香伊| 中文字幕av一区二区三区免费看| 日本一区二区久久| 伊人一区二区三区| 天天av天天翘天天综合网| 男男gaygay亚洲| 国产精品一区二区久久精品爱涩 | 亚洲欧美综合网| 一区二区激情小说| 天天综合天天综合色| 久久精品国产亚洲a| 国产91丝袜在线播放九色| 18成人在线观看| 中文字幕一区二区日韩精品绯色| 91精品啪在线观看国产60岁| 从欧美一区二区三区| 亚洲综合一区在线| 亚洲制服丝袜一区| 亚洲bdsm女犯bdsm网站| 亚洲少妇30p| 日本亚洲电影天堂| 亚洲图片欧美综合| 亚洲第一成年网| 国产不卡视频一区二区三区| 中文字幕国产精品一区二区| 国产精品视频一区二区三区不卡| 亚洲免费av高清| 麻豆精品视频在线| 成人ar影院免费观看视频| 在线成人免费观看| 中文字幕av一区二区三区| 性欧美疯狂xxxxbbbb| 国产精品一区二区三区99| 欧美撒尿777hd撒尿| 久久精品亚洲国产奇米99| 亚洲午夜久久久久久久久电影网| 久久精品国产久精国产爱| 日本电影欧美片| 欧美精品一区二区三区在线播放| 一区二区三区波多野结衣在线观看| 波波电影院一区二区三区| 成人丝袜18视频在线观看| 日本精品免费观看高清观看| 亚洲精品一区在线观看| 日韩电影在线观看一区| 成人免费电影视频| 国产自产高清不卡| 日本道免费精品一区二区三区| 欧美日韩国产在线播放网站| 日韩视频免费观看高清完整版 | 午夜欧美2019年伦理| 欧美欧美欧美欧美| 国产资源在线一区| 国产精品天美传媒沈樵| 日韩午夜电影av| 国产精品网站在线播放| 日韩三级精品电影久久久 | 亚洲黄网站在线观看| 亚洲一二三区不卡| 91在线观看成人| 一区二区三区日韩欧美| 成人中文字幕电影| 久久精品免费看| 国产日韩精品久久久| 一本色道亚洲精品aⅴ| 蜜臀av性久久久久蜜臀aⅴ四虎 | 国产成人综合亚洲91猫咪| 亚洲欧洲日产国码二区| 欧美日韩成人在线| 91网站最新地址| 五月激情丁香一区二区三区| 久久―日本道色综合久久| 在线视频国内自拍亚洲视频| 高潮精品一区videoshd| 日本伊人色综合网| 亚洲国产成人午夜在线一区| 久久国产福利国产秒拍|