diff --git a/zgrab2_schemas/zgrab2/__init__.py b/zgrab2_schemas/zgrab2/__init__.py index aa5890a0..5ca9ed17 100644 --- a/zgrab2_schemas/zgrab2/__init__.py +++ b/zgrab2_schemas/zgrab2/__init__.py @@ -21,4 +21,4 @@ from . import telnet from . import ipp from . import banner -from . import amqp091 \ No newline at end of file +from . import amqp091 diff --git a/zgrab2_schemas/zgrab2/amqp091.py b/zgrab2_schemas/zgrab2/amqp091.py index 98d7b21c..842e301b 100644 --- a/zgrab2_schemas/zgrab2/amqp091.py +++ b/zgrab2_schemas/zgrab2/amqp091.py @@ -7,33 +7,44 @@ from . import zgrab2 # Schema for connectionTune struct -connection_tune = SubRecord({ - "channel_max": Unsigned32BitInteger(), - "frame_max": Unsigned32BitInteger(), - "heartbeat": Unsigned32BitInteger(), -}) +connection_tune = SubRecord( + { + "channel_max": Unsigned32BitInteger(), + "frame_max": Unsigned32BitInteger(), + "heartbeat": Unsigned32BitInteger(), + } +) # Schema for knownServerProperties struct -known_server_properties = SubRecord({ - "product": String(), - "version": String(), - "platform": String(), - "copyright": String(), - "information": String(), - "unknown_props": String(), -}) +known_server_properties = SubRecord( + { + "product": String(), + "version": String(), + "platform": String(), + "copyright": String(), + "information": String(), + "unknown_props": String(), + } +) # Schema for Result struct -result_schema = SubRecord({ - "result": SubRecord ({ "failure": String(), - "version_major": Unsigned32BitInteger(), - "version_minor": Unsigned32BitInteger(), - "server_properties": known_server_properties, - "locales": ListOf(String()), - "auth_success": Boolean(), - "tune": connection_tune, - "tls": zgrab2.tls_log, -})}, extends=zgrab2.base_scan_response) +result_schema = SubRecord( + { + "result": SubRecord( + { + "failure": String(), + "version_major": Unsigned32BitInteger(), + "version_minor": Unsigned32BitInteger(), + "server_properties": known_server_properties, + "locales": ListOf(String()), + "auth_success": Boolean(), + "tune": connection_tune, + "tls": zgrab2.tls_log, + } + ) + }, + extends=zgrab2.base_scan_response, +) zschema.registry.register_schema("zgrab2-amqp091", result_schema) zgrab2.register_scan_response_type("amqp091", result_schema)