标签:style blog http color os io
Are you a hacker?
How to build another QQ/Wechat/whatsapp/skype/imessage?
Let‘s go through this!!!!
Materials:
A linux/unix/windows/mac computer/server, and do some basic things!
Are you feeling high?
Okay, let‘s ride the rocket!
duckduckgo.com to search ‘openfire‘
‘OpenFire‘ from here http://www.igniterealtime.org/downloads/index.jsp
and the client software spark: ‘Spark‘ ( here for example: download the http://www.igniterealtime.org/downloads/download-landing.jsp?file=openfire/openfire_3.9.3_all.deb , because i deployed it on a debian/ubuntu machine )
# for some situations, some other packages such as openjdk-6-jre should be installed or other packages sudo apt-get install apache2 openjdk-6-jre mysql-server mysql-client -y # then sudo dpkg -i /path/to/openfire_3.9.3_all.deb
mysql -uroot -p # then create a database in the mysql console mysql> create database openfire;
Go to the web page:
xx.xx.xx.xx:9090
then you will see some references guiding you to install. ( choose the outer base database , not the default database. Here MySQL preferred)
next and next => then finish.
Go to the web page:
xx.xx.xx.xx:9090
click on the green ‘cross‘ button on the right.
toggle the "Archive one-to-one chats" and/or "Archive group chats"
(P.S. you will need to add some one before the conversation one-to-one, of course)
In this case, create a user here:
Then open the client software!!!
# start the client ‘Spark‘ sudo sh /path/to/Spark/resources/startup.sh &
Then you will see the user interface as this:
Login!!!
Do the same thing for another account . e.g. another account: ‘admin‘
Send messages between different clients
From the page: Server -> Archiving -> Search archive , we can see their talking record. WOW! What a conversation :P
We are not satisfied with that just reading some thing from web page.
Here feel what we got!
mysql -uroot -p # input your password mysql> use openfire; mysql> select * from ofUser; "something dumped out" mysql> select * from ofMessageArchive; "other dumped out"
Notice : the table ‘ofMessageArchive‘ is created because of the enabling of the plugin ‘monitor archiving‘
Let‘s see what we got!!
for user:
for the conversation record (archived)
Yeah! we see that!
"Next big" :
client A -> middleware -> client B
client B -> middleware -> client A
domestic server -> middleware -> client A
domestic server -> middleware -> client A, client B, client C, ...
client A -> middleware -> domestic server
Happy hacking!
标签:style blog http color os io
原文地址:http://www.cnblogs.com/spaceship9/p/3863758.html