page,client,offset,layer的区别

本文详细解释了网页中鼠标位置的不同属性,包括pageX/pageY、clientX/clientY、offsetX/offsetY及layerX/layerY的区别与用法。特别关注了这些属性在浏览器滚动时的表现,以及如何在实际应用中正确计算鼠标相对于元素或视口的位置。
pageX/pageY:
相对于浏览器左上的距离。出现滚动条的时候,可以自己调节与浏览器左上的相对距离。
下面看log输出pageY的值。
现在浏览器最大屏幕工作区的高度是1040;
到出现滚动条的时候,每次超出1040px后都会重新对鼠标到浏览器左上角的距离进行获取变为639px
    

clientX/clientY:
也是相对于浏览器左上的的位置,但是一旦出现滚动条后,红色的BOX并不会继续跟着鼠标移动的距离进行移动。 clientX/Y 并没有加上滚动条的距离。如果想达到page的效果。
还是需要加上滚动条的距离。如下(兼容IE8)
clientX+ document.documentElement.scrollLeft||document.body.scrollLeft
clientY+ document.documentElement.scrollLeft||document.body.scrollTop


offsetX/offsetY

offsetX:IE特有,鼠标相比较于触发事件的元素的位置,以元素盒子模型的内容区域的左上角为参考点,如果有boder,可能出现负值



layerX/layerY
IE特有,如果触发元素没有设置绝对定位或相对定位,以页面为参考点,会将border计算在内
也就是当触发元素设置了相对或者绝对定位后,可以重合在一起,几乎相等,唯一不同就是一个从border边缘为参考点,一个以内容为参考点

可以参考下列图,offsetX、layerX几乎同时进行移动。







以上:如果存在错误或误解,

欢迎大神门指出!


{layout name="layout1" /} <div class="wrapper"> <div class="layui-card"> <div class="layui-card-body"> <div class="layui-collapse like-layui-collapse" lay-accordion="" style="border:1px dashed #c4c4c4"> <div class="layui-colla-item"> <h2 class="layui-colla-title like-layui-colla-title" style="background-color: #fff">操作提示</h2> <div class="layui-colla-content layui-show"> <p>*平台管理会员信息,平台可对会员进行编辑,账户调整,等级调整和资料查看等操作</p> </div> </div> </div> </div> <div class="layui-form layui-card-header layuiadmin-card-header-auto" style="height:auto !important;"> <div class="layui-form-item"> <div class="layui-inline"> <label class="layui-form-label">会员信息:</label> <div class="layui-input-inline" style="width: 200px;"> <select name="keyword_type" id="keyword_type"> <option value="sn">会员编号</option> <option value="nickname">会员昵称</option> <option value="mobile">会员手机号</option> </select> </div> <div class="layui-input-inline" style="width: 200px;"> <input type="text" id="keyword" name="keyword" placeholder="请输入关键词" autocomplete="off" class="layui-input"> </div> </div> <div class="layui-inline"> <label class="layui-form-label">会员等级:</label> <div class="layui-input-inline"> <select id="level" name="level" style="height:80px;width: 80px"> <option value="">全部</option> {foreach $level_list as $item } <option value="{$item.id}">{$item.name}</option> {/foreach} </select> </div> </div> <!-- <div class="layui-inline"> <label class="layui-form-label">会员标签:</label> <div class="layui-input-inline"> <select id="tag" name="tag" style="height:80px;width: 80px" > <option value="">全部</option> {foreach $tag_list as $item } <option value="{$item.id}">{$item.name}</option> {/foreach} </select> </div> </div> <div class="layui-inline"> <label class="layui-form-label">注册来源:</label> <div class="layui-input-inline"> <select id="client" name="client" style="height:80px;width: 80px" > <option value="">全部</option> {foreach $client_list as $key => $value } <option value="{$key}">{$value}</option> {/foreach} </select> </div> </div> --> <div class="layui-inline"> <label class="layui-form-label">用户状态:</label> <div class="layui-input-inline"> <select id="disable" name="disable" style="height:80px;width: 80px"> <option value="">全部</option> <option value="0">正常</option> <option value="1">禁用</option> </select> </div> </div> <div class="layui-inline"> <label class="layui-form-label">采购会员渠道:</label> <div class="layui-input-inline"> <select id="channel" name="channel" style="height:80px;width: 80px"> <option value="">全部</option> {foreach $channel_list as $k=>$v } <option value="{$k}">{$v}</option> {/foreach} </select> </div> </div> </div> <div class="layui-form-item"> <div class="layui-inline"> <label class="layui-form-label">服务等级:</label> <div class="layui-input-inline"> <select id="serviceLevel" name="serviceLevel" style="height:80px;width: 80px" > <option value="">全部</option> {foreach $serviceLevel_list as $key=>$value} <option value="{$key}">{$value}</option> {/foreach} </select> </div> </div> <div class="layui-inline"> <label class="layui-form-label">消费金额:</label> <div class="layui-input-inline"> <input type="text" class="layui-input" id="total_amount_start" name="total_amount_start" autocomplete="off"> </div> <div class="layui-input-inline" style="margin-right: 5px;width: 10px;"> <label class="layui-form-mid">-</label> </div> <div class="layui-input-inline"> <input type="text" class="layui-input" id="total_amount_end" name="total_amount_end" autocomplete="off"> </div> </div> <div class="layui-inline"> <label class="layui-form-label">注册时间:</label> <div class="layui-input-inline"> <input type="text" class="layui-input" id="start_time" name="start_time" autocomplete="off"> </div> <div class="layui-input-inline" style="margin-right: 5px;width: 10px;"> <label class="layui-form-mid">-</label> </div> <div class="layui-input-inline"> <input type="text" class="layui-input" id="end_time" name="end_time" autocomplete="off"> </div> </div> <div class="layui-inline"> <button class="layui-btn layui-btn-sm layuiadmin-btn-user {$view_theme_color}" lay-submit lay-filter="user-search">查询 </button> <button class="layui-btn layui-btn-sm layuiadmin-btn-user layui-btn-primary " lay-submit lay-filter="user-clear-search">重置 </button> <button class="layui-btn layui-btn-sm layuiadmin-btn-ad layui-btn-primary " lay-submit lay-filter="data-export">导出 </button> </div> </div> </div> <div class="layui-card-body"> <div style="padding-bottom: 10px;"> <!-- <button class="layui-btn layui-btn-sm layuiadmin-btn-user {$view_theme_color}" data-type="send_coupon">发放优惠券</button>--> <!--<button class="layui-btn layui-btn-sm layuiadmin-btn-user {$view_theme_color}" data-type="set_tag">设置会员标签</button>--> </div> <table id="user-lists" lay-filter="user-lists"></table> <script type="text/html" id="user-info"> <img src="{{d.abs_avatar}}" style="height:80px;width: 80px;margin-right: 10px;" class="image-show"> <div class="layui-input-inline" style="text-align:left;width: 240px"> <p>用户编号:{{d.sn}}</p> <p>用户手机号:{{d.mobile}}</p> <p style="width: 180px;text-overflow:ellipsis;overflow: hidden">用户昵称:{{d.nickname}}</p> <p>用户状态: {{# if(d.disable){}} 禁用 {{# }else{ }} 正常 {{# } }} </p> </div> </script> <script type="text/html" id="wallet-info"> <div class="layui-input-inline" style="text-align:left;width: 240px"> <p>累计佣金:{{d.total_amount}}</p> <p>可提现金额:{{d.earnings}}</p> <p>不可提现金额:{{d.earnings_wait}}</p> </div> </script> <script type="text/html" id="register-info"> <div class="layui-input-inline" style="text-align:left;width: 240px"> <p>注册时间:{{d.create_time}}</p> </div> </script> <script type="text/html" id="bind_time"> <div class="layui-input-inline" style="text-align:left;width: 240px"> <p>有效期:{{d.bind_time}}</p> </div> </script> <script type="text/html" id="first-info"> {{# if(d.first_leader_info != '系统'){}} <img src="{{d.first_leader_info.avatar}}" style="height:80px;width: 80px;margin-right: 10px;" class="image-show"> <div class="layui-input-inline" style="text-align:left;width: 240px"> <p>用户编号:{{d.first_leader_info.sn}}</p> <p style="width: 180px;text-overflow:ellipsis;overflow: hidden"> 用户昵称:{{d.first_leader_info.nickname}}</p> </div> {{# }else{ }} {{d.first_leader_info}} {{# } }} </script> <script type="text/html" id="account"> <div class="layui-input-inline"> <label>余额:{{d.user_money}}</label> <br/> <!-- <label>积分:{{d.user_integral}}</label>--> </div> </script> <!-- 是否启用 --> <script type="text/html" id="is_enable"> <input type="checkbox" lay-filter="switch-is_allow_mobile" data-id={{d.id}} data-field='is_allow_mobile' lay-skin="switch" lay-text="启用|禁用" {{# if(d.is_allow_mobile){ }} checked {{# } }}/> </script> <script type="text/html" id="user-operation"> <a class="layui-btn layui-btn-primary layui-btn-sm" lay-event="info">资料</a> <a class="layui-btn layui-btn-normal layui-btn-sm" lay-event="edit">编辑</a> <!--<a class="layui-btn layui-btn-normal layui-btn-sm" id="adjust_user" lay-event="adjust_user">账户调整</a>--> <a class="layui-btn layui-btn-normal layui-btn-sm" id="adjust_level" lay-event="adjust_level">等级调整</a> {{# if(d.level == 3){}} <a class="layui-btn layui-btn-normal layui-btn-sm" id="adjust_channel" lay-event="adjust_channel">渠道调整</a> {{# } }} <a class="layui-btn layui-btn-normal layui-btn-sm" id="adjust_first_leader" lay-event="adjust_first_leader">推荐人调整</a> </script> </div> </div> </div> <style> .layui-table-cell { height: auto; } </style> <script> layui.config({ version: "{$front_version}", base: '/static/lib/' //静态资源所在路径 }).use(['table', 'laydate', 'form'], function () { var $ = layui.$ , form = layui.form , table = layui.table , laydate = layui.laydate; //监听搜索 form.on('submit(user-search)', function (data) { var field = data.field; //执行重载 table.reload('user-lists', { where: field, page: { curr: 1 //重新从第 1 页开始 } }); }); //日期时间范围 laydate.render({ elem: '#start_time' , type: 'datetime' , trigger: 'click' }); //日期时间范围 laydate.render({ elem: '#end_time' , type: 'datetime' , trigger: 'click' }); //清空查询 form.on('submit(user-clear-search)', function () { $('#keyword_type').val('sn'); $('#keyword').val(''); //清空输入框 $('#level').val(''); //清空输入框 $('#serviceLevel').val(''); //清空输入框 $('#tag').val(''); //清空输入框 $('#client').val(''); //清空输入框 $('#disable').val(''); //清空禁用状态 $('#total_amount_start').val(''); //清空输入框 $('#total_amount_end').val(''); //清空输入框 $('#start_time').val(''); //清空输入框 $('#end_time').val(''); //清空输入框 form.render('select'); //刷新列表 table.reload('user-lists', { where: [], page: { curr: 1 //重新从第 1 页开始 } }); }); // 导出 form.on('submit(data-export)', function (data) { var field = data.field; like.ajax({ url: '{:url("user.User/export")}' , data: field , type: 'get' , success: function (res) { if (res.code == 1) { window.location.href = res.data.url; } } }); }); //事件 var active = { send_coupon: function () { //发放优惠券 var check_status = table.checkStatus('user-lists') , user_list = check_status.data; //得到选中的数据 //是否已选数据 if (0 === user_list.length) { return layer.msg('请选择用户'); } //获取所选id ids = []; for (var i in user_list) { ids.push(user_list[i]['id']); } layer.open({ type: 2 , title: '发放优惠券' , content: '{:url("coupon/sendCouponList")}' , area: ['90%', '90%'] , btn: ['确定发放', '取消'] , yes: function (index, layero) { var iframeWindow = window['layui-layer-iframe' + index] , submitID = 'send-submit' , submit = layero.find('iframe').contents().find('#' + submitID); //监听提交 iframeWindow.layui.form.on('submit(' + submitID + ')', function (data) { var coupon_list = window["layui-layer-iframe" + index].callbackdata(); if (coupon_list.length === 0) { return layer.msg('请选择优惠券'); } coupon_ids = []; for (var i in coupon_list) { coupon_ids.push(coupon_list[i]['id']); } like.ajax({ url: '{:url("coupon/sendCoupon")}', data: {coupon_ids: coupon_ids, user_ids: ids}, type: "post", success: function (res) { if (res.code == 1) { layui.layer.msg(res.msg, { offset: '15px' , icon: 1 , time: 1000 }); layer.close(index); //关闭弹层 table.reload('goods_brand-lists'); //数据刷新 } } }); }); submit.trigger('click'); } }); } , set_tag: function () { //设置会员标签 var check_status = table.checkStatus('user-lists') , user_list = check_status.data; //得到选中的数据 //是否已选数据 if (user_list.length === 0) { return layer.msg('请选择用户'); } //获取所选id ids = []; for (var i in user_list) { ids.push(user_list[i]['id']); } layer.open({ type: 2 , title: '设置会员标签' , content: '{:url("user.user/setTag")}' , area: ['60%', '60%'] , btn: ['确定', '取消'] , yes: function (index, layero) { var iframeWindow = window['layui-layer-iframe' + index] , submitID = 'set_tag-submit' , submit = layero.find('iframe').contents().find("#set_tag-submit"); //监听提交 iframeWindow.layui.form.on('submit(set_tag-submit)', function (data) { $.ajax({ url: '{:url("user.user/setTag")}', data: {tag_ids: data.field.select, user_ids: ids}, type: "post", success: function (res) { if (res.code == 1) { layui.layer.msg(res.msg, { offset: '15px' , icon: 1 , time: 1000 }); layer.close(index); //关闭弹层 table.reload('user-lists'); //数据刷新 } } }); }); submit.trigger('click'); } }); } } $('.layui-btn.layuiadmin-btn-user').on('click', function () { var type = $(this).data('type'); active[type] ? active[type].call(this) : ''; }); $(document).on('click', '.image-show', function () { var src = $(this).attr('src'); like.showImg(src, 600); }); }); layui.define(['table', 'form'], function (exports) { var $ = layui.$ , table = layui.table , form = layui.form; table.render({ id: 'user-lists' , elem: '#user-lists' , url: '{:url("user.user/lists")}' //模拟接口 , cols: [[ {type: 'checkbox'} , {title: '用户信息', width: 365, align: 'center', templet: '#user-info'} , {field: 'level_name', title: '用户等级', width: 100, align: 'center'} , {field: 'serviceLabel', title: '服务等级', width: 90, align: 'center'} , {field: 'channel', title: '采购会员渠道', width: 115, align: 'center'} //,{field: 'tag_str', title: '用户标签',width: 220,align: 'center'} //,{field: 'user_growth', title: '成长值',width: 120,align: 'center'} , {title: '钱包信息', width: 200, align: 'center', templet: '#wallet-info'} , {field: 'total_order_amount', title: '消费金额', width: 90, align: 'center'} , {title: '上级推荐人', width: 90, align: 'center', width: 365, templet: '#first-info'} , {field: 'fans', title: '推荐下级人数', width: 120, align: 'center'} , {title: '手机号修改', width: 100, align: 'center', templet: '#is_enable'} , {title: '注册信息', width: 300, align: 'center', templet: '#register-info'} , {title: '有效期', width: 300, align: 'center', templet: '#bind_time'} , {fixed: 'right', title: '操作', width: 405, toolbar: '#user-operation', align: 'center'} ]] , page: true , text: {none: '暂无数据!'} , parseData: function (res) { //将原始数据解析成 table 组件所规定的数据 return { "code": res.code, "msg": res.msg, "count": res.data.count, //解析数据长度 "data": res.data.lists, //解析数据列表 }; }, response: { statusCode: 1 } , done: function fix() { $(".layui-table-main tr").each(function (index, val) { $(".layui-table-fixed").each(function () { $($(this).find(".layui-table-body tbody tr")[index]).height($(val).height()); }); }); $(".layui-table-header tr").each(function (index, val) { $(".layui-table-fixed").each(function () { $($(this).find(".layui-table-header thead tr")[index]).height($(val).height()); }); }); window.onresize = function () { fix() } } }); var moreShow = 0; //监听工具条 table.on('tool(user-lists)', function (obj) { if (obj.event === 'edit') { var id = obj.data.id; layer.open({ type: 2 , title: '编辑会员' , content: '{:url("user.user/edit")}?id=' + id , area: ['90%', '90%'] , btn: ['确定', '取消'] , yes: function (index, layero) { var iframeWindow = window['layui-layer-iframe' + index] , submit = layero.find('iframe').contents().find('#edit-submit'); //监听提交 iframeWindow.layui.form.on('submit(edit-submit)', function (data) { var field = data.field; $.ajax({ url: '{:url("user.user/edit")}', data: field, type: "post", success: function (res) { if (res.code == 1) { layui.layer.msg(res.msg, { offset: '15px' , icon: 1 , time: 1000 }); layer.close(index); //关闭弹层 table.reload('user-lists'); //数据刷新 } else { layer.msg(res.msg, { offset: '15px' , icon: 2 , time: 1000 }); } } }); }); submit.trigger('click'); } }) } if (obj.event === 'info') { var id = obj.data.id; layer.open({ type: 2 , title: '会员资料' , content: '{:url("user.user/info")}?id=' + id , area: ['90%', '90%'] , btn: ['返回'] }) } if (obj.event === 'adjust_user') { var id = obj.data.id; layer.open({ type: 2 , title: '账户调整' , content: '{:url("user.user/adjustAccount")}?id=' + id , area: ['90%', '90%'] , btn: ['确定', '取消'] , yes: function (index, layero) { var iframeWindow = window['layui-layer-iframe' + index] , submit = layero.find('iframe').contents().find('#adjust_user-submit'); //监听提交 iframeWindow.layui.form.on('submit(adjust_user-submit)', function (data) { var field = data.field; $.ajax({ url: '{:url("user.user/adjustAccount")}', data: field, type: "post", success: function (res) { if (res.code == 1) { layui.layer.msg(res.msg, { offset: '15px' , icon: 1 , time: 1000 }); layer.close(index); //关闭弹层 table.reload('user-lists'); //数据刷新 } else { layer.msg(res.msg, { offset: '15px' , icon: 2 , time: 1000 }); } } }); }); submit.trigger('click'); } }) } if (obj.event === 'adjust_level') { var id = obj.data.id; layer.open({ type: 2 , title: '等级调整' , content: '{:url("user.user/adjustLevel")}?id=' + id , area: ['90%', '90%'] , btn: ['确定', '取消'] , yes: function (index, layero) { var iframeWindow = window['layui-layer-iframe' + index] , submit = layero.find('iframe').contents().find('#formSubmit'); //监听提交 iframeWindow.layui.form.on('submit(formSubmit)', function (data) { var field = data.field; $.ajax({ url: '{:url("user.user/adjustLevel")}', data: field, type: "post", success: function (res) { if (res.code == 1) { layui.layer.msg(res.msg, { offset: '15px' , icon: 1 , time: 1000 }); layer.close(index); //关闭弹层 table.reload('user-lists'); //数据刷新 } else { layer.msg(res.msg, { offset: '15px' , icon: 2 , time: 1000 }); } } }); }); submit.trigger('click'); } }) } if (obj.event === 'adjust_channel') { var id = obj.data.id; layer.open({ type: 2 , title: '渠道调整' , content: '{:url("user.user/adjustChannel")}?id=' + id , area: ['90%', '90%'] , btn: ['确定', '取消'] , yes: function (index, layero) { var iframeWindow = window['layui-layer-iframe' + index] , submit = layero.find('iframe').contents().find('#formSubmit'); //监听提交 iframeWindow.layui.form.on('submit(formSubmit)', function (data) { var field = data.field; $.ajax({ url: '{:url("user.user/adjustChannel")}', data: field, type: "post", success: function (res) { if (res.code == 1) { layui.layer.msg(res.msg, { offset: '15px' , icon: 1 , time: 1000 }); layer.close(index); //关闭弹层 table.reload('user-lists'); //数据刷新 } else { layer.msg(res.msg, { offset: '15px' , icon: 2 , time: 1000 }); } } }); }); submit.trigger('click'); } }) } if (obj.event === 'adjust_first_leader') { var id = obj.data.id; layer.open({ type: 2 , title: '推荐人调整' , content: '{:url("user.user/adjustFirstLeader")}?id=' + id , area: ['90%', '90%'] , btn: ['确定', '取消'] , yes: function (index, layero) { var iframeWindow = window['layui-layer-iframe' + index] , submit = layero.find('iframe').contents().find('#formSubmit'); //监听提交 iframeWindow.layui.form.on('submit(formSubmit)', function (data) { var field = data.field; $.ajax({ url: '{:url("user.user/adjustFirstLeader")}', data: field, type: "post", success: function (res) { if (res.code == 1) { layui.layer.msg(res.msg, { offset: '15px' , icon: 1 , time: 1000 }); layer.close(index); //关闭弹层 table.reload('user-lists'); //数据刷新 } else { layer.msg(res.msg, { offset: '15px' , icon: 2 , time: 1000 }); } } }); }); submit.trigger('click'); } }) } }); // 启用状态 form.on('switch(switch-is_allow_mobile)', function (obj) { var id = obj.elem.attributes['data-id'].nodeValue var enable = 0; if (this.checked) { enable = 1; } like.ajax({ url: '{:url("user.User/switchIsAllowMobile")}', data: {id: id, enable: enable}, type: 'post', success: function (res) { if (res.code == 1) { layui.layer.msg(res.msg, { offset: '15px' , icon: 1 , time: 1000 }); } else { layui.layer.msg(res.msg, { offset: '15px' , icon: 2 , time: 1000 }, function () { location.reload();//刷新 }); } } }) }) }); </script> 当点击回车按钮时,进行查询按钮点击
最新发布
08-28
[root@localhost snort-2.9.20]# sudo snort -T -c /etc/snort/snort.conf Running in Test mode --== Initializing Snort ==-- Initializing Output Plugins! Initializing Preprocessors! Initializing Plug-ins! Parsing Rules file "/etc/snort/snort.conf" PortVar 'HTTP_PORTS' defined : [ 80:81 311 383 591 593 901 1220 1414 1741 1830 2301 2381 2809 3037 3128 3702 4343 4848 5250 6988 7000:7001 7144:7145 7510 7777 7779 8000 8008 8014 8028 8080 8085 8088 8090 8118 8123 8180:8181 8243 8280 8300 8800 8888 8899 9000 9060 9080 9090:9091 9443 9999 11371 34443:34444 41080 50002 55555 ] PortVar 'SHELLCODE_PORTS' defined : [ 0:79 81:65535 ] PortVar 'ORACLE_PORTS' defined : [ 1024:65535 ] PortVar 'SSH_PORTS' defined : [ 22 ] PortVar 'FTP_PORTS' defined : [ 21 2100 3535 ] PortVar 'SIP_PORTS' defined : [ 5060:5061 5600 ] PortVar 'FILE_DATA_PORTS' defined : [ 80:81 110 143 311 383 591 593 901 1220 1414 1741 1830 2301 2381 2809 3037 3128 3702 4343 4848 5250 6988 7000:7001 7144:7145 7510 7777 7779 8000 8008 8014 8028 8080 8085 8088 8090 8118 8123 8180:8181 8243 8280 8300 8800 8888 8899 9000 9060 9080 9090:9091 9443 9999 11371 34443:34444 41080 50002 55555 ] PortVar 'GTP_PORTS' defined : [ 2123 2152 3386 ] Detection: Search-Method = AC-Full-Q Split Any/Any group = enabled Search-Method-Optimizations = enabled Maximum pattern length = 20 Tagged Packet Limit: 256 Loading dynamic engine /usr/local/lib/snort_dynamicengine/libsf_engine.so... done Loading all dynamic detection libs from /usr/local/lib/snort_dynamicrules... WARNING: No dynamic libraries found in directory /usr/local/lib/snort_dynamicrules. Finished Loading all dynamic detection libs from /usr/local/lib/snort_dynamicrules Loading all dynamic preprocessor libs from /usr/local/lib/snort_dynamicpreprocessor/... Loading dynamic preprocessor library /usr/local/lib/snort_dynamicpreprocessor//libsf_pop_preproc.so... done Loading dynamic preprocessor library /usr/local/lib/snort_dynamicpreprocessor//libsf_imap_preproc.so... done Loading dynamic preprocessor library /usr/local/lib/snort_dynamicpreprocessor//libsf_smtp_preproc.so... done Loading dynamic preprocessor library /usr/local/lib/snort_dynamicpreprocessor//libsf_ssh_preproc.so... done Loading dynamic preprocessor library /usr/local/lib/snort_dynamicpreprocessor//libsf_dns_preproc.so... done Loading dynamic preprocessor library /usr/local/lib/snort_dynamicpreprocessor//libsf_ssl_preproc.so... done Loading dynamic preprocessor library /usr/local/lib/snort_dynamicpreprocessor//libsf_dce2_preproc.so... done Loading dynamic preprocessor library /usr/local/lib/snort_dynamicpreprocessor//libsf_sdf_preproc.so... done Loading dynamic preprocessor library /usr/local/lib/snort_dynamicpreprocessor//libsf_sip_preproc.so... done Loading dynamic preprocessor library /usr/local/lib/snort_dynamicpreprocessor//libsf_reputation_preproc.so... done Loading dynamic preprocessor library /usr/local/lib/snort_dynamicpreprocessor//libsf_gtp_preproc.so... done Loading dynamic preprocessor library /usr/local/lib/snort_dynamicpreprocessor//libsf_modbus_preproc.so... done Loading dynamic preprocessor library /usr/local/lib/snort_dynamicpreprocessor//libsf_dnp3_preproc.so... done Loading dynamic preprocessor library /usr/local/lib/snort_dynamicpreprocessor//libsf_s7commplus_preproc.so... done Loading dynamic preprocessor library /usr/local/lib/snort_dynamicpreprocessor//libsf_appid_preproc.so... done Loading dynamic preprocessor library /usr/local/lib/snort_dynamicpreprocessor//libsf_ftptelnet_preproc.so... done Finished Loading all dynamic preprocessor libs from /usr/local/lib/snort_dynamicpreprocessor/ Log directory = /var/log/snort WARNING: ip4 normalizations disabled because not inline. WARNING: tcp normalizations disabled because not inline. WARNING: icmp4 normalizations disabled because not inline. WARNING: ip6 normalizations disabled because not inline. WARNING: icmp6 normalizations disabled because not inline. Frag3 global config: Max frags: 65536 Fragment memory cap: 4194304 bytes Frag3 engine config: Bound Address: default Target-based policy: WINDOWS Fragment timeout: 180 seconds Fragment min_ttl: 1 Fragment Anomalies: Alert Overlap Limit: 10 Min fragment Length: 100 Max Expected Streams: 768 Stream global config: Track TCP sessions: ACTIVE Max TCP sessions: 262144 TCP cache pruning timeout: 30 seconds TCP cache nominal timeout: 3600 seconds Memcap (for reassembly packet storage): 8388608 Track UDP sessions: ACTIVE Max UDP sessions: 131072 UDP cache pruning timeout: 30 seconds UDP cache nominal timeout: 180 seconds Track ICMP sessions: INACTIVE Track IP sessions: INACTIVE Log info if session memory consumption exceeds 1048576 Send up to 2 active responses Wait at least 5 seconds between responses Protocol Aware Flushing: ACTIVE Maximum Flush Point: 16000 Stream TCP Policy config: Bound Address: default Reassembly Policy: WINDOWS Timeout: 180 seconds Limit on TCP Overlaps: 10 Maximum number of bytes to queue per session: 1048576 Maximum number of segs to queue per session: 2621 Options: Require 3-Way Handshake: YES 3-Way Handshake Timeout: 180 Detect Anomalies: YES Reassembly Ports: 21 client (Footprint) 22 client (Footprint) 23 client (Footprint) 25 client (Footprint) 42 client (Footprint) 53 client (Footprint) 79 client (Footprint) 80 client (Footprint) server (Footprint) 81 client (Footprint) server (Footprint) 109 client (Footprint) 110 client (Footprint) 111 client (Footprint) 113 client (Footprint) 119 client (Footprint) 135 client (Footprint) 136 client (Footprint) 137 client (Footprint) 139 client (Footprint) 143 client (Footprint) 161 client (Footprint) additional ports configured but not printed. Stream UDP Policy config: Timeout: 180 seconds HttpInspect Config: GLOBAL CONFIG Detect Proxy Usage: NO IIS Unicode Map Filename: /etc/snort/unicode.map IIS Unicode Map Codepage: 1252 Memcap used for logging URI and Hostname: 150994944 Max Gzip Memory: 838860 Max Gzip Sessions: 1807 Gzip Compress Depth: 65535 Gzip Decompress Depth: 65535 Normalize Random Nulls in Text: NO DEFAULT SERVER CONFIG: Server profile: All Ports (PAF): 80 81 311 383 591 593 901 1220 1414 1741 1830 2301 2381 2809 3037 3128 3702 4343 4848 5250 6988 7000 7001 7144 7145 7510 7777 7779 8000 8008 8014 8028 8080 8085 8088 8090 8118 8123 8180 8181 8243 8280 8300 8800 8888 8899 9000 9060 9080 9090 9091 9443 9999 11371 34443 34444 41080 50002 55555 Server Flow Depth: 0 Client Flow Depth: 0 Max Chunk Length: 500000 Small Chunk Length Evasion: chunk size <= 10, threshold >= 5 times Max Header Field Length: 750 Max Number Header Fields: 100 Max Number of WhiteSpaces allowed with header folding: 200 Inspect Pipeline Requests: YES URI Discovery Strict Mode: NO Allow Proxy Usage: NO Disable Alerting: NO Oversize Dir Length: 500 Only inspect URI: NO Normalize HTTP Headers: NO Inspect HTTP Cookies: YES Inspect HTTP Responses: YES Extract Gzip from responses: YES Decompress response files: Unlimited decompression of gzip data from responses: YES Normalize Javascripts in HTTP Responses: YES Max Number of WhiteSpaces allowed with Javascript Obfuscation in HTTP responses: 200 Normalize HTTP Cookies: NO Enable XFF and True Client IP: NO Log HTTP URI data: NO Log HTTP Hostname data: NO Extended ASCII code support in URI: NO Ascii: YES alert: NO Double Decoding: YES alert: NO %U Encoding: YES alert: YES Bare Byte: YES alert: NO UTF 8: YES alert: NO IIS Unicode: YES alert: NO Multiple Slash: YES alert: NO IIS Backslash: YES alert: NO Directory Traversal: YES alert: NO Web Root Traversal: YES alert: NO Apache WhiteSpace: YES alert: NO IIS Delimiter: YES alert: NO IIS Unicode Map: GLOBAL IIS UNICODE MAP CONFIG Non-RFC Compliant Characters: 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 Whitespace Characters: 0x09 0x0b 0x0c 0x0d Legacy mode: NO rpc_decode arguments: Ports to decode RPC on: 111 32770 32771 32772 32773 32774 32775 32776 32777 32778 32779 alert_fragments: INACTIVE alert_large_fragments: INACTIVE alert_incomplete: INACTIVE alert_multiple_requests: INACTIVE MaxRss at the end of static preproc config:24448 FTPTelnet Config: GLOBAL CONFIG Inspection Type: stateful Check for Encrypted Traffic: YES alert: NO Continue to check encrypted data: YES TELNET CONFIG: Ports: 23 Are You There Threshold: 20 Normalize: YES Detect Anomalies: YES FTP CONFIG: FTP Server: default Ports (PAF): 21 2100 3535 Check for Telnet Cmds: YES alert: YES Ignore Telnet Cmd Operations: YES alert: YES Ignore open data channels: NO FTP Client: default Check for Bounce Attacks: YES alert: YES Check for Telnet Cmds: YES alert: YES Ignore Telnet Cmd Operations: YES alert: YES Max Response Length: 256 SMTP Config: Ports: 25 465 587 691 Inspection Type: Stateful Normalize: ATRN AUTH BDAT DATA DEBUG EHLO EMAL ESAM ESND ESOM ETRN EVFY EXPN HELO HELP IDENT MAIL NOOP ONEX QUEU QUIT RCPT RSET SAML SEND STARTTLS SOML TICK TIME TURN TURNME VERB VRFY X-EXPS XADR XAUTH XCIR XEXCH50 XGEN XLICENSE X-LINK2STATE XQUE XSTA XTRN XUSR CHUNKING X-ADAT X-DRCP X-ERCP X-EXCH50 Ignore Data: No Ignore TLS Data: No Ignore SMTP Alerts: No Max Command Line Length: 512 Max auth Command Line Length: 1000 Max Specific Command Line Length: ATRN:255 AUTH:246 BDAT:255 DATA:246 DEBUG:255 EHLO:500 EMAL:255 ESAM:255 ESND:255 ESOM:255 ETRN:246 EVFY:255 EXPN:255 HELO:500 HELP:500 IDENT:255 MAIL:260 NOOP:255 ONEX:246 QUEU:246 QUIT:246 RCPT:300 RSET:246 SAML:246 SEND:246 SIZE:255 STARTTLS:246 SOML:246 TICK:246 TIME:246 TURN:246 TURNME:246 VERB:246 VRFY:255 X-EXPS:246 XADR:246 XAUTH:246 XCIR:246 XEXCH50:246 XGEN:246 XLICENSE:246 X-LINK2STATE:246 XQUE:246 XSTA:246 XTRN:246 XUSR:246 Max Header Line Length: 1000 Max Response Line Length: 512 X-Link2State Alert: Yes Drop on X-Link2State Alert: No Alert on commands: None Alert on unknown commands: No SMTP Memcap: 838860 MIME Max Mem: 838860 Base64 Decoding: Enabled Base64 Decoding Depth: Unlimited Quoted-Printable Decoding: Enabled Quoted-Printable Decoding Depth: Unlimited Unix-to-Unix Decoding: Enabled Unix-to-Unix Decoding Depth: Unlimited Non-Encoded MIME attachment Extraction: Enabled Non-Encoded MIME attachment Extraction Depth: Unlimited Log Attachment filename: Enabled Log MAIL FROM Address: Enabled Log RCPT TO Addresses: Enabled Log Email Headers: Enabled Email Hdrs Log Depth: 1464 SSH config: Autodetection: ENABLED Challenge-Response Overflow Alert: ENABLED SSH1 CRC32 Alert: ENABLED Server Version String Overflow Alert: ENABLED Protocol Mismatch Alert: ENABLED Bad Message Direction Alert: DISABLED Bad Payload Size Alert: DISABLED Unrecognized Version Alert: DISABLED Max Encrypted Packets: 20 Max Server Version String Length: 100 MaxClientBytes: 19600 (Default) Ports: 22 DCE/RPC 2 Preprocessor Configuration Global Configuration DCE/RPC Defragmentation: Enabled Memcap: 102400 KB Events: co SMB Fingerprint policy: Disabled Server Default Configuration Policy: WinXP Detect ports (PAF) SMB: 139 445 TCP: 135 UDP: 135 RPC over HTTP server: 593 RPC over HTTP proxy: None Autodetect ports (PAF) SMB: None TCP: 1025-65535 UDP: 1025-65535 RPC over HTTP server: 1025-65535 RPC over HTTP proxy: None Invalid SMB shares: C$ D$ ADMIN$ Maximum SMB command chaining: 3 commands SMB file inspection: Disabled DNS config: DNS Client rdata txt Overflow Alert: ACTIVE Obsolete DNS RR Types Alert: INACTIVE Experimental DNS RR Types Alert: INACTIVE Ports: 53 SSLPP config: Encrypted packets: not inspected Ports: 443 465 563 636 989 992 993 994 995 7801 7802 7900 7901 7902 7903 7904 7905 7906 7907 7908 7909 7910 7911 7912 7913 7914 7915 7916 7917 7918 7919 7920 Server side data is trusted Maximum SSL Heartbeat length: 0 Sensitive Data preprocessor config: Global Alert Threshold: 25 Masked Output: DISABLED SIP config: Max number of sessions: 40000 Max number of dialogs in a session: 4 (Default) Status: ENABLED Ignore media channel: DISABLED Max URI length: 512 Max Call ID length: 80 Max Request name length: 20 (Default) Max From length: 256 (Default) Max To length: 256 (Default) Max Via length: 1024 (Default) Max Contact length: 512 Max Content length: 2048 Ports: 5060 5061 5600 Methods: invite cancel ack bye register options refer subscribe update join info message notify benotify do qauth sprack publish service unsubscribe prack IMAP Config: Ports: 143 IMAP Memcap: 838860 MIME Max Mem: 838860 Base64 Decoding: Enabled Base64 Decoding Depth: Unlimited Quoted-Printable Decoding: Enabled Quoted-Printable Decoding Depth: Unlimited Unix-to-Unix Decoding: Enabled Unix-to-Unix Decoding Depth: Unlimited Non-Encoded MIME attachment Extraction: Enabled Non-Encoded MIME attachment Extraction Depth: Unlimited POP Config: Ports: 110 POP Memcap: 838860 MIME Max Mem: 838860 Base64 Decoding: Enabled Base64 Decoding Depth: Unlimited Quoted-Printable Decoding: Enabled Quoted-Printable Decoding Depth: Unlimited Unix-to-Unix Decoding: Enabled Unix-to-Unix Decoding Depth: Unlimited Non-Encoded MIME attachment Extraction: Enabled Non-Encoded MIME attachment Extraction Depth: Unlimited Modbus config: Ports: 502 DNP3 config: Memcap: 262144 Check Link-Layer CRCs: ENABLED Ports: 20000 Reputation config: WARNING: Can't find any whitelist/blacklist entries. Reputation Preprocessor disabled. MaxRss at the end of dynamic preproc config:28608 +++++++++++++++++++++++++++++++++++++++++++++++++++ Initializing rule chains... ERROR: /etc/snort/rules/snort3-community-rules/snort3-community.rules(63) Unknown rule option: 'service'. Fatal Error, Quitting.. [root@localhost snort-2.9.20]# sudo vim /etc/snort/rules/snort3-community-rules/snort3-community.rules [root@localhost snort-2.9.20]# sudo snort -T -c /etc/snort/snort.conf Running in Test mode --== Initializing Snort ==-- Initializing Output Plugins! Initializing Preprocessors! Initializing Plug-ins! Parsing Rules file "/etc/snort/snort.conf" PortVar 'HTTP_PORTS' defined : [ 80:81 311 383 591 593 901 1220 1414 1741 1830 2301 2381 2809 3037 3128 3702 4343 4848 5250 6988 7000:7001 7144:7145 7510 7777 7779 8000 8008 8014 8028 8080 8085 8088 8090 8118 8123 8180:8181 8243 8280 8300 8800 8888 8899 9000 9060 9080 9090:9091 9443 9999 11371 34443:34444 41080 50002 55555 ] PortVar 'SHELLCODE_PORTS' defined : [ 0:79 81:65535 ] PortVar 'ORACLE_PORTS' defined : [ 1024:65535 ] PortVar 'SSH_PORTS' defined : [ 22 ] PortVar 'FTP_PORTS' defined : [ 21 2100 3535 ] PortVar 'SIP_PORTS' defined : [ 5060:5061 5600 ] PortVar 'FILE_DATA_PORTS' defined : [ 80:81 110 143 311 383 591 593 901 1220 1414 1741 1830 2301 2381 2809 3037 3128 3702 4343 4848 5250 6988 7000:7001 7144:7145 7510 7777 7779 8000 8008 8014 8028 8080 8085 8088 8090 8118 8123 8180:8181 8243 8280 8300 8800 8888 8899 9000 9060 9080 9090:9091 9443 9999 11371 34443:34444 41080 50002 55555 ] PortVar 'GTP_PORTS' defined : [ 2123 2152 3386 ] Detection: Search-Method = AC-Full-Q Split Any/Any group = enabled Search-Method-Optimizations = enabled Maximum pattern length = 20 ERROR: /etc/snort/rules/snort3-community-rules/snort3-community.rules(66) Invalid configuration line: flow:to_server,established; Fatal Error, Quitting.. [root@localhost snort-2.9.20]#
05-17
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值