Skip to content

Latest commit

 

History

History
174 lines (133 loc) · 2.81 KB

逆向分析.md

File metadata and controls

174 lines (133 loc) · 2.81 KB

新版备案查询验证码分析

获取Token

URL: https://hlwicpfwc.miit.gov.cn/icpproject_query/api/auth

Payload:

{
    "authKey": hashlib.md5(("testtest" + t).encode()).hexdigest(),
    "timeStamp": str(round(time.time()))
}

Response:

{
    "code":200,
    "msg":"操作成功",
    "params":{
        "bussiness":"Token",
        "expire":300000,
        "refresh":"RefreshToken"
    },
    "success":true
}

注意: 以下所有请求均需携带Token请求头

获取验证码图片

URL: https://hlwicpfwc.miit.gov.cn/icpproject_query/api/image/getCheckImagePoint

Payload:

{
    clientUid: "point-"+"随机UUID"
}

Response:

{
    "code": 200,
    "msg": "操作成功",
    "params": {
        "bigImage": "base64图片",
        "secretKey": "随机AES密钥",
        "smallImage": "base64图片",
        "uuid": "随机字符串",
        "wordCount": 4
    },
    "success": true
}

校验结果

URL: https://hlwicpfwc.miit.gov.cn/icpproject_query/api/image/checkImage

Payload:

{
    "token":"uuid",
    "secretKey":"secretKey",
    "clientUid":"clientUid",
    "pointJson":""
}

pointJson算法:

  • 加密方法 AES-128-ECB

  • 填充方法 pkcs7

  • 密钥 secretKey

  • 内容 '[{"x":135,"y":43},{"x":43,"y":119},{"x":402,"y":61},{"x":179,"y":78}]'

    其中x,y分别对应每个字的坐标,有顺序要求

  • 输出 Base64

Response:

{
    "code": 200,
    "msg": "操作成功",
    "params": {
        "sign": "签名",
        "smallImage": "验证成功的base64图片"
    },
    "success": true
}

查询备案

URL: https://hlwicpfwc.miit.gov.cn/icpproject_query/api/icpAbbreviateInfo/queryByCondition

Payload

{
    "pageNum":"",
    "pageSize":"",
    "unitName":"域名",
    "serviceType":1
}

Response

{
    "code": 200,
    "msg": "操作成功",
    "params": {
        "endRow": 0,
        "firstPage": 1,
        "hasNextPage": false,
        "hasPreviousPage": false,
        "isFirstPage": true,
        "isLastPage": true,
        "lastPage": 1,
        "list": [
            {
                "contentTypeName": "",
                "domain": "",
                "domainId": "",
                "leaderName": "",
                "limitAccess": "",
                "mainId": "",
                "mainLicence": "",
                "natureName": "",
                "serviceId": "",
                "serviceLicence": "",
                "unitName": "",
                "updateRecordTime": ""
            }
        ],
        "navigatePages": 8,
        "navigatepageNums": [
            1
        ],
        "nextPage": 1,
        "pageNum": 1,
        "pageSize": 10,
        "pages": 1,
        "prePage": 1,
        "size": 1,
        "startRow": 0,
        "total": 1
    },
    "success": true
}