资源简介
用VC++实现的一个网络入侵检查,实现了基本的抓包,分析,检测,有良好的界面,功能较完善。立即下载就可以运行,也可以更改增加新的扩展功能。

代码片段和文件信息
/* $Id: checksum.cv 1.2 2001/01/02 08:06:00 roesch Exp $ */
/*
** Copyright (C) 1998199920002001 Martin Roesch
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License or
** (at your option) any later version.
**
** 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.
*/
#include “checksum.h“
/*
* Function: checksum(u_int16_t * u_int32_t u_int16_t * u_int32_t)
*
* Purpose: Huh huh math....
*
* Arguments: b1 => pointer to data set one
* len1 => length of data set one
* b2 => pointer to data set two
* len2 => length of data set two
*
* Returns: csum => the calculated checksum for the given data
*/
u_int16_t checksum(u_int16_t *b1 u_int32_t len1 u_int16_t *b2 u_int32_t len2)
{
u_int32_t sum = 0;
if(b1 != (u_int16_t *)NULL)
{
while(len1 > 1)
{
sum += *((u_int16_t *)b1 ++);
if(sum & 0x80000000)
{
sum = (sum & 0xffff) + (sum >> 16);
}
len1 -= 2;
}
/* we‘ll have problems if b2 exists and len1 is odd */
if(len1)
{
sum += (u_int16_t) * (u_int8_t*) b1;
}
}
if(b2 != (u_int16_t*)NULL)
{
while(len2 > 1)
{
sum += *((u_int16_t*)b2 ++);
if(sum & 0x80000000)
{
sum = (sum & 0xffff) + (sum >> 16);
}
len2 -= 2;
}
if(len2)
{
sum += (u_int16_t) * (u_int8_t*) b2;
}
}
while(sum >> 16)
sum = (sum & 0xffff) + (sum >> 16);
return ~sum;
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1037 2000-10-31 11:36 网络入侵检测snort\acconfig.h
文件 7205 2001-01-05 13:22 网络入侵检测snort\aclocal.m4
文件 269 2000-10-29 01:23 网络入侵检测snort\AUTHORS
文件 3124 2000-11-20 00:41 网络入侵检测snort\backdoor-lib
文件 1005 2001-01-18 05:40 网络入侵检测snort\BUGS
文件 3718 2000-10-29 01:35 网络入侵检测snort\cdefs.h
文件 30111 2001-01-18 08:30 网络入侵检测snort\ChangeLog
文件 2294 2001-01-02 02:06 网络入侵检测snort\checksum.c
文件 1278 2001-01-02 02:06 网络入侵检测snort\checksum.h
文件 21063 2000-10-29 01:23 网络入侵检测snort\config.guess
文件 3353 2001-02-05 09:01 网络入侵检测snort\config.h
文件 2659 2001-01-26 19:03 网络入侵检测snort\config.h.in
文件 20163 2000-10-29 01:23 网络入侵检测snort\config.sub
文件 109328 2001-01-30 20:53 网络入侵检测snort\configure
文件 15219 2001-01-30 20:53 网络入侵检测snort\configure.in
文件 18329 2000-10-29 01:23 网络入侵检测snort\COPYING
文件 6830 2001-01-02 10:14 网络入侵检测snort\CREDITS
文件 3881 2000-11-20 00:41 网络入侵检测snort\ddos-lib
文件 41572 2001-02-05 07:38 网络入侵检测snort\decode.c
文件 20027 2001-02-01 10:40 网络入侵检测snort\decode.h
文件 1236 2000-11-20 00:41 网络入侵检测snort\finger-lib
文件 2298 2000-11-20 00:41 网络入侵检测snort\ftp-lib
文件 13064 2001-01-02 17:35 网络入侵检测snort\INSTALL
文件 5834 2000-10-29 01:23 网络入侵检测snort\install-sh
文件 18329 2001-01-02 01:37 网络入侵检测snort\LICENSE
文件 64553 2001-02-01 10:43 网络入侵检测snort\log.c
文件 3083 2001-01-02 02:06 网络入侵检测snort\log.h
文件 2853 2001-01-05 19:27 网络入侵检测snort\Makefile.am
文件 14549 2001-01-26 19:03 网络入侵检测snort\Makefile.in
文件 6232 2000-11-20 00:41 网络入侵检测snort\misc-lib
............此处省略300个文件信息
相关资源
- VC++ 多线程文件读写操作
- 移木块游戏,可以自编自玩,vc6.0编写
- VC++MFC小游戏实例教程(实例)+MFC类库
- VC++实现CMD命令执行与获得返回信息
- VC++基于OpenGL模拟的一个3维空间模型
- 基于VC++的SolidWorks二次开发SolidWorks
- 派克变换VC++源码(附文档)
- VC++ 串口
- VC++ 大富翁4_大富翁游戏源码
- VC++ 摄像头视频采集与回放源程序
- 转 VC++ 实现电子邮件(Email)发送
- 基于MFC的VC++仿QQ浏览器源码(雏形)
- VC++ 服务程序编写及安装与卸载
- VC++6.0番茄西红柿VAXvirsual assist X完美破
- 基于改进的fcm算法的图像分割vc++
- VC++6.0 绿色版,免安装,非常好用。
- Microsoft Visual C++ 2005 Redistributable Pack
- VC++MFC课程设计的学生成绩管理系统
- 大智慧365DLL插件设计
- VC++6.0汉化包
- VC++完整商业界面源码(再上传)
- VC++编程技术600个大型项目源码.rar
- VC++实现RSA加密算法
- VC++ 中国象棋经典游戏源代码
- 郁金香VC++游戏辅助视频教程
- C语言进阶源码---基于graphics实现图书
- 摄影测量相对定向VC++程序
- VC++数字图像处理典型算法及实现
- VC++酒店客房管理系统 MFC
- 车站计算机联锁vc++6.0程序代码
评论
共有 条评论