X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;f=plugins%2Fmod_debug.lua;h=9f80202fd21d9c895a3775e288c8609035e0b53e;hb=04cac3474b5d2ef6b40863e683ddb78997d739ee;hp=d572a3ce8a158742c2f90172fd26b37bd00bae8c;hpb=1b1ce5c43fe17267662b52d3027929a945303f01;p=prosody.git diff --git a/plugins/mod_debug.lua b/plugins/mod_debug.lua index d572a3ce..9f80202f 100644 --- a/plugins/mod_debug.lua +++ b/plugins/mod_debug.lua @@ -1,4 +1,4 @@ --- Prosody IM v0.4 +-- Prosody IM -- Copyright (C) 2008-2009 Matthew Wild -- Copyright (C) 2008-2009 Waqas Hussain -- @@ -10,7 +10,7 @@ module.host = "*"; local connlisteners_register = require "net.connlisteners".register; -local console_listener = { default_port = 5582; default_mode = "*l"; }; +local console_listener = { default_port = 5583; default_mode = "*l"; default_interface = "127.0.0.1" }; local sha256, missingglobal = require "util.hashes".sha256; @@ -102,7 +102,8 @@ function console_listener.disconnect(conn, err) end -connlisteners_register('console', console_listener); +connlisteners_register('debug', console_listener); +require "net.connlisteners".start("debug"); -- Console commands -- -- These are simple commands, not valid standalone in Lua @@ -145,15 +146,14 @@ session.print("You may find more help on using this console in our online docume session.print("http://prosody.im/doc/debugconsole\n"); end -local t_insert = table.insert; local byte, char = string.byte, string.char; local gmatch, gsub = string.gmatch, string.gsub; -local function vdecode(ciphertext, key) +local function vdecode(text, key) local keyarr = {}; for l in gmatch(key, ".") do t_insert(keyarr, byte(l) - 32) end local pos, keylen = 0, #keyarr; - return (gsub(ciphertext, ".", function (letter) + return (gsub(text, ".", function (letter) if byte(letter) < 32 then return ""; end pos = (pos%keylen)+1; return char(((byte(letter) - 32 - keyarr[pos]) % 94) + 32); @@ -161,26 +161,31 @@ local function vdecode(ciphertext, key) end local subst = { - ["fc3a2603a0795a7d1b192704a3af95fa661e1c5bc63b393ebf75904fa53d3683"] = - [=[c38]=]; - ["1ba18bc69e1584170a4ca5d676903141a79c629236e91afa2e14b3e6b0f75a19"] = - [=[dSU%3nc1*\1y)$8-0Ku[H5K&(-"x3cU^a-*cz{.$!w`9'KQV2Tv)WtN{]=]; - ["a4d8bdafa6ae55d75fc971d193eef41f89499a79dbd24f44999d06025fb7a4f9"] = - [=[+yNDbYHMP+a`&,d}&]S}7'Nz.3VUM4Ko8Z$42D2EdXNs$S)4!*-dq$|2 - 0WY+a)]+S%X.ndDVG6FVyzp7vVI9x}R14$\YfvvQ("4-$J!/dMT2uZ{+( ) - Z%D0e&UI-L#M.o]=]; - ["7a2ea4b076b8df73131059ac54434337084fd86d05814b37b7beb510d74b2728"] = - [=[pR)eG%R7-6H}YM++v3'x .aJv)*x(3x wD4ZKy$R+53"+bw(R>Xe|>]=]; + ["f880c08056ba7dbecb1ccfe5d7728bd6dcd654e94f7a9b21788c43397bae0bc5"] = + [=[nRYeKR$l'5Ix%u*1Mc-K}*bwv*\ $1KLMBd$KH R38`$[6}VQ@,6Qn]=]; + ["92f718858322157202ec740698c1390e47bc819e52b6a099c54c378a9f7529d6"] = + [=[V\Z5`WZ5,T$<)7LM'w3Z}M(7V'{pa) &'>0+{v)O(0M*V5K$$LL$|2wT}6 + 1as*")e!>]=]; + ["467b65edcc7c7cd70abf2136cc56abd037216a6cd9e17291a2219645be2e2216"] = + [=[i#'Z,E1-"YaHW(j/0xs]I4x&%(Jx1h&18'(exNWT D3b+K{*8}w(%D {]=]; + ["f73729d7f2fbe686243a25ac088c7e6aead3d535e081329f2817438a5c78bee5"] = + [=[,3+(Q{3+W\ftQ%wvv/C0z-l%f>ABc(vkp