conpot.tests.helpers package¶
Submodules¶
conpot.tests.helpers.s7comm_client module¶
-
conpot.tests.helpers.s7comm_client.
AddOptions
(parser)¶
-
conpot.tests.helpers.s7comm_client.
BruteTsap
(ip, port, src_tsaps=(256, 512), dst_tsaps=(258, 512, 513))¶
-
class
conpot.tests.helpers.s7comm_client.
COTPConnectionPacket
(dst_ref=0, src_ref=0, dst_tsap=0, src_tsap=0, tpdu_size=0)¶ Bases:
object
COTP Connection Request or Connection Confirm packet (ISO on TCP). RFC 1006
-
pack
()¶ make Connection Request Packet
-
unpack
(packet)¶ parse Connection Confirm Packet (header only)
-
-
class
conpot.tests.helpers.s7comm_client.
COTPDataPacket
(data='')¶ Bases:
object
COTP Data packet (ISO on TCP). RFC 1006
-
pack
()¶
-
unpack
(packet)¶
-
-
conpot.tests.helpers.s7comm_client.
GetIdentity
(ip, port, src_tsap, dst_tsap)¶
-
exception
conpot.tests.helpers.s7comm_client.
S7Error
(code)¶ Bases:
Exception
-
class
conpot.tests.helpers.s7comm_client.
S7Packet
(_type=1, req_id=0, parameters='', data='')¶ Bases:
object
S7 packet
-
pack
()¶
-
unpack
(packet)¶
-
-
exception
conpot.tests.helpers.s7comm_client.
S7ProtocolError
(message, packet='')¶ Bases:
Exception
-
conpot.tests.helpers.s7comm_client.
Scan
(ip, port)¶
-
conpot.tests.helpers.s7comm_client.
Split
(ar, size)¶ split sequence into blocks of given size
-
conpot.tests.helpers.s7comm_client.
StripUnprintable
(msg)¶
-
class
conpot.tests.helpers.s7comm_client.
TPKTPacket
(data='')¶ Bases:
object
TPKT packet. RFC 1006
-
pack
()¶
-
unpack
(packet)¶
-
-
class
conpot.tests.helpers.s7comm_client.
s7
(ip, port, src_tsap=512, dst_tsap=513, timeout=8)¶ Bases:
object
-
Connect
()¶ Establish ISO on TCP connection and negotiate PDU
-
Function
(_type, group, function, data='')¶
-
NegotiatePDU
(pdu=480)¶ Send negotiate pdu request and receive response. Reply no matter
-
ReadSZL
(szl_id)¶
-
Request
(_type, parameters='', data='')¶ Send s7 request and receive response
-
plc_stop_function
()¶
-
conpot.tests.helpers.snmp_client module¶
-
class
conpot.tests.helpers.snmp_client.
SNMPClient
(host, port)¶ Bases:
object
-
cbFun
(sendRequestHandle, errorIndication, errorStatus, errorIndex, varBindTable, cbCtx)¶
-
get_command
(OID=((1, 3, 6, 1, 2, 1, 1, 1, 0), None), callback=None)¶
-
set_command
(OID, callback=None)¶
-
walk_command
(OID, callback=None)¶
-