Skip to content

Commit

Permalink
Update mqtt
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexAQ972 committed Jan 27, 2025
1 parent d3913e1 commit e70804e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 8 additions & 4 deletions integration_tests/mqtt/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,15 @@ OUTPUT_FILE=$ZGRAB_OUTPUT/mqtt/mqtt.json

echo "mqtt/test: Tests runner for mqtt"
# TODO FIXME: Add any necessary flags or additional tests
echo -e ",target,mqtt
,target,mqtt-tls
,target,mqtt-v5
,target,mqtt-tls-v5" | docker run --rm -i -v ./multiple.ini:/multiple.ini --link $CONTAINER_NAME:target zgrab2_runner multiple -c /multiple.ini> $OUTPUT_FILE
# echo -e ",target,mqtt
# ,target,mqtt-tls
# ,target,mqtt-v5
# ,target,mqtt-tls-v5" | docker run --rm -i -v ./multiple.ini:/multiple.ini --link $CONTAINER_NAME:target zgrab2_runner multiple -c /multiple.ini> $OUTPUT_FILE
#CONTAINER_NAME=$CONTAINER_NAME $ZGRAB_ROOT/docker-runner/docker-run.sh mqtt --v5 >> $OUTPUT_FILE
CONTAINER_NAME=$CONTAINER_NAME $ZGRAB_ROOT/docker-runner/docker-run.sh mqtt > $ZGRAB_OUTPUT/mqtt/default.json
CONTAINER_NAME=$CONTAINER_NAME $ZGRAB_ROOT/docker-runner/docker-run.sh mqtt --v5 > $ZGRAB_OUTPUT/mqtt/mqtt_v5.json
CONTAINER_NAME=$CONTAINER_NAME $ZGRAB_ROOT/docker-runner/docker-run.sh mqtt --tls -p 8883 > $ZGRAB_OUTPUT/mqtt/mqtt_tls.json
CONTAINER_NAME=$CONTAINER_NAME $ZGRAB_ROOT/docker-runner/docker-run.sh mqtt --tls --v5 -p 8883 > $ZGRAB_OUTPUT/mqtt/mqtt_tls_v5.json

# Dump the docker logs
echo "mqtt/test: BEGIN docker logs from $CONTAINER_NAME [{("
Expand Down
2 changes: 1 addition & 1 deletion zgrab2_schemas/zgrab2/mqtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
mqtt_scan_response = SubRecord(
{
"session_present": Boolean(),
"connect_return_code": Binary(),
"connect_return_code": Unsigned32BitInteger(),
"response": String(),
"tls": zgrab2.tls_log,
}
Expand Down

0 comments on commit e70804e

Please sign in to comment.