网站地图| 免费获取|
毕业论文网
  • 网站首页|
  • 论文范文|
  • 论文降重|
  • 职称论文发表|
  • 合作期刊|
  • 论文下载|
  • 计算机论文|
  • 外文翻译|
  • 免费论文|
  • 论文资料|
  • 论文开题报告
搜索

当前位置:毕业论文网 -> 免费论文 -> 计算机论文 -> 免费基于Aglet的入侵检测系统的实现(六)
计算机论文资料| ASP设计| Delphi| VB设计| JSP设计| ASP.NET设计| VB.NET| java设计| VC| pb| VS| dreamweaver| c#.net| vf| VC++| 计算机论文范文| 论文下载| 自动化论文

免费基于Aglet的入侵检测系统的实现(六)

最新活动:微信集50个赞就可获取任意一篇钻石会员文档。详情见微信集赞换文档
免费基于Aglet的入侵检测系统的实现(六) ception exc){
//当没有驱动程序时,应用程序无法继续运行,故退出程序
System.out.println("没有发现驱动程序:"+Driver);
exc.printStackTrace();System.exit(1);
}
try{
//建立与指定数据库的连接
Connection Connection=DriverManager.getConnection(source);
SQLWarning warn = Connection.getWarnings();
while(warn!=null){
System.out.println(warn.getMessage());
warn=warn.getNextWarning();
}
//创建一个用于执行预编译SQL的语句对象:查询记录的cid
String sql="select ip=dbo.inet_ntoa(ip_src) from iphdr,event,signature where iphdr.cid=event.cid and signature=signature.sig_id and sig_name='SCAN Proxy (8080) attempt'";
PreparedStatement pStm=Connection.prepareStatement(sql);
//发送和执行预编译的SQL语句,获得查询结果集
ResultSet result=pStm.executeQuery();
//"i"用于记录读出数据库多少个记录,"j"在输出记录时用于循环
int i=0,j=0;
//使用迭代模式访问查询结果集,计算有多少条数据
while(result.next()){
i++;                        
}
//关闭查询结果集合
result.close();
//关闭SQL语句
pStm.close();
System.out.println("i="+i);
i=i-1;
//建立"i"个单元的数组
ip=new String[i+1];
//再读数据库
//创建执行简单SQL语句的SQL语句对象
Statement stm=Connection.createStatement(); 
//查询记录的IP地址,发送和执行简单SQL语句,获得查询结果集
sql="select ip=dbo.inet_ntoa(ip_src) from iphdr,event,signature where iphdr.cid=event.cid and signature=signature.sig_id and sig_name='SCAN Proxy (8080) attempt'";
result=stm.executeQuery(sql);
//使用迭代模式访问查询结果集,把数据用数组接受下来
while(result.next()){
ip[j]=result.getString("ip");
j++;                         
}
//输出数组
for(j=0;j<=i;j++){
int k=j+1;
System.out.println("第"+k+"个IP地址:"+ip[j]+"\t");
}
//关闭查询结果集合
result.close();
//关闭SQL语句
stm.close();
//关闭数据库连接
Connection.close();
}catch(SQLException exc){
System.out.println("在执行数据库访问时发生了错误!");
exc.printStackTrace();
}
}
//建立单项链表,添加头和尾,并把第一个ip地址插入进去。
private void addhead()
{
temp=new node();
head=temp;
temp=new node();
temp.IpSo="end";
end=temp;
head.next=end;
temp=new node();
temp.IpSo=ip[0];
temp.Times=1;
temp.next=head.next;
head.next=temp;
}
//在链表尾添加节点,并把数据写道刚建立的节点中
private void addnode()
{
int i;
if(_theRemote==0)i=1;
else i=0;
while(i<ip.length)
{
search=head.next;
boolean t=false;
temp=new node();
pre=temp;
while(!t&&(search.next!=null))
{
if(ip[i].equals(search.IpSo))
{
t=true;
break;
}
pre.next=search;
search=search.next;
}
if(t){
search.Times=search.Times+1;
}
else
{
search=pre.next;
temp=new node();
temp.IpSo=ip[i];
temp.Times=1;
temp.next=search.next;
search.next=temp;
}
i++;
}
}
 //遍历链表,把链表的节点值输出
private void print()
{
search=head.next;
while(search!=null)
{
if(search.Times>10)
{
System.out.println(search.IpSo+":"+search.Times+"次");
}
search=search.next;
}  
}
//数据分析处理
private void addrule()
{
String IP="可疑地址:";
System.out.println("检查分析数据中(是否有攻击数据)………………");
search=head.next;
JFrame frame=new JFrame("基于AGLET平台的分布式入侵检测系统");
frame.setLocation(new Point(341,256));

首页 上一页 3 4 5 6 7 8 下一页 尾页 6/8/8

免费基于Aglet的入侵检测系统的实现(六)由毕业论文网(www.huoyuandh.com)会员上传。
原创论文资料流程 相关论文
上一篇:免费个人入侵检测系统的实现 下一篇:免费基于IPv6的下一代校园网设计
推荐论文 本专业最新论文
Tags:免费 基于 Aglet 入侵 检测系统 实现 2010-04-01 13:06:17【返回顶部】
精彩推荐
发表论文

联系方式 | 论文说明 | 网站地图 | 免费获取 | 钻石会员 | 硕士论文资料


毕业论文网提供论文范文,论文代发,原创论文资料

本站部分文章来自网友投稿上传,如发现侵犯了您的版权,请联系指出,本站及时确认并删除  E-mail: 17304545@qq.com

Copyright@ 2009-2020 毕业论文网 版权所有