Page 1 of 2
WinMx Connection Checker
Posted: Sun Sep 12, 2004 1:54 am
by quicksilver
This Is a small Script for testing that you can run the winmx program from your machine .
This script will attempt to connect to the IP and Port specified and will then try to negotiate a connection to WinMX. This will allow you to check if your firewall/router is set up correctly for WinMX
Note: to prevent people using this tool to spam rooms from the web servers IP, it wont actually join the room, but it will do all the negotiation stages up until the joining, then it will disconnect.
http://www.mxtools.net/tools/tester.php
This script came from the Mxtools site
Posted: Sun Sep 12, 2004 3:03 pm
by battye
It said my connection failed, and WinMX has never worked better...

Posted: Sun Sep 12, 2004 5:24 pm
by StorbinC
ya I had a message saying "winMX might not be hosting any rooms right now" or something like that when I ran it last night and my WinMX is working just fine
Posted: Sun Sep 12, 2004 7:22 pm
by quicksilver
I have looked into this script and I tried it myself and watched carefully..
I gave it the correct port to get past my firewall and then it connected to WinMx .
The bit that caught my attention was the
unable to receive crypt key from winmx this reveals the true purpose of this script .
Yes it does as it says but it also allows the mxtools site admin to retreive the connection details so he can build up a hash table to crack the encryption on Frontcodes servers..very crafty.
For those that dont know it Frontcode secure the use of thier servers for connecting ppl and room listings for their own program only (WinMx) ,and this is heavily encrypted so thats why you cannot get any other clients to use the servers ( Like Bearshare and Morpheus and a few others do on another network ).
This is also the reason why certain programs like RoboMx and Mxtools coloured server cannot get listed on WinMx lists, because they cant connect and satisfy the question asked of them by Frontcode.
Ok the upshot is if you find you cant connect to Mx and have made sure your firewall is mapped correctly use internet explorer to go to one of the help sites as you would know you can or can,t connect way befor this script would tell you

Posted: Sun Sep 12, 2004 9:18 pm
by StorbinC
so quick is this a good thing or a bad thing?
and are we helping or hurting the greater cause by using this?
Posted: Sun Sep 12, 2004 11:53 pm
by quicksilver
My personal feeling is its on one hand a good thing because if Frontcode try to shut down Mx someone else could host the servers , but on the other hand big buisiness could steal the program and start messing up the network ..its a lose lose situation..
Maybe its already been cracked and being held in reserve by somebody ..I hope so
Posted: Mon Sep 13, 2004 10:28 am
by KM
umm, the encryption is allready known (otherwise how would there be programs for it!) and works off of a key system, the client sends off a key and then the server responds with anouther key based on that, the response can then have 2 number extracted from it which are then used in the process of decrypting the data sent from the host to the user, and the other for encrypting it to send to the server (they have to swap keys like this otherwise they wouldn't know which key the other was using). Each key also has a "type" number, a key with type 0x57 is a chat client and 0x58 is a chat server etc, the test for sending the key is just there to check if there are any rooms (ie. does the WinMX accept a type 0x57 key or not) - but as for the bad results, try it again - i found that about 10% of the time it came up not recieving a key this is probibly just lag on the web servers connection or something causing it to time out (there is a short time out for obvious reasons).
And even if the crypt key was somehow useful for anything other than that 1 connection (it isn't) then i sure as hell wouldn't waste time making a php script to ask users to enter their IP and port for it, i'd just make a program to go through the room list!
Posted: Mon Sep 13, 2004 10:33 am
by StorbinC
ohh well what ever
i keep getting Unable to recieve Crypt Key - WinMX may not be hosting any channnels but winMX works fine and besides a learning tool for the programer I really don't see much use for this script.
Posted: Mon Sep 13, 2004 2:16 pm
by KM
I've improved it a little to make it re-check if it fails the first time, this should reduce the number of incorrect errors, but on well
and how did you guess the purpose of the script? it was actually just because i started porting some of the code from C++ or php so i needed something to play around with, and i had a huge hole on the "tools" page to try and fill

Posted: Mon Sep 13, 2004 2:49 pm
by battye
Hmm, definately won't work for me, I get the crypt error now too, do you want me to check out the PHP script?
Posted: Mon Sep 13, 2004 3:40 pm
by KM
whats the room? i'll try it with the script and see why it might give invalid results
Posted: Mon Sep 13, 2004 4:39 pm
by quicksilver
Km I hate to disagree but you know as well as I do That knowing the protocol and those connection types that Nushi released in the MXsock document doesnt get you a room listing . If you could do that why havent you ?
All the programs out at the moment do not directly talk to Frontcode servers to generate a place for a room on the listings , they all use WinMx in one form or the other , you know this as do I.
Posted: Mon Sep 13, 2004 5:15 pm
by KM
firstly, uninstall winmx and run rabbit or any other program like it - then tell me that they depend on winmx

secondly, room listings require UDP encryption which is different to the TCP encryption used for pretty much everything else such as chat connections. The UDP decryption was released by nushi, but its missing one of the UDP tables so encryption cant be done (i left my system generating tables and came up with 3 possible tables that work but all crash after a few uses).
thirdly, the only time any winmx program talks to the frontcode servers is the peer cache at connect, winmx (or rabbit or anything else) connects to the peer caches to get the IP and port of a primary to connect to to basicly get connected, the frontcode servers have nothing at all to do with chat listings (hence the notice when you click the chat button saying its nothing to do with frontcode) its done using a primary connection to monitor for refresh packets then responding with a UDP packet containing the room info.
finally, even if everything where true about these claims on the response from the host being some important data then firstly, i have to allready know about the crypt keys because it generates one to send in the first place, and secondly like i said if there was some reason to want to get this response and log it or something then i'd just make a program to connect to every host on the list...
anyway, back on topic:
I am having a problem accurately dettecting the number of recieved bytes and as a result i've ended up using strlen() to detect the length of the data, but this is not binary safe so a asc(0) char causes incorrect results, but testing twice should reduce the chances of this happening to about 1 time in 200 so i dont know why it would keep comming up with the error for a perfectly OK room :-\ (i assume the web servers IP address isn't banned, mainly because i see no reason why it would be but that would cause that error, so would high lag (i have increased the timeout to 10 seconds so that should be high enough even for pretty high lag) although really, once it gets past the point of connection its told you if your firewall etc is configured and is the main purpose of it

Posted: Tue Sep 14, 2004 1:26 am
by StorbinC
ok I don't know much about all this (and havn't tested since my last post) but could the problem be that we are testing with WinMX already running and are also in a chat room?
Posted: Tue Sep 14, 2004 2:13 am
by quicksilver
Km much as you dislike Benders site theres no need to reinvent the wheel
http://mxsock.gg0wnt.com/
The tables you seek are there .
http://mxcontrol.sourceforge.net/module ... opic&t=398
Read that if you would like to know anything else about it .
You know krish from the source code ?