Skip to content

Instantly share code, notes, and snippets.

@alinVD
Created February 9, 2017 18:38
Show Gist options
  • Select an option

  • Save alinVD/99ea2741e78817fa01962912dac37f07 to your computer and use it in GitHub Desktop.

Select an option

Save alinVD/99ea2741e78817fa01962912dac37f07 to your computer and use it in GitHub Desktop.

Revisions

  1. alinVD created this gist Feb 9, 2017.
    12 changes: 12 additions & 0 deletions PortClassification.R
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    ## RTime: 42s

    ## This classifies connections based on their destination.
    library(gtBase)

    aggregate <- Multiplexer(Load(NetFlow),
    WellKnown = Sum(0 <= Dport && Dport <= 1023),
    Registered = Sum(1024 <= Dport && Dport <= 49151),
    Dynamic = Sum(49152 <= Dport && Dport <= 65535),
    Count())

    View(aggregate)