- 1.python处理Treemap排序问题
data_dict = {
"_appid": "atc.android",
"appversion": "3.4.0",
"channelid": "csy",
"pwd": 'dasdasdas',
"udid": "sadasd",
"username": "xwl"
}
result = "".join(["{}={}&".format(key, data_dict[key]) for key in sorted(data_dict.keys())])
print(result)
- 2.参数提取
data_string = "app_name=achievo_ad&app_version=7.83.3&device_token=d94f99c7-6640-3321-8c1b-80f94d04c6cb&status=1&warehouse=null&manufacturer=Google&device=Pixel%203&os_version=31&channel=oziq7dxw%3A%3A%3A&vipruid=®Plat=0®id=null&rom=Dalvik%2F2.1.0%20%28Linux%3B%20U%3B%20Android%2012%3B%20Pixel%203%20Build%2FSP1A.210812.015%29&skey=6692c461c3810ab150c9a980d0c275ec"
import json
data_dict = {item.split("=")[0]:item.split("=")[1] for item in data_string.split("&")}
data_string = json.dumps(data_dict,indent=4)
print(data_string)
- 3.转义
import json
dinfo = "%7B%22ah1%22%3A%22%22%2C%22ah2%22%3A%22%22%2C%22ah3%22%3A%22%22%2C%22ah4%22%3A%22wifi%22%2C%22ah5%22%3A%221080_2236%22%2C%22ah6%22%3A1785600%2C%22ah7%22%3A8%2C%22ah8%22%3A5732413440%2C%22ah9%22%3A%22Pixel+4%22%2C%22ah10%22%3A%22%22%2C%22ah11%22%3A%22%22%2C%22ah12%22%3A%22%22%2C%22ah13%22%3A%22%22%2C%22as1%22%3A%2210%22%2C%22as2%22%3A%22%22%2C%22as3%22%3A%22%22%2C%22as4%22%3A%22b9ab99eb4438fddd%22%2C%22as5%22%3A%22%22%2C%22as6%22%3A%22%22%2C%22as7%22%3A%2229%22%2C%22ac1%22%3A%22ac791f31-66b8-301e-837d-539d4c0c39c8%22%7D"
from urllib.parse import quote_plus, unquote_plus
result = unquote_plus(dinfo)
print(result)
data_dict = json.loads(result)
print(json.dumps(data_dict, indent=2))
标签:逆向,22,APP,3A%,dict,result,2C%,data,22%
From: https://www.cnblogs.com/xwltest/p/18628629