mqtt_pwn.exploits package

Submodules

mqtt_pwn.exploits.owntracks module

class mqtt_pwn.exploits.owntracks.OwnTracksExploit(scan_id)[source]

Bases: object

Represents the owntracks exploit

static body_to_json(body)[source]

Converts the body of a message to json

create_urls_table()[source]

Creates the URLs table from the messages

google_maps_url(user=None, device=None)[source]

The public method to create a google maps URL

static label_to_name(label)[source]

Converts a label to the name

mqtt_pwn.exploits.sonoff module

class mqtt_pwn.exploits.sonoff.SonoffExploit(prefix, client, timeout, cli)[source]

Bases: object

Represents the Sonoff Exploit class

static run(prefix, timeout, cli)[source]

Creates a Sonoff exploit/client instance from another CLI and runs it

run_exploit()[source]

Runs the exploit, and prints the passwords to console

class mqtt_pwn.exploits.sonoff.SonoffMqttClient(host='test.mosquitto.org', port=1883)[source]

Bases: object

Represents a MQTT Client connection handler class for Sonoff Exploit

check_for_timeout()[source]

Check whether the time is up (to run for a limited amount of time)

classmethod from_other_client(client)[source]

Creates an instance from other MQTT client

mqtt_on_connect(mqtt_client, userdata, flags, result)[source]

Handle when a connection was established

mqtt_on_message(mqtt_client, obj, msg)[source]

Handles when a message is received

publish_probe_message(topic)[source]

Publishes an empty message to a topic (according to the sonoff RFC)

run()[source]

Run the sonoff exploit

set_cli(cli)[source]

Sets the CLI

set_prefix(prefix)[source]

Sets the prefix

set_timeout(listen_timeout)[source]

Sets the timeout

Module contents