Giter Club home page Giter Club logo

mqttinfo's Introduction

mqttinfo

mqttinfo is a command-line utility to retrieve information on an MQTT broker.

To get the mqttinfo utility, you may run:

go get -u -v github.com/Teserakt-io/mqttinfo/cmd/mqttinfo

Otherwise, clone this repository and run ./scripts/build.sh to build mqttinfo, then run it from ./bin/mqttinfo.

Usage:

./bin/mqttinfo --help
      --help          shows this
  -h, --host string   MQTT broker to connect to (default "localhost")
  -j, --json          writes JSON-formatted output to mqttinfo.json
  -p, --port int      network port to connect to (default 1883)
  -P, --pwd string    password, if authentication is needed
  -u, --user string   username, if authentication is needed

Key features of mqttinfo:

  • MQTT v3.1.1 and v5.0 support
  • Multiplatform: Will run on Linux, macOS, Windows.
  • Broker fingerprinting: Attempts to identify the broker product.
  • Human- and machine-readable output: Prints results to stdout and writes JSON to a file.

Current limitations:

  • TLS is not supported yet.
  • WebSocket is not supported yet.
  • Only HiveMQ, mosquitto, and VerneMQ are identified as brokers.
  • Broker fingerprinting is pretty dumb, can be enhanced for example by looking at reason strings.

To analyze a remote broker, you can for example do the following:

Please note that the last step (product detection) may take up to a minute, because it's awaiting for the publication of messages from the $SYS tree.

Disclaimers

The behavior of a broker depends on several factors: the broker product, the version of the software, the parameters defined in the configuration file, and the MQTT version. It's therefore unwise to conclude that broker product X is "better" than broker product "Y" after you've observed that some instance of X looks better than some instance of Y.

mqttinfo doesn't perform any intrusive operations but can be seen as a reconnaissance tool in an offensive context, and in the worst case it could crash particularly fragile brokers. So use at your own risk, note that we decline any responsibility etc. etc.

Broker detection is based on heuristics, and therefore is not 100% reliable. Please feel free to file an issue in GitHub if you encounter misidentified brokers, we'll do our best to improve mqttinfo's detection capabilities.

Intellectual property

mqttinfo is copyright (c) 2019, Teserakt AG.

The code is released under AGPLv3, please contact us if that's an issue for you.

mqttinfo's People

Contributors

veorq avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

sasqwatch

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.