关闭

script

153人阅读 评论(0) 收藏 举报
// ==UserScript==
// @name        China Unicom
// @title        China Unicom
// @description    Get phone record
// @parameter   *username text text
// @parameter   *password password Password
// ==/UserScript==

function getPhoneRecord(){
    var url = "http://iservice.10010.com/e3/static/check/checklogin?_=1436163736535";
    var param={};
    var response = $.post(url, param);
    if (response.statusCode / 100 == 2) {
        $.print("Check login successfully, url:" + url);
        var body = response.body;
        $.print(body);
    } else {
        $.("Check login failed,err:" + response.statusCode);
    }
    
    url = "http://iservice.10010.com/e3/static/common/info?_=1436163738535";
    response = $.post(url, param);
    if (response.statusCode / 100 == 2) {
        $.print("Get common info successfully, url:" + url);
        var body = response.body;
        $.print(body);
    } else {
        $.("Get common info failed,err:" + response.statusCode);
        return;
    }
    
    url = "http://iservice.10010.com/e3/static/query/callDetail?_=1436163740535&menuid=000100030001";
    param.pageNo = "1";
    param.pageSize = "100";
    param.beginDate = "2015-07-01";
    param.endDate = "2015-07-06";
    response = $.post(url, param);
    if (response.statusCode / 100 == 2) {
        $.print("Get call detail successfully, url:" + url);
        var body = response.body;
        $.print(body);
    } else {
        $.("Get call detail failed,err:" + response.statusCode);
        return;
    }
    
}

function login(){
    $.print("username="+$.username+",password="+$.password);
    $.followRedirects(false);

    //send the login query
    var url = "https://uac.10010.com/portal/Service/MallLogin?callback=jQuery172018417995200171355_1436163736433" +
            "&redirectURL=http://www.10010.com&_=1436163736435&password=222222&productType=01&pwdType=01&redirectType=01&rememberMe=1&userName=1111111111";
    var response = $.get(url);
    var statusCode = response.statusCode;
    var location;
    var result = false;
    $.print(response.body);
    if(statusCode == 200){
        result = true;
        return result;
    }
    if(!result){
        $.print("Login failed!");
    }
    return result;
}

if(login()){
    getPhoneRecord();
}

0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:908次
    • 积分:47
    • 等级:
    • 排名:千里之外
    • 原创:4篇
    • 转载:0篇
    • 译文:0篇
    • 评论:0条
    文章分类