# HG changeset patch # User Matthew Wild # Date 1273343299 -3600 # Node ID fb9987d6df5d66e15a329946129ca929a223ec1e # Parent 1eabe33d7af7b333389aa0cb1c77da68cfa991fa Add -help flag for information on usage and options diff -r 1eabe33d7af7 -r fb9987d6df5d xmpp-fingerprint.lua --- a/xmpp-fingerprint.lua Fri Apr 23 14:32:28 2010 +0100 +++ b/xmpp-fingerprint.lua Sat May 08 19:28:19 2010 +0100 @@ -35,6 +35,25 @@ return 1; end +function flags.help() + print("XMPP Server Fingerprinter"); + print("(C) 2010 Matthew Wild. Licensed under the MIT/X11 License"); + print(""); + print("Syntax: "..arg[0].." [OPTIONS] ADDRESS [PORT]"); + print(""); + print("ADDRESS must be the network address or IP to connect to, SRV lookup"); + print("is not supported."); + print(""); + print("PORT is the port number to connect to. Defaults to 5222, or 5269 for"); + print("server-to-server testing."); + print(""); + print("Options:"); + print(" -s:", "Server-to-server port testing (less reliable)"); + print("-t NUM:", "Set timeout to NUM seconds"); + print(" -d:", "Enable debug output (useful for adding new fingerprints)"); + print(""); +end + -- Process flags -- local function process_args(arg) local f = arg[1] and arg[1]:match("^%-(%S+)");