Skip to content

Instantly share code, notes, and snippets.

View semaj's full-sized avatar

james larisch semaj

View GitHub Profile
module DynamicNetworkGraph
class NetworkFlow
attr_accessor :srcAddr, :dstAddr, :srcPort, :dstPort, :protocol, :start, :end, :packets, :transferred, :status
def fromFields(sep, line)
line.split(sep).zip(instance_variables).each { |val, name| instance_variable_set(name, val) }
end
end
end