View Single Post
  #1 (permalink)  
Old March 2nd, 2002
gbrayut gbrayut is offline
Devotee
 
Join Date: December 31st, 2001
Location: Sandy, ut
Posts: 22
gbrayut is flying high
Smile I broke the Code!!

Well, the hostslist code atleast.

I've noticed that is is very hard to manually enter hosts into xolox. The add host button usually doesnt work, I think all it does is add new hosts into the host cache, which means that it will maybe try to connect to it in 10 or 15 mins. I wanted to be able to add in some hosts which i know share the kind of files i wanted, but the add host is not a very good way off doing this. The next best place is in the hostslist file. One problem.....it encodes the ip numbers.

So, i played around with it for a while, and just adding in straight ip numbers doesnt work. Also if the hostslist file is corrupt or if it just has a bunch of ip numbers in it, xolox gets a new host list from a server on xolox's web site (port 80 on ip # 194.109.6.83) Thats why you can still connect if you delete you hostslist file.

Decoding the hosts wasnt that hard, i just found all the unique port numbers in my hosts list that i could find, created a special hostslist file full of unique connection port hosts (instead of the usuall 6346/6347/6348...) and then used a packet sniffer to find all the pings that were sent out when i started xolox. I matched about 50 or so ip's to the encoded list, here are a few of them.

99999999:9999 51. 51. 51. 51:9999
88888888:8888 34. 34. 34. 34:8888
33333333:3333 153.153.153.153:3333
22222222:2222 136.136.136.136:2222
N<9K:<>>:6500 68. 6. 58.214:6500
K=;HN>;2:6667 24.212. 27.167:6667
8>2IOIN?:6688 213.236.140. 36:6688
>K3?ION;:6699 209.206.149. 74:6699
9N;<9>I9:6947 195. 52. 22. 61:6947
OI=22O22:6969 136.142.120.236:6969

Turns out that it uses the Hex value of the ip and then just replaces the letters. Basiclly, its a base 16 code using :;89>?<=23KHINOL instead of the 0123456789ABCDEF that hex uses. It also lists the ip number in NBO order, meaning that 1.2.3.4 would be listed as 4.3.2.1 (it just lists it backwards).

so, here is a quick example.
Say my IP is 192.168.169.170 on port 5000

if we convert that to hex, it is
C0 A8 A9 AA

Next we exchange the hex values for the Xolox coded values

:;89>?<=23KHINOL (xolox) (note it is a letter O not a Zero)<br> 0123456789ABCDEF (Hex)
so
C0 A8 A9 AA is
I: KH K3 KK

Then put it in NBO order
KK K3 KH I:
take away the spaces, add :port and you have your coded ip
KKK3KHI::5000

right now, it would be a lot of work to manually encode a list of ip numbers, but i hope to make a program to do it for you. I dont have much programing experience however, but i think i can manage. It probably will just take a list of ip numbers and create a hostslist file out of them.


Greg
gbrayut@excite.com
Reply With Quote