大众点评数据反序列化___Python调用jar包


0x01、 目标需求:

  .a) 大众点评数据解密 解压 反序列化

  .b) 通过java的封装的jar包 使用Python调用即可

0x02、运行效果:

  .a) 截图如下:

    0x001. 效果图

python调用Jar包反序列化点评数据

    0x002. python代码如下

# -*- coding: utf-8 -*-
# coding=utf-8
"""
# ---------------------------------------
# @DateTime : 2021-02-19 16:29:41
# @Author   : ts, QuJianJun
# @FileName :DianPingDecode.py
# @Email    : 8577352@qq.com
# @ProductName :PyCharm
# ---------------------------------------
"""
import base64
from Crypto.Cipher import AES
import requests
import gzip
import base64
from jpype import *


def start():
    headers = {
        "Accept-Encoding": "identity",
        "pragma-uuid": "0cb2799e-0897-4f7c-babc-05caeb866472",
        "pragma-os": "MApi 1.3 (com.dianping.v1 10.29.3 om_sd_sgsztc13 Redmi_Note_8; Android 10)",
        "User-Agent": "MApi 1.3 (com.dianping.v1 10.29.3 om_sd_sgsztc13 Redmi_Note_8; Android 10)",
        "pragma-dpid": "a79ae61b7dc14587acd1e29c7839f78ea161382351370453307",
        "M-SHARK-TRACEID": "11a79ae61b7dc14587acd1e29c7839f78ea161382351370453307b3de5a1613788487152c2ad06",
        "pragma-device": "00000000000000",
        "pragma-unionid": "a79ae61b7dc14587acd1e29c7839f78ea161382351370453307",
        "network-type": "wifi",
        "Connection": "Keep-Alive",
    }
    url = "https://mapi.dianping.com/mapi/searchshop.api?start=0&myLng=0.0&mylat=0.0&categoryid=141&regionid=0&cityid=1&regiontype=0&parentregionid=0&parentcategoryid=0&disablerewrite=0&ganextindex=0&requestuuid=a8880c31-15de-42f5-8add-2895917e02e3&devicelat=0.0&devicelng=0.0&keepcategory=1&tabid=-1&charactercount=20&isresearch=0&istravelsearch=0&noprofile=0"
    res = requests.get(url=url, headers=headers)
    res = base64.b64encode(res.content)
    res = decodeData(res.decode())
    if res is not None:
        print(res)
    else:
        print("返回数据 None")


def decodeData(base64Str):
    startJVM(get_default_jvm_path(), "-ea", "-Djava.class.path=MeiRiApp.jar")
    decodeClass = JClass("com.dianping.decode.DianpingDecode")
    decode = decodeClass()
    res = decode.decryption(base64Str)
    shutdownJVM()
    return res


if __name__ == '__main__':
    start()
    # print(get_default_jvm_path())
    0x003. jar包如下,请付费下载

价格: 88.00 元
VIP会员免费终身会员免费
温馨提示:登录付款后可永久阅读隐藏内容。 付费可读



友情提示:本文只为技术分享交流,请勿非法用途.产生一切法律问题与本人无关,需要jar包的联系我的QQ,在左侧关于里.



在浏览的同时希望给予作者打赏,来支持作者的服务器维护费用.一分也是爱~