public int Compare(XWebSecDomain d1, XWebSecDomain d2) { if (d1.domainName == d2.domainName) { return(1); } return(0); }
/// <summary> /// Adds single Fiddler session into data structures. /// </summary> /// <param name="session"></param> public void addSession(Session session) { if (!session.isTunnel) { XWebSecDomain domain = new XWebSecDomain(session.hostname, session.bHasWebSocketMessages, session.isHTTPS); // pull out filtered domains first if (isInFilterList(session.hostname, session.isHTTPS)) { if (filteredDomainList.ContainsKey(domain)) { filteredDomainList[domain] += 1; #if (DEBUG) FiddlerApplication.Log.LogString($"[XWebSec] Filtered Domains: (+1) [{domain.domainName}]"); #endif } else { filteredDomainList.Add(domain, 1); filteredDomainCount++; #if (DEBUG) FiddlerApplication.Log.LogString($"[XWebSec] Filtered Domains: (add) [{ domain.domainName}]"); #endif } } else { if (session.isHTTPS) { if (httpsDomainList.ContainsKey(domain)) { httpsDomainList[domain] += 1; #if (DEBUG) FiddlerApplication.Log.LogString($"[XWebSec] Https Domains: (+1) [{domain.domainName}]"); #endif } else { httpsDomainList.Add(domain, 1); httpsDomainCount++; #if (DEBUG) FiddlerApplication.Log.LogString($"[XWebSec] Https Domains: (add) [{domain.domainName}]"); #endif } } else { if (httpDomainList.ContainsKey(domain)) { httpDomainList[domain] += 1; #if (DEBUG) FiddlerApplication.Log.LogString($"[XWebSec] Http Domains: (+1) [{domain.domainName}]"); #endif } else { httpDomainList.Add(domain, 1); httpDomainCount++; #if (DEBUG) FiddlerApplication.Log.LogString($"[XWebSec] Http Domains: (add) [{domain.domainName}]"); #endif } } } } }