随笔分类 -  Python

Python实现RSA长字符串的加解密
摘要:Python实现RSA长字符串的加解密 阅读全文

posted @ 2020-06-18 10:31 areful 阅读(1907) 评论(0) 推荐(1)

Python打印乘法表
摘要:小记python打印乘法表。 阅读全文

posted @ 2020-04-27 09:39 areful 阅读(333) 评论(0) 推荐(0)

Python下socket通信
摘要:Server端代码: Client端代码: 运行结果如图: 阅读全文

posted @ 2019-02-14 23:30 areful 阅读(567) 评论(0) 推荐(0)

Python解析JSON格式
摘要:Python解析具有相似JSON格式的字符串方法如下: 阅读全文

posted @ 2019-02-14 23:03 areful 阅读(1147) 评论(0) 推荐(0)

带TLS认证的Python GRPC调用
摘要:0.生成CA证书及server、client证书,参见https://github.com/grpc/grpc-java/tree/master/examples: 1.编写proto文件及生成对应python源文件,参考https://www.cnblogs.com/areful/p/103726 阅读全文

posted @ 2019-02-14 06:26 areful 阅读(3583) 评论(31) 推荐(0)

Python使用GRPC
摘要:0.安装依赖库 1.编写proto文件 2.编译生成proto对应源文件 3.编写server端代码 4.编写client端代码 5.分别运行server、client代码,运行输出如下: 阅读全文

posted @ 2019-02-14 06:11 areful 阅读(4783) 评论(0) 推荐(0)

Python使用ORM:sqlalchemy
摘要:# -*- coding: utf-8 -*- # Author: areful # needs module 'mysql-connector-python', 'sqlalchemy', running command below to install it: # pip install mysql-connector-python # pip install sqlalchemy # ... 阅读全文

posted @ 2019-02-13 14:15 areful 阅读(179) 评论(0) 推荐(0)

Python访问MySQL数据库
摘要:# -*- coding: utf-8 -*- # Author: areful # # needs module 'mysql-connector-python', running command below to install it: # pip install mysql-connector-python # # # remote connect mysql(on Ubuntu18.04... 阅读全文

posted @ 2019-02-13 14:12 areful 阅读(161) 评论(0) 推荐(0)

Python中使用RSA算法
摘要:# -*- coding: utf-8 -*- # Author: areful import base64 from Crypto import Random from Crypto.Cipher import PKCS1_v1_5 as Cipher_pkcs1_v1_5 from Crypto.PublicKey import RSA class RSACipher(object)... 阅读全文

posted @ 2019-02-13 13:36 areful 阅读(5811) 评论(0) 推荐(0)

Python发送https POST网络请求(忽略认证)
摘要:python通过https发送post请求 阅读全文

posted @ 2019-02-13 09:37 areful 阅读(6454) 评论(0) 推荐(0)

Python中使用AES算法(解决Python2.x和3.x下运行不兼容问题)
摘要:两年前使用python时,碰到2.x下AES加密解密算法代码无法在3.x下顺利运行,花点时间解决了兼容问题,在2.7、3.6、3.7下运行良好。 Linux系统安装依赖库比较简单,Windows下稍嫌繁琐,装完必须的库也可以正常运行。 代码整理如下: 阅读全文

posted @ 2019-01-26 22:48 areful 阅读(965) 评论(0) 推荐(0)

导航