WIFI万能钥匙协议

分析方法:使用wireshark监听客户端请求,知道简单交互流程,然后反编译安卓app拿到AES加密的key,还有加解密算法。然后就可以写程序模拟了。

WIFI万能钥匙协议原理分析:http://my.oschina.net/auo/blog/338168

(转)WiFi万能钥匙Python查询脚本:https://github.com/kongove/toys/blob/master/wifi-master/wifi-master.py

Nice rainy day

Yesterday, one of my colleague XiangQian tried an English online course, the beautiful teacher is from Philippines. I stand behind XiangQian and watched the video. They started from short introduction, then described basic 5 vowels, made simple sentences, then talked about the weather (Sunny, rainy, cloudy, snowy). I like the course, courage to speak and make mistake is important and useful for most of Chinese, and the regular basic training or self studying are necessary, especially for the pronunciation.

We got rain after the course, the hottest days of summer isn’t coming, but we are trapped insider the office without air-condition, even without a direct window to exchange the air. There are many fan equipments in the seat. The good thing is that company provides delicious ice cream for us, some colleagues also make some drinking for us (Green bean soup and SuanMeiTang soup[1]). I was a little bit thin when I was young, so I hate cold winter and adapt to hot summer. I start to live in school from middle school, the heaters are very original and poor efficiency.

But I moved from thin group to fat group in the end of university time, because of stress or too much relax. I still remember the Twice Cooked Port [2], and fruit beer in Xi’an. I met difficult option in that time, to join in CPLA as an officer or drift to Beijing to seek (OpenSource) technology dream. I choose Red Hat, Linux Kernel leading contributor. OpenSouce technology and culture leads me to another extended world and effects me a lot.

Rain after hot days always take us the calm and cool. It’s good to take some exercise out of the door, walk in the rain for relax, write or read something, or just have a good sleep. I always like the last one 😉

[1] https://en.wikipedia.org/wiki/Suanmeitang
[2] https://en.wikipedia.org/wiki/Twice_cooked_pork

 

Play Cassandra in Docker

上次在Mac上玩Docker用的还是boot2docker[1],一个基于http://tinycorelinux.net/的轻量级Linux发行版。今天想部署多个节点的Cassandra集群,可以把已经装好的Fedora虚拟机拷贝两份硬盘空间不足,在怎么清理还是不够,主要是使用这个虚拟机编译了很多东西磁盘占用较多。下载的Fedora24-Beta mini默认迷你安装下来,也才1.5G。

然后想着用Docker更轻便一些,去官网看了一下GetStart文档[3],下载安装了DockerToolbox[4],这里边自带了Docker引擎、组件、主虚拟机、和一个去年收购的图形化管理工具Kitematic(Beta)[5]。看来给开源系统底层软件做管理工具是条不错的路子!

开源系统底层软件技术都比较牛逼,但在商业应用中就需要更方便普通用户的图形管理接口,方便部署、运维。当然对开源软件做系统化、自动化、企业级的测试认证也是非常重要。这是我目前看到两个基于开源软件的商业模式、赢利点。

图形工具和docker命令结合起来一起使用,先要启动引擎、虚拟机,然后创建自己的容器container、部署程序。

具体部署Cassandra步骤参考的是[6]:

Starting "default"...
....
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...

                        ##         .
                  ## ## ##        ==
               ## ## ## ## ##    ===
           /"""""""""""""""""___/ ===
      ~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ /  ===- ~~~
           ______ o           __/
                          __/
              ___________/


docker is configured to use the default machine with IP 192.168.99.100
For help getting started, check out the docs at https://docs.docker.com
# 新建一个容器,拉取并执行docker官方仓库里的Cassandra
Jerusalem:~ amoskong$ docker run --name vm4 -d cassandra
09753a7f8c615229e0cfba97d46a9a557c0f189dab4584482ba915191892e222

# 获取一个容器的shell,然后执行cqlsh连接数据库
Jerusalem:~ amoskong$ docker exec -it vm4 sh

# cqlsh
Connected to Test Cluster at 127.0.0.1:9042.
[cqlsh 5.0.1 | Cassandra 3.5 | CQL spec 3.4.0 | Native protocol v4]
Use HELP for help.
cqlsh> 

重复上面的命令,指定不同的名字,就可以创建多个容器,对应多个Cassandra节点。多个节点连接连接成一个集群cluster就需要配置cassandra seeds,这个可以通过配置文件,docker命令行,或者Kitematic图形管理工具的设置界面。

# 创建容器时候指定 Cassandra seeds ip地址
Jerusalem:~ amoskong$ docker run --name vm4 -d cassandra -e CASSANDRA_SEEDS="$(docker inspect --format='{{ .NetworkSettings.IPAddress }}' vm1)"

Jerusalem:~ amoskong$ docker run --name vm4 -d cassandra -e CASSANDRA_SEEDS="172.17.0.2,172.17.0.3,172.17.0.4"

第三个容器里的cassandra老是启动失败,内存不足,在网上查了一下,最后还是通过设置环境变量 MAX_HEAP_SIZE, HEAP_NEWSIZE。

【1】http://boot2docker.io/
【2】https://mirrors.ustc.edu.cn/fedora/linux/releases/test/24_Beta/Everything/x86_64/iso/Fedora-Everything-netinst-x86_64-24_Beta-1.6.iso
【3】https://docs.docker.com/mac/
【4】https://www.docker.com/products/docker-toolbox
【5】http://www.lupaworld.com/article-251196-1.html
【6】https://hub.docker.com/_/cassandra/