Beispiel #1
0
 private void OnParsedItemDetected(object sender, PcapAnalyzer.ParsedItemDetectedEventArgs e)
 {
     if (e.ParsedItem is PcapAnalyzer.NetworkPassword)
     {
         var password = e.ParsedItem as PcapAnalyzer.NetworkPassword;
         _passwordsUserControl.AddDataToTable(password);
         this.modulesTreeView.Nodes["CredentialsNode"].Nodes["PasswordsNode"].Text = $"Passwords ({_passwordsUserControl.ItemsCount})";
         _networkMapUserControl.HandlePassword(password);
     }
     else if (e.ParsedItem is PcapAnalyzer.NetworkHash)
     {
         var hash = e.ParsedItem as PcapAnalyzer.NetworkHash;
         _hashesUserControl.AddHash(hash);
         this.modulesTreeView.Nodes["CredentialsNode"].Nodes["HashesNode"].Text = $"Hashes ({_hashesUserControl.HashesCount})";
         _networkMapUserControl.HandleHash(hash);
     }
     else if (e.ParsedItem is PcapAnalyzer.NetworkConnection)
     {
         var connection = e.ParsedItem as PcapAnalyzer.NetworkConnection;
         _networkMapUserControl.AddEdge(connection.Source, connection.Destination);
         this.modulesTreeView.Nodes["NetworkNode"].Nodes["NetworkMapNode"].Text = $"Network Map ({_networkMapUserControl.NodesCount})";
     }
     else if (e.ParsedItem is PcapAnalyzer.NetworkFile)
     {
         var fileObject = e.ParsedItem as PcapAnalyzer.NetworkFile;
         _filesUserControl.AddFile(fileObject);
         this.modulesTreeView.Nodes["DataNode"].Nodes["FilesNode"].Text = $"Files ({_filesUserControl.FilesCount})";
     }
 }
Beispiel #2
0
 private void OnParsedItemDetected(object sender, PcapAnalyzer.ParsedItemDetectedEventArgs e)
 {
     if (e.ParsedItem is PcapAnalyzer.NetworkPassword)
     {
         var password = e.ParsedItem as PcapAnalyzer.NetworkPassword;
         _passwordsUserControl.AddDataToTable(password);
         this.modulesTreeView.Nodes["CredentialsNode"].Nodes["PasswordsNode"].Text = $"Passwords ({_passwordsUserControl.ItemsCount})";
         _networkMapUserControl.HandlePassword(password);
     }
     else if (e.ParsedItem is PcapAnalyzer.NetworkHash)
     {
         var hash = e.ParsedItem as PcapAnalyzer.NetworkHash;
         _hashesUserControl.AddHash(hash);
         this.modulesTreeView.Nodes["CredentialsNode"].Nodes["HashesNode"].Text = $"Hashes ({_hashesUserControl.HashesCount})";
         _networkMapUserControl.HandleHash(hash);
     }
     else if (e.ParsedItem is PcapAnalyzer.NetworkConnection)
     {
         var connection = e.ParsedItem as PcapAnalyzer.NetworkConnection;
         _connections.Add(connection);
         _networkMapUserControl.AddEdge(connection.Source, connection.Destination);
         this.modulesTreeView.Nodes["NetworkNode"].Nodes["NetworkMapNode"].Text = $"Network Map ({_networkMapUserControl.NodesCount})";
     }
     else if (e.ParsedItem is PcapAnalyzer.NetworkFile)
     {
         var fileObject = e.ParsedItem as PcapAnalyzer.NetworkFile;
         _filesUserControl.AddFile(fileObject);
         this.modulesTreeView.Nodes["DataNode"].Nodes["FilesNode"].Text = $"Files ({_filesUserControl.FilesCount})";
     }
     else if (e.ParsedItem is PcapAnalyzer.DnsNameMapping)
     {
         var dnsResponse = e.ParsedItem as PcapAnalyzer.DnsNameMapping;
         _dnsResponseUserControl.AddNameMapping(dnsResponse);
         this.modulesTreeView.Nodes["NetworkNode"].Nodes["DnsResponsesNode"].Text = $"DNS Responses ({_dnsResponseUserControl.AnswerCount})";
         _networkMapUserControl.HandleDnsNameMapping(dnsResponse);
     }
     else if (e.ParsedItem is PcapAnalyzer.VoipCall)
     {
         var voipCall = CommonUi.Casting.CastAnalyzerVoipCallToPresentationVoipCall(e.ParsedItem as PcapAnalyzer.VoipCall);
         _voipCallsUserControl.AddVoipCall(voipCall);
         this.modulesTreeView.Nodes["DataNode"].Nodes["VoipCallsNode"].Text = $"Voip Calls ({_voipCallsUserControl.VoipCallsCount})";
     }
 }