 
 # TODO: logger 分级控制
 log   = console.log
+
+
+exports.cookies = ->
+    all_cookies
+
 
 # 是否需要 验证码
 # @param qq

    body = ''
    
    https.get url , (resp) ->
        # log resp.headers
        all_cookies = all_cookies.concat resp.headers['set-cookie']
        resp.setEncoding 'binary'



# "http://d.web2.qq.com/channel/login2"
#  callback( ret , client_id )
exports.login_token = (callback) ->
    client_id = parseInt(Math.random() * 100000000)
    ptwebqq   = all_cookies.filter( (item)->item.match /ptwebqq/ )
                           .pop()
