Source

chaos /

Filename Size Date modified Message
3.5 KB
OpenKavass 开源工程底料仓库

TODO::
    +-- 研究 bitbuclet.org 服务
        +-- 测试 hooks 配置,完成内外仓库的联动

Changelog::
    - 110105 ZoomQuiet:init.
        +-- 测试通过 Open.Kavass 邮箱自动转发 diff 通告
        +-- 测试通过验证的 gmail 转发过滤来通告仓库变更
        +-- 测试 bottle 的远程HOOKs+++++Karrigell+8008 端口+subprocess++
    - 110106 ZoomQuiet: 联动
        +-- Karrigell+shell
        +-- Nginx+fcgi+php exec++usage https
        +-- 使用php 来探测post 变量
        http://py.kingsoft.net:8009/hook.php
        <<< 06:53:27
payload => {
    \"repository\": {
        \"owner\": \"OpenKavass\", 
        \"website\": \"\", 
        \"absolute_url\": \"/OpenKavass/chaos/\", 
        \"slug\": \"chaos\", 
        \"name\": \"chaos\"
        },
    \"commits\": [
        {
        \"node\": \"bd0d5ecfc579\", 
        \"files\": [
            {\"type\": \"modified\", 
            \"file\": \"README.txt\"
            }
            ], 
         \"branch\": \"default\", 
         \"author\": \"ZoomQuiet\", 
         \"timestamp\": \"2011-01-06 07:53:17\", 
         \"raw_node\": \"bd0d5ecfc579a93f38d91d2e467432ef4cd2d957\", 
         \"parents\": [\"131c204c6c24\"], 
         \"raw_author\": \"ZoomQuiet <zoom.quiet@gmail.com>\", 
         \"message\": \"\\u7528php \\u6765\\u63a2\\u6d4bpost \\u53d8\\u91cf\", 
         \"size\": 43, 
         \"revision\": 20
         }
         ], 
    \"user\": \"ZoomQuiet\"
    }
        +-- 重新用 Karrigell 来理解!?++
        http://py.kingsoft.net:8008/post/hook
        +-- 使用web.py 的web.data() 来接收 post
        
        http://py.kingsoft.net:8080/hello
         >>>web.py
payload=%7B%22repository%22%3A+%7B%22owner%22%3A+%22OpenKavass%22%2C+%22website%22%3A+%22%22%2C+%22absolute_url%22%3A+%22%2FOpenKavass%2Fchaos%2F%22%2C+%22slug%22%3A+%22chaos%22%2C+%22name%22%3A+%22chaos%22%7D%2C+%22commits%22%3A+%5B%7B%22node%22%3A+%2245515b2b4714%22%2C+%22files%22%3A+%5B%7B%22type%22%3A+%22modified%22%2C+%22file%22%3A+%22README.txt%22%7D%5D%2C+%22branch%22%3A+%22default%22%2C+%22author%22%3A+%22ZoomQuiet%22%2C+%22timestamp%22%3A+%222011-01-06+08%3A48%3A50%22%2C+%22raw_node%22%3A+%2245515b2b4714d8da187fe89e183313e714837100%22%2C+%22parents%22%3A+%5B%221010df812e90%22%5D%2C+%22raw_author%22%3A+%22ZoomQuiet+%3Czoom.quiet%40gmail.com%3E%22%2C+%22message%22%3A+%22%5Cu7528web.py+%5Cu6765%5Cu63a2%5Cu6d4bpost%22%2C+%22size%22%3A+96%2C+%22revision%22%3A+25%7D%5D%2C+%22user%22%3A+%22ZoomQuiet%22%7D

        使用 json.loads() + urllib.unquote(data[8:].replace("+"," ")) 
        总算解析出!
        
pj=json.loads(p[10:])

Out[26]: 
{u'commits': [{u'author': u'ZoomQuiet',
               u'branch': u'default',
               u'files': [{u'file': u'README.txt', u'type': u'modified'}],
               u'message': u'\\u7528php \\u6765\\u63a2\\u6d4bpost \\u53d8\\u91cf',
               u'node': u'bd0d5ecfc579',
               u'parents': [u'131c204c6c24'],
               u'raw_author': u'ZoomQuiet <zoom.quiet@gmail.com>',
               u'raw_node': u'bd0d5ecfc579a93f38d91d2e467432ef4cd2d957',
               u'revision': 20,
               u'size': 43,
               u'timestamp': u'2011-01-06 07:53:17'}],
 u'repository': {u'absolute_url': u'/OpenKavass/chaos/',
                 u'name': u'chaos',
                 u'owner': u'OpenKavass',
                 u'slug': u'chaos',
                 u'website': u''},
 u'user': u'ZoomQuiet'}

    - 110120 使用口令...+ fixed passwd