|
@@ -75,7 +75,7 @@ def rx_mqtt(mc, userdata, message):
|
75
|
75
|
if __name__ == "__main__":
|
76
|
76
|
parser = argparse.ArgumentParser(description='This is a mqtt sniffer.')
|
77
|
77
|
parser.add_argument('-f', dest='hostname', default='localhost', help='Hostname of the mqtt server')
|
78
|
|
- parser.add_argument('-p', dest='port', default=1883, help='Port of the mqtt server')
|
|
78
|
+ parser.add_argument('-p', dest='port', default=1883, type=int, help='Port of the mqtt server')
|
79
|
79
|
parser.add_argument('-n', dest='no_credentials', action='store_true', help='Avoid asking for credentials')
|
80
|
80
|
parser.add_argument('-u', dest='username', default=None, help='Set username for mqtt server')
|
81
|
81
|
parser.add_argument('-t', dest='topicfilter', default="", help='Set topic filter')
|