Skip to content

Instantly share code, notes, and snippets.

@othtim
Created September 7, 2017 18:34
Show Gist options
  • Select an option

  • Save othtim/23cdcac8a2dd27d27b0c5aeaa0b2c0a7 to your computer and use it in GitHub Desktop.

Select an option

Save othtim/23cdcac8a2dd27d27b0c5aeaa0b2c0a7 to your computer and use it in GitHub Desktop.
reorganize wireshark
#time, sourceip, destinationip, packet length, sourceport, destinationport
while(<>){
s/\"//g;
@i = split(',');
$j = join(",",($i[1] , $i[2], $i[3], $i[5], $i[length(@i)-1], $i[length(@i)-2]));
next unless $j =~ m/^[0-9.]+,[0-9.]+,[0-9.]+,[0-9]+,[0-9]+,[0-9]+/;
print $j;
#print "\n";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment