Guest User

Untitled

a guest
Jun 19th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. string __str = String.Join(" ", data.Select(x => x.ToString("x2")).ToArray()); //covert the byte[](packet) to hex string
  2. string __ascii = AsciiToString(data); //convert the byte[](packet) to ASCII
  3. if (encrypted) FormMain.PFA(form => form.listViewAnalyzer.Items.Add("S<-C [ENCRYPTED] Blowfishkey = 0xFF"));
  4. else FormMain.PFA(form => form.listViewAnalyzer.Items.Add("S<-C"));
  5. ListViewItem item = new ListViewItem(__str); //create new item and place the packet as hex string
  6. item.SubItems.Add(__ascii); //add the ascii variant as substring
  7. FormMain.PFA(form => form.listViewAnalyzer.Items.Add(item)); //add the item
Add Comment
Please, Sign In to add comment