void LoadData() { List <httpBL> entries = new List <httpBL>(); List <SPListItem> items = GateKeeperModule.GetGateKeeperItems(GateKeeperType.HTTP); foreach (SPListItem item in items) { try { httpBL http = new httpBL(); http.ID = item.ID.ToString(); http.Date = DateTime.Parse(item["GateKeeper_Date"].ToString()); try { http.IPAddress = item["GateKeeper_IPAddress"].ToString(); } catch { }; try { http.Referrer = item["GateKeeper_Referrer"].ToString(); } catch { }; try { http.UserAgent = item["GateKeeper_Useragent"].ToString(); } catch { }; try { http.LastActivity = item["GateKeeper_LastActivity"].ToString(); } catch { }; try { http.ThreatLevel = item["GateKeeper_Threatlevel"].ToString(); } catch { }; try { http.VisitorType = item["GateKeeper_Visitortype"].ToString(); } catch { }; try { http.Comment = item["GateKeeper_Comment"].ToString(); } catch { }; entries.Add(http); } catch (Exception ex) { ex.ToString(); } } gridHttpBL.DataSource = entries; gridHttpBL.DataBind(); }
/// <summary> /// Binds to selected row and sends the id cell (0) to /// Utils.DeleteEntry for deletion based in the entryID /// </summary> protected void btnDelete_Click(object sender, EventArgs e) { Button btn = (Button)sender; GridViewRow grdRow = (GridViewRow)btn.Parent.Parent; int id = int.Parse(grdRow.Cells[0].Text); GateKeeperModule.DeleteGateKeeperItem(id); Response.Redirect(Request.RawUrl, true); }
void LoadData() { try { List <droneBL> entries = new List <droneBL>(); List <SPListItem> items = GateKeeperModule.GetGateKeeperItems(GateKeeperType.Drone); foreach (SPListItem item in items) { try { droneBL drone = new droneBL(); drone.ID = item.ID.ToString(); drone.Date = DateTime.Parse(item["GateKeeper_Date"].ToString()); try { drone.IPAddress = item["GateKeeper_IPAddress"].ToString(); } catch { }; try { drone.Referrer = item["GateKeeper_Referrer"].ToString(); } catch { }; try { drone.UserAgent = item["GateKeeper_Useragent"].ToString(); } catch { }; try { drone.Comment = item["GateKeeper_Comment"].ToString(); } catch { }; entries.Add(drone); } catch (Exception ex) { ex.ToString(); } } gridDroneBL.DataSource = entries; gridDroneBL.DataBind(); } catch (Exception) { return; } }
void LoadData() { List <honeyPot> entries = new List <honeyPot>(); List <SPListItem> items = GateKeeperModule.GetGateKeeperItems(GateKeeperType.HoneyPot); foreach (SPListItem item in items) { try { honeyPot honeypot = new honeyPot(); honeypot.ID = item.ID.ToString(); honeypot.Date = DateTime.Parse(item["GateKeeper_Date"].ToString()); try { honeypot.IPAddress = item["GateKeeper_IPAddress"].ToString(); } catch { }; try { honeypot.Referrer = item["GateKeeper_Referrer"].ToString(); } catch { }; try { honeypot.UserAgent = item["GateKeeper_Useragent"].ToString(); } catch { }; try { honeypot.Comment = item["GateKeeper_Comment"].ToString(); } catch { }; entries.Add(honeypot); } catch (Exception ex) { ex.ToString(); } } gridHoneyPot.DataSource = entries; gridHoneyPot.DataBind(); }
void LoadData() { List <UserAgent> entries = new List <UserAgent>(); List <SPListItem> items = GateKeeperModule.GetGateKeeperItems(GateKeeperType.White, GateKeeperListing.GateKeeper_Useragent); foreach (SPListItem item in items) { try { UserAgent useragent = new UserAgent(); useragent.ID = item.ID.ToString(); useragent.Date = DateTime.Parse(item["GateKeeper_Date"].ToString()); try { useragent.userAgent = item["GateKeeper_Useragent"].ToString(); } catch { }; try { useragent.Comment = item["GateKeeper_Comment"].ToString(); } catch { }; entries.Add(useragent); } catch (Exception ex) { ex.ToString(); } } entries.Sort(UserAgent.UAComparison); gridUserAgent.DataSource = entries; gridUserAgent.DataBind(); }
void LoadData() { List <ipAddress> entries = new List <ipAddress>(); List <SPListItem> items = GateKeeperModule.GetGateKeeperItems(GateKeeperType.Black, GateKeeperListing.GateKeeper_IPAddress); foreach (SPListItem item in items) { try { ipAddress address = new ipAddress(); address.ID = item.ID.ToString(); address.Date = DateTime.Parse(item["GateKeeper_Date"].ToString()); try { address.IPAddress = item["GateKeeper_IPAddress"].ToString(); } catch { }; try { address.Comment = item["GateKeeper_Comment"].ToString(); } catch { }; entries.Add(address); } catch (Exception ex) { ex.ToString(); } } entries.Sort(ipAddress.IPComparison); gridIPAddress.DataSource = entries; gridIPAddress.DataBind(); }
void LoadData() { List <SafeUrl> entries = new List <SafeUrl>(); List <SPListItem> items = GateKeeperModule.GetGateKeeperItems(GateKeeperType.White, GateKeeperListing.GateKeeper_Url); foreach (SPListItem item in items) { try { SafeUrl safeurl = new SafeUrl(); safeurl.ID = item.ID.ToString(); safeurl.Date = DateTime.Parse(item["GateKeeper_Date"].ToString()); try { safeurl.Url = item["GateKeeper_Url"].ToString(); } catch { }; try { safeurl.Comment = item["GateKeeper_Comment"].ToString(); } catch { }; entries.Add(safeurl); } catch (Exception ex) { ex.ToString(); } } entries.Sort(SafeUrl.UrlComparison); gridUrl.DataSource = entries; gridUrl.DataBind(); }