Packet manipulation gone awry

Posted by tobiassjosten on Tue 29 Sep 2009 07:27 PM — 4 posts, 17,815 views.

Sweden #0
I am trying to use the OnPluginPacketReceived callback to route all traffic through my Lua scripts. Since my project is aimed at IRE MUDs, I am also using this to negotiate and extract ATCP data. It works decently apart from one little problem which I have had to implement a hack to work around.

My base logic is that any packet without an ending IAC-GA (\255\249) is an incomplete packet. Any incomplete packet is buffered and prepended to the next incoming packet before that is again checked for ending. Somehow, this seems to either trigger or circumvent MUCHclient's MCCP support. All I'm seeing is garbage data after the first "This is Imperian, enter your name:" message.

Debugging packets in MUSHclient on Wine crashes the client. I have set up a Virtual box installation of Windows but my initial checks haven't yielded any insight at all as to why this is happening.

Could someone please help me figure this out?

The project can be found at http://github.com/tobiassjosten/protea and if you want to see this particular behaviour then download the commit linked below. Check the protea.xml file for the 'pigscanfly' variable and change so that it is assigned true whenever the plugin is loaded instead of, as is now, when the login has been completed.

http://github.com/tobiassjosten/protea/commit/abe583c65cd7aac1cba168a9c8ec67bea6574f53

Any help is greatly appreciated.
Australia Forum Administrator #1
Template:post=8956
Please see the forum thread: http://gammon.com.au/forum/?id=8956.



tobiassjosten said:

Debugging packets in MUSHclient on Wine crashes the client.


Probably because it is opening a notepad window. Try setting the Wine Windows emulation to Windows 98. This doesn't happen normally with recent versions of Wine (ie. version 1 upwards).
Sweden #2
Setting MUSHclient.exe to use Windows 98 worked like a charm. Thanks Nick!

Now I might be able to delve deeper into this issue. Insights to the actual problem are still very much welcome though.
Australia Forum Administrator #3
That other thread should help. Try to avoid playing with packets until MCCP is turned on. You can test for that with GetInfo (103).