capscan.lua

changeset 1
ce892ac8bec2
parent 0
d17a1b659852
child 2
b89fe0449b96
equal deleted inserted replaced
0:d17a1b659852 1:ce892ac8bec2
10 local escape_table = { ["'"] = "&apos;", ["\""] = "&quot;", ["<"] = "&lt;", [">"] = "&gt;", ["&"] = "&amp;" }; 10 local escape_table = { ["'"] = "&apos;", ["\""] = "&quot;", ["<"] = "&lt;", [">"] = "&gt;", ["&"] = "&amp;" };
11 local function escape(str) return (string.gsub(str, "['&<>\"]", escape_table)); end 11 local function escape(str) return (string.gsub(str, "['&<>\"]", escape_table)); end
12 12
13 local xmlns_caps = "http://jabber.org/protocol/caps"; 13 local xmlns_caps = "http://jabber.org/protocol/caps";
14 local xmlns_disco = "http://jabber.org/protocol/disco#info"; 14 local xmlns_disco = "http://jabber.org/protocol/disco#info";
15
16 if not jid then
17 io.write("Please give a JID as the first argument\n");
18 os.exit(1);
19 end
15 20
16 if not pass then 21 if not pass then
17 io.write("Password (not blanked): "); 22 io.write("Password (not blanked): ");
18 pass = io.read("*l"); 23 pass = io.read("*l");
19 end 24 end

mercurial