/// <summary> /// 删除木马数据 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btHorseDel_Click(object sender, EventArgs e) { DateTime dteFromDate, dteToDate; dteFromDate = Convert.ToDateTime(horseStartDate.Value.ToString()).Date; dteToDate = Convert.ToDateTime(horseEndDate.Value.ToString()).Date; dbHorse DB = new dbHorse(); DB.DelTables(dteFromDate, dteToDate); }
/// <summary> /// 导出木马数据 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btHorseExport_Click(object sender, EventArgs e) { DateTime dteFromDate, dteToDate; dteFromDate = Convert.ToDateTime(horseStartDate.Value.ToString()).Date; dteToDate = Convert.ToDateTime(horseEndDate.Value.ToString()).Date; dbHorse DB = new dbHorse(); string FileName = Server.MapPath(".") + "\\temp\\" + common.GetFileName() + ".xls"; DB.ExportToExcel(dteFromDate, dteToDate, FileName); SendToClient(FileName); }
protected void Page_Load(object sender, EventArgs e) { dbHorse DB = new dbHorse(); DataSet ds = DB.GetContentByID(Request.QueryString["type"], Request.QueryString["id"]); if (ds == null || ds.Tables.Count < 1 || ds.Tables[0].Rows.Count < 1) return; txtvSrcIp.Text = common.NumberToIP( ds.Tables[0].Rows[0]["vSrcAddr"]) + " | " + ds.Tables[0].Rows[0]["vSrcPort"].ToString(); txtvSrcMac.Text = ds.Tables[0].Rows[0]["vSrcMac"].ToString(); txtvDstIp.Text = common.NumberToIP(ds.Tables[0].Rows[0]["vDstAddr"]) + " | " + ds.Tables[0].Rows[0]["vDstPort"].ToString(); ; txtvDstMac.Text = ds.Tables[0].Rows[0]["vDstMac"].ToString(); txtvName.Text = ds.Tables[0].Rows[0]["vSiteName"].ToString(); //txtvHost.Text = ds.Tables[0].Rows[0]["vHost"].ToString(); tbvDnsName.Text = ds.Tables[0].Rows[0]["vDnsName"].ToString(); tbvFlag.Text = common.FormatTrojanFlag(Convert.ToInt32( ds.Tables[0].Rows[0]["vFlag"].ToString())); txtvLocalFile.Text = ds.Tables[0].Rows[0]["vLocalFile"].ToString(); txtvRate.Text = ds.Tables[0].Rows[0]["vRate"].ToString(); DB.SetReaded(Request.QueryString["type"], Request.QueryString["id"]); }
/// <summary> /// 根据选择的模块生成不同的类型 /// </summary> /// <param name="type"></param> /// <returns></returns> private database CreateDataBase(string type) { database d = null; switch (type) { case "1": d = new dbHttpAll(); break; case "2": d = new dbMsgAll("Msn"); break; case "3": d = new dbMsgAll("Yahoo"); break; case "4": d = new dbMailBox("Pop"); break; case "5": d = new dbMailBox("Smtp"); break; case "6": d = new dbMailSite("Get"); break; case "7": d = new dbMailSite("Send"); break; case "8": d = new dbInfoAll("Web"); break; case "9": d = new dbDns(); break; case "10": d = new dbHorse(); break; case "11": d = new dbInfoAll("Ftp"); break; } return d; }