今日破解某app加密app当中用到了谷歌序列化传输

1.请求序列化文件

# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: xbeiapp.proto
# 用于x呗请求参数的序列化 import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
from google.protobuf import descriptor_pb2
# @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() DESCRIPTOR = _descriptor.FileDescriptor(
name='xbeiapp.proto',
package='',
syntax='proto3',
serialized_pb=_b('\n\x0exbei.proto\"\xd0\x01\n\x0cTerminalInfo\x12\x14\n\x0cterminalType\x18\x01 \x01(\t\x12\x12\n\nappVersion\x18\x02 \x01(\t\x12\x15\n\rsystemVersion\x18\x03 \x01(\t\x12\x11\n\tdeviceKey\x18\x04 \x01(\t\x12\x0c\n\x04lang\x18\x05 \x01(\t\x12\x12\n\nappChannel\x18\x07 \x01(\t\x12\x13\n\x0bproductType\x18\x08 \x01(\t\x12\x13\n\x0bproductName\x18\t \x01(\t\x12\x0f\n\x07\x61ppType\x18\n \x01(\t\x12\x0f\n\x07\x61ppName\x18\x0b \x01(\t\"\xe6\x02\n\x0f\x45nvironmentInfo\x12\x16\n\x0e\x64\x65viceUniqueId\x18\x04 \x01(\t\x12\x10\n\x08\x62lackBox\x18\x05 \x01(\t\x12\x12\n\nintranelIP\x18\x07 \x01(\t\x12\x11\n\tlongiTude\x18\t \x01(\t\x12\x10\n\x08latiTude\x18\n \x01(\t\x12\x0b\n\x03mac\x18\x0b \x01(\t\x12\x0c\n\x04imei\x18\x0c \x01(\t\x12\x15\n\rphoneOperator\x18\r \x01(\t\x12\x13\n\x0bphoneMarker\x18\x0e \x01(\t\x12\x12\n\nphoneModel\x18\x0f \x01(\t\x12\x14\n\x0coperationSys\x18\x11 \x01(\t\x12\x1b\n\x13operationSysVersion\x18\x12 \x01(\t\x12\x12\n\nisEmulator\x18\x18 \x01(\t\x12/\n\nresolution\x18\x13 \x03(\x0b\x32\x1b.EnvironmentInfo.Resolution\x1a\x1d\n\nResolution\x12\x0f\n\x07smartid\x18\x06 \x01(\t\"\x81\x01\n\x08xbei\x12\x13\n\x0bphoneNumber\x18\x03 \x01(\t\x12#\n\x0cterminalInfo\x18\x02 \x03(\x0b\x32\r.TerminalInfo\x12\x10\n\x08\x63odeType\x18\x04 \x01(\t\x12)\n\x0f\x65nvironmentInfo\x18\x05 \x03(\x0b\x32\x10.EnvironmentInfob\x06proto3')
) _TERMINALINFO = _descriptor.Descriptor(
name='TerminalInfo',
full_name='TerminalInfo',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='terminalType', full_name='TerminalInfo.terminalType', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='appVersion', full_name='TerminalInfo.appVersion', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='systemVersion', full_name='TerminalInfo.systemVersion', index=2,
number=3, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='deviceKey', full_name='TerminalInfo.deviceKey', index=3,
number=4, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='lang', full_name='TerminalInfo.lang', index=4,
number=5, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='appChannel', full_name='TerminalInfo.appChannel', index=5,
number=7, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='productType', full_name='TerminalInfo.productType', index=6,
number=8, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='productName', full_name='TerminalInfo.productName', index=7,
number=9, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='appType', full_name='TerminalInfo.appType', index=8,
number=10, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='appName', full_name='TerminalInfo.appName', index=9,
number=11, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=19,
serialized_end=227,
) _ENVIRONMENTINFO_RESOLUTION = _descriptor.Descriptor(
name='Resolution',
full_name='EnvironmentInfo.Resolution',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='smartid', full_name='EnvironmentInfo.Resolution.smartid', index=0,
number=6, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=559,
serialized_end=588,
) _ENVIRONMENTINFO = _descriptor.Descriptor(
name='EnvironmentInfo',
full_name='EnvironmentInfo',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='deviceUniqueId', full_name='EnvironmentInfo.deviceUniqueId', index=0,
number=4, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='blackBox', full_name='EnvironmentInfo.blackBox', index=1,
number=5, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='intranelIP', full_name='EnvironmentInfo.intranelIP', index=2,
number=7, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='longiTude', full_name='EnvironmentInfo.longiTude', index=3,
number=9, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='latiTude', full_name='EnvironmentInfo.latiTude', index=4,
number=10, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='mac', full_name='EnvironmentInfo.mac', index=5,
number=11, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='imei', full_name='EnvironmentInfo.imei', index=6,
number=12, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='phoneOperator', full_name='EnvironmentInfo.phoneOperator', index=7,
number=13, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='phoneMarker', full_name='EnvironmentInfo.phoneMarker', index=8,
number=14, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='phoneModel', full_name='EnvironmentInfo.phoneModel', index=9,
number=15, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='operationSys', full_name='EnvironmentInfo.operationSys', index=10,
number=17, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='operationSysVersion', full_name='EnvironmentInfo.operationSysVersion', index=11,
number=18, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='isEmulator', full_name='EnvironmentInfo.isEmulator', index=12,
number=24, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='resolution', full_name='EnvironmentInfo.resolution', index=13,
number=19, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[_ENVIRONMENTINFO_RESOLUTION, ],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=230,
serialized_end=588,
) _xbei = _descriptor.Descriptor(
name='xbei',
full_name='xbei',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='phoneNumber', full_name='xbei.phoneNumber', index=0,
number=3, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='terminalInfo', full_name='xbei.terminalInfo', index=1,
number=2, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='codeType', full_name='xbei.codeType', index=2,
number=4, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='environmentInfo', full_name='xbei.environmentInfo', index=3,
number=5, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=591,
serialized_end=720,
) _ENVIRONMENTINFO_RESOLUTION.containing_type = _ENVIRONMENTINFO
_ENVIRONMENTINFO.fields_by_name['resolution'].message_type = _ENVIRONMENTINFO_RESOLUTION
_xbei.fields_by_name['terminalInfo'].message_type = _TERMINALINFO
_xbei.fields_by_name['environmentInfo'].message_type = _ENVIRONMENTINFO
DESCRIPTOR.message_types_by_name['TerminalInfo'] = _TERMINALINFO
DESCRIPTOR.message_types_by_name['EnvironmentInfo'] = _ENVIRONMENTINFO
DESCRIPTOR.message_types_by_name['xbei'] = _xbei
_sym_db.RegisterFileDescriptor(DESCRIPTOR) TerminalInfo = _reflection.GeneratedProtocolMessageType('TerminalInfo', (_message.Message,), dict(
DESCRIPTOR = _TERMINALINFO,
__module__ = 'xbei_pb2'
# @@protoc_insertion_point(class_scope:TerminalInfo)
))
_sym_db.RegisterMessage(TerminalInfo) EnvironmentInfo = _reflection.GeneratedProtocolMessageType('EnvironmentInfo', (_message.Message,), dict( Resolution = _reflection.GeneratedProtocolMessageType('Resolution', (_message.Message,), dict(
DESCRIPTOR = _ENVIRONMENTINFO_RESOLUTION,
__module__ = 'xbei_pb2'
# @@protoc_insertion_point(class_scope:EnvironmentInfo.Resolution)
))
,
DESCRIPTOR = _ENVIRONMENTINFO,
__module__ = 'xbei_pb2'
# @@protoc_insertion_point(class_scope:EnvironmentInfo)
))
_sym_db.RegisterMessage(EnvironmentInfo)
_sym_db.RegisterMessage(EnvironmentInfo.Resolution) xbei = _reflection.GeneratedProtocolMessageType('xbei', (_message.Message,), dict(
DESCRIPTOR = _xbei,
__module__ = 'xbei_pb2'
# @@protoc_insertion_point(class_scope:xbei)
))
_sym_db.RegisterMessage(xbei) # @@protoc_insertion_point(module_scope)

2.返回参数反序列化

# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: xbei.proto import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
from google.protobuf import descriptor_pb2
# @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() DESCRIPTOR = _descriptor.FileDescriptor(
name='xbei.proto',
package='',
syntax='proto3',
serialized_pb=_b('\n\x0cxbei.proto\">\n\nStatusInfo\x12\x0c\n\x04\x63ode\x18\x01 \x01(\t\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\x11\n\ttimestamp\x18\x03 \x01(\x03\")\n\x06xbei\x12\x1f\n\nstatusInfo\x18\x01 \x03(\x0b\x32\x0b.StatusInfob\x06proto3')
) _STATUSINFO = _descriptor.Descriptor(
name='StatusInfo',
full_name='StatusInfo',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='code', full_name='StatusInfo.code', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='message', full_name='StatusInfo.message', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='timestamp', full_name='StatusInfo.timestamp', index=2,
number=3, type=3, cpp_type=2, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=16,
serialized_end=78,
) _xbei = _descriptor.Descriptor(
name='xbei',
full_name='xbei',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='statusInfo', full_name='xbei.statusInfo', index=0,
number=1, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=80,
serialized_end=121,
) _xbei.fields_by_name['statusInfo'].message_type = _STATUSINFO
DESCRIPTOR.message_types_by_name['StatusInfo'] = _STATUSINFO
DESCRIPTOR.message_types_by_name['xbei'] = _xbei
_sym_db.RegisterFileDescriptor(DESCRIPTOR) StatusInfo = _reflection.GeneratedProtocolMessageType('StatusInfo', (_message.Message,), dict(
DESCRIPTOR = _STATUSINFO,
__module__ = 'xbei_pb2'
# @@protoc_insertion_point(class_scope:StatusInfo)
))
_sym_db.RegisterMessage(StatusInfo) xbei = _reflection.GeneratedProtocolMessageType('xbei', (_message.Message,), dict(
DESCRIPTOR = _xbei,
__module__ = 'xbei_pb2'
# @@protoc_insertion_point(class_scope:xbei)
))
_sym_db.RegisterMessage(xbei) # @@protoc_insertion_point(module_scope)

3.序列化部分py代码

    def util(self, ip):
data_pb = shengbei_pb2.xbei()
terminalInfo = data_pb.terminalInfo.add()
environmentInfo = data_pb.environmentInfo.add() resolution = environmentInfo.resolution.add() terminalInfo.terminalType = "app"
terminalInfo.appVersion = "7.14.0"
terminalInfo.systemVersion = self.device_info['version']
terminalInfo.deviceKey = self.device_info['imei']
terminalInfo.lang = "CN"
terminalInfo.appChannel = "xxxx"
terminalInfo.productType = "loan"
terminalInfo.productName = "bbd_android"
terminalInfo.appType = "android"
terminalInfo.appName = "xxxxx" environmentInfo.deviceUniqueId = self.device_info['uniqueId']
environmentInfo.blackBox = self.device_info['black_box']
environmentInfo.intranelIP = ip
environmentInfo.longiTude = self.log1
environmentInfo.latiTude = self.lat1
environmentInfo.mac = self.device_info['mac']
environmentInfo.imei = self.device_info['imei']
environmentInfo.phoneOperator = "未知"
environmentInfo.phoneMarker = "LGE"
environmentInfo.phoneModel = self.device_info['mobile']
environmentInfo.operationSys = "android"
environmentInfo.operationSysVersion = self.device_info['version']
resolution.smartid = self.device_info['smartid']
environmentInfo.isEmulator = "false"
data_pb.phoneNumber = self.phone
data_pb.codeType = "02"
return data_pb.SerializeToString()

4.反序列化部分py代码

data_pb = shengb_pb2.xbei()
data_pb.ParseFromString(content)

python谷歌序列化传输的更多相关文章

  1. python json序列化与反序列化操作

    python json序列化与反序列化操作 # dumps() dict-->str 序列化 # loads() str---dict 反序列化 result1 = json.dumps({'a ...

  2. Python:序列化 pickle JSON

    序列化 在程序运行的过程中,所有的变量都储存在内存中,例如定义一个dict d=dict(name='Bob',age=20,score=88) 可以随时修改变量,比如把name修改为'Bill',但 ...

  3. c# (ENUM)枚举组合类型的谷歌序列化Protobuf

    c# (ENUM)枚举组合类型的谷歌序列化Protobuf,必须在序列化/反序列化时加上下面: RuntimeTypeModel.Default[typeof(Alarm)].EnumPassthru ...

  4. python pickle 序列化类

    python pickle 序列化类 # coding:utf-8 try: import cPickle as pickle except ImportError: import pickle cl ...

  5. python的序列化和反序列化以及json

    python 的序列化和反序列化用于内存之间的共享,包括服务器和客户端的共享,两个Python程序之间的共享,以及以字符串的形式存储到硬盘中. pyhton 的pickle 可以对Python的各种数 ...

  6. python之序列化模块、双下方法(dict call new del len eq hash)和单例模式

    摘要:__new__ __del__ __call__ __len__ __eq__ __hash__ import json 序列化模块 import pickle 序列化模块 补充: 现在我们都应 ...

  7. python 模块 - 序列化 json 和 pickle

    1,引入 之前我们学习过用eval内置方法可以将一个字符串转成python对象,不过,eval方法是有局限性的,对于普通的数据类型,json.loads和eval都能用,但遇到特殊类型的时候,eval ...

  8. python 数据序列化(json、pickle、shelve)

    本来要查一下json系列化自定义对象的一个问题,然后发现这篇博客(https://www.cnblogs.com/yyds/p/6563608.html)很全面,感谢作者,关于python序列化的知识 ...

  9. 【python】序列化和反序列化

    序列化可以理解为:把python的对象编码转换为json格式的字符串,反序列化可以理解为:把json格式字符串解码为python数据对象.在python的标准库中,专门提供了json库与pickle库 ...

随机推荐

  1. day3(使用axios实现登录成功)

    1.创建一个login.vue页面 1.1写页面components/Login.vue 在 src/components 下创建 Login.vue 页面 <template>   &l ...

  2. PyQt(Python+Qt)学习随笔:QTableWidgetItem项的复选状态checkState访问方法

    老猿Python博文目录 专栏:使用PyQt开发图形界面Python应用 老猿Python博客地址 QTableWidget表格部件中的QTableWidgetItem项可以单独设置复选状态,如图所有 ...

  3. PyQt(Python+Qt)学习随笔:QTreeWidgetItem项下的子项列表中增加子项的方法

    老猿Python博文目录 专栏:使用PyQt开发图形界面Python应用 老猿Python博客地址 追加子项 QTreeWidgetItem类型的项构建以后,可以通过addChild(QTreeWid ...

  4. 第十六章、Model/View开发:QColumnView的作用及对应Model

    老猿Python博文目录 专栏:使用PyQt开发图形界面Python应用 老猿Python博客地址 一.概述 在Qt Designer的Item Views(Model-based)部件中,Colum ...

  5. Making Games with Python & Pygame 中文翻译

    Making Games with Python & Pygame 用Pygame做游戏 第1章-安装python和pygame 原文作者:Al Sweigart 翻译:bigbigli/李超 ...

  6. FHQ简要笔记

    前言 原文写于 XJ 集训day2 2020.1.19. 现在想想那时候连模板都还没写,只是刚刚理解就在那里瞎yy--之前果然还是太幼稚了. 今天刷训练指南发现全是 Treap 和 Splay ,不想 ...

  7. 【题解】「UVA681」Convex Hull Finding

    更改了一下程序的错误. Translation 找出凸包,然后逆时针输出每个点,测试数据中没有相邻的边是共线的.多测. Solution 首先推销一下作者的笔记 由此进入>>> ( ...

  8. webpack与vue使用

    项目基本结构目录: index.html <!DOCTYPE html> <html lang="en"> <head> <meta ch ...

  9. 跨站点脚本编制 - SpringBoot配置XSS过滤器(基于mica-xss)

    1. 简介   XSS,即跨站脚本编制,英文为Cross Site Scripting.为了和CSS区分,命名为XSS.   XSS是最普遍的Web应用安全漏洞.这类漏洞能够使得攻击者嵌入恶意脚本代码 ...

  10. 云图说 | 云上资源管控有神器!关于IAM,你想知道的都在这里!

    摘要:统一身份认证(Identity and Access Management,简称IAM)是华为云上帮助您安全控制华为云资源访问权限的基础服务.通过本期云图说,您可以初步了解IAM的基本功能. 从 ...