xmpp-fingerprint.lua

changeset 3
fb9987d6df5d
parent 2
1eabe33d7af7
child 4
0677d0506878
equal deleted inserted replaced
2:1eabe33d7af7 3:fb9987d6df5d
31 end 31 end
32 32
33 function flags.t(arg) 33 function flags.t(arg)
34 default_timeout = tonumber(arg[1] or 1); 34 default_timeout = tonumber(arg[1] or 1);
35 return 1; 35 return 1;
36 end
37
38 function flags.help()
39 print("XMPP Server Fingerprinter");
40 print("(C) 2010 Matthew Wild. Licensed under the MIT/X11 License");
41 print("");
42 print("Syntax: "..arg[0].." [OPTIONS] ADDRESS [PORT]");
43 print("");
44 print("ADDRESS must be the network address or IP to connect to, SRV lookup");
45 print("is not supported.");
46 print("");
47 print("PORT is the port number to connect to. Defaults to 5222, or 5269 for");
48 print("server-to-server testing.");
49 print("");
50 print("Options:");
51 print(" -s:", "Server-to-server port testing (less reliable)");
52 print("-t NUM:", "Set timeout to NUM seconds");
53 print(" -d:", "Enable debug output (useful for adding new fingerprints)");
54 print("");
36 end 55 end
37 56
38 -- Process flags -- 57 -- Process flags --
39 local function process_args(arg) 58 local function process_args(arg)
40 local f = arg[1] and arg[1]:match("^%-(%S+)"); 59 local f = arg[1] and arg[1]:match("^%-(%S+)");

mercurial