PtokaX forum

Lua 5.3/5.2/5.1 Scripts (for PtokaX 0.4.0.0 and newer) => Help with scripts => Topic started by: slinky on 23 June, 2008, 00:55:38

Title: Encrypt AwayMsg 1.0 LUA 5.1x [Strict] [API 2]
Post by: slinky on 23 June, 2008, 00:55:38
This script is very handy and easy to use. However, I'd like to be able to assure hub members of their privacy by encrypting the contents of OfflineMsg.tbl.

I can't find any advice about how to do this, and I have no idea if it is real easy to add such functionality or not.

Can anyone help?

:)
Title: Re: Encrypt AwayMsg 1.0 LUA 5.1x [Strict] [API 2]
Post by: slinky on 23 June, 2008, 01:43:33
Thanks very much for the swift reply, guess I'll just have to wait! :)
Title: Re: Encrypt AwayMsg 1.0 LUA 5.1x [Strict] [API 2]
Post by: Toast on 23 June, 2008, 06:11:02
huh and the purpose of this would be ?
Title: Re: Encrypt AwayMsg 1.0 LUA 5.1x [Strict] [API 2]
Post by: slinky on 23 June, 2008, 17:15:41
Quote from: Toast on 23 June, 2008, 06:11:02
huh and the purpose of this would be ?

Quote from: slinky on 23 June, 2008, 00:55:38I'd like to be able to assure hub members of their privacy by encrypting the contents of OfflineMsg.tbl.

Currently the contents of offline PMs can be read by the person hosting the hub.
Title: Re: Encrypt AwayMsg 1.0 LUA 5.1x [Strict] [API 2]
Post by: bastya_elvtars on 23 June, 2008, 19:25:32
You cannot encrypt with MD5. I usually encode it into base64 which gives a sense of security. :-P
Title: Re: Encrypt AwayMsg 1.0 LUA 5.1x [Strict] [API 2]
Post by: Toast on 23 June, 2008, 19:26:31
LOL at Base64 :P
Title: Re: Encrypt AwayMsg 1.0 LUA 5.1x [Strict] [API 2]
Post by: slinky on 23 June, 2008, 22:49:07
For my needs for this particular script it is more to assure members, should they bring it up, that their messages are saved as gobblydigook and can't be read by the hub owner. It doesn't have to be totally unbreakable. It's not like I am going to look at the offline PMs anyway.

I'm not up on the difference between obfuscation and encryption. I just need gobblydigooktion.  :)
Title: Re: Encrypt AwayMsg 1.0 LUA 5.1x [Strict] [API 2]
Post by: Scanning on 23 June, 2008, 23:16:43
You need encryption the entire way, from user, to hub and from hub to that user that gets the message, everything can be *read* by using a packet sniffer along the way. Sounds like it's better for you to tell them to not post secret stuff in messages on internet/hub
Title: Re: Encrypt AwayMsg 1.0 LUA 5.1x [Strict] [API 2]
Post by: bastya_elvtars on 24 June, 2008, 00:21:51
Not usual, but a base64 implementation for Lua is readily available (http://lua-users.org/wiki/BaseSixtyFour) on the WWW. :) LuaSocket also has it.
Title: Re: Encrypt AwayMsg 1.0 LUA 5.1x [Strict] [API 2]
Post by: slinky on 30 June, 2008, 01:38:32
So then, can anyone give me tips on how to simply obscure/obfuscate the content of OfflineMsg.tbl? Or rather, can anyone provide the exact code or extras I need to add to this script?

Thanks :)

(Had a look at base64 but all Greek to me).
Title: Re: Encrypt AwayMsg 1.0 LUA 5.1x [Strict] [API 2]
Post by: slinky on 02 July, 2008, 05:06:02
You. Are. Awesome.  :D
Title: Re: Encrypt AwayMsg 1.0 LUA 5.1x [Strict] [API 2]
Post by: slinky on 11 July, 2008, 04:53:50
I've discovered an issue with the base64 encoding. When an offline message is delivered, the message is presented with no problems, but the nick of the user who sent the message is random text/numbers. I assume the username has not been de-gobbledygook'ed. Can this be fixed?  :)
Title: Re: Encrypt AwayMsg 1.0 LUA 5.1x [Strict] [API 2]
Post by: merlin_xl54 on 13 July, 2008, 03:42:02
I use this great script without issues.

Quote
[21:29:10] <[AwayMsg]> Message set for offline user: Testnick!
[21:31:34] <[AwayMsg]>

  Currently online, Operator Testnick_master! left this message for you on: 07/12/08 21:29:10:
  Just a test message!
I removed the "..p.." and added Operator.


M
Title: Re: Encrypt AwayMsg 1.0 LUA 5.1x [Strict] [API 2]
Post by: merlin_xl54 on 13 July, 2008, 05:38:13
Quote from: Mutor on 13 July, 2008, 04:57:37
Why did you do that?

Just tweaked for Private Hub. 

It was confusing for some users. Anyone with a key is called an Op. They don't know about profiles. All Op's have master profile. Certain users are given Operator profile but limited. No key, modified commands etc. We wanted the message to say from Operator not Master...

I didn't think it would make a difference in how the script worked. I can change it if you think it is necessary.

M