MCPcopy Index your code
hub / github.com/USArmyResearchLab/Dshell / Connection

Class Connection

dshell/core.py:1088–1419  ·  view source on GitHub ↗

Class for holding data about connections def __init__(self, plugin, first_packet) Args: first_packet: the first Packet object to initialize connection Attributes: addr: .addr attribute of first packet sip: source IP smac: sourc

Source from the content-addressed store, hash-verified

1086
1087
1088class Connection(object):
1089 """
1090 Class for holding data about connections
1091
1092 def __init__(self, plugin, first_packet)
1093
1094 Args:
1095 first_packet: the first Packet object to initialize connection
1096
1097 Attributes:
1098 addr: .addr attribute of first packet
1099 sip: source IP
1100 smac: source MAC address
1101 sport: source port
1102 sipcc: country code of source IP
1103 siplat: latitude of source IP
1104 siplon: longitude of source IP
1105 sipasn: ASN of source IP
1106 clientip: same as sip
1107 clientmac: same as smac
1108 clientport: same as sport
1109 clientcc: same as sipcc
1110 clientlat: same as siplat
1111 clientlon: same as siplon
1112 clientasn: same as sipasn
1113 dip: dest IP
1114 dmac: dest MAC address
1115 dport: dest port
1116 dipcc: country code of dest IP
1117 diplat: latitude of dest IP
1118 diplon: longitude of dest IP
1119 dipasn: ASN of dest IP
1120 serverip: same as dip
1121 servermac: same as dmac
1122 serverport: same as dport
1123 servercc: same as dipcc
1124 serverlat: same as diplat
1125 serverlon: same as diplon
1126 serverasn: same as dipasn
1127 protocol: text version of protocol in layer-3 header
1128 protocol_num: numeric version of protocol in layer-3 header
1129 clientpackets: counts of packets from client side
1130 clientbytes: total bytes transferred from client side
1131 serverpackets: counts of packets from server side
1132 serverbytes: total bytes transferred from server side
1133 ts: timestamp of first packet
1134 dt: datetime of first packet
1135 starttime: datetime of first packet
1136 endtime: datetime of last packet
1137 client_state: the TCP state on the client side ("init",
1138 "established", "closed", etc.)
1139 server_state: the TCP state on server side
1140 blobs: list of reassembled half-stream Blobs
1141 stop: if True, stop following connection
1142 handled: used to indicate if a connection was already passed through
1143 a plugin's connection_handler function. Resets when new
1144 data for a connection comes in.
1145

Callers 1

_connection_handlerMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected