摘要: 准备工作 sliver客户端和服务端之间命令的通信采用的grpc, 服务端和和植入程序通信使用的protobuf,所以在开发之前需要了解 grpc和protobuf, 相关文档: https://jergoo.gitbooks.io/go-grpc-practice-guide/content/ch 阅读全文
posted @ 2024-08-07 11:45 干炸小黄鱼 阅读(63) 评论(0) 推荐(0) 编辑
摘要: 定义一个统一的schema类对提交的业务参数进行格式和数据约束非常有必要, 下面使用 pydantic 来封装此工具; import logging from pydantic import BaseModel, ValidationError, root_validator class Pydan 阅读全文
posted @ 2024-07-31 16:17 干炸小黄鱼 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 一、基础环境说明 节点名 节点ip 角色 操作系统 node1 10.42.8.13 control-plane,etcd,master CentOS7.9 node2 10.42.8.14 control-plane,etcd,master CentOS7.9 node3 10.42.8.15 c 阅读全文
posted @ 2024-07-29 11:31 干炸小黄鱼 阅读(1750) 评论(0) 推荐(0) 编辑
摘要: 基础数据 LONGITUDE_LATITUDE = { "110000": {"name": "北京市", "latitude": 39.904989, "longitude": 116.405285}, "110101": {"name": "东城区", "latitude": 39.917544 阅读全文
posted @ 2024-07-26 16:46 干炸小黄鱼 阅读(58) 评论(0) 推荐(0) 编辑
摘要: flask 迁移数据库时可能会遇到找不到版本的问题 export FLASK_APP=run.py flask db migrate 执行上述命令时正常会提示加了哪些字段,删除了哪些字段 但是有时候会提示: ERROR [flask_migrate] Error: Can't locate revi 阅读全文
posted @ 2024-07-25 14:23 干炸小黄鱼 阅读(223) 评论(0) 推荐(0) 编辑
摘要: 参考文档:https://rook.github.io/docs/rook/v1.12/Getting-Started/quickstart/#prerequisites 1、下载部署文件 git clone --single-branch --branch v1.12.4 https://gith 阅读全文
posted @ 2024-07-19 11:43 干炸小黄鱼 阅读(12) 评论(0) 推荐(0) 编辑
摘要: 背景: 有个一个组织机构. 并没有设计父级id, 只有id, title, nature 三个字段, nature=1/2/3/4 分别表示级几级单位; 现在要模糊查询本级, 上级, 上上级, 上上上级的title中包含 特定字符的记录;使用sqlalchemy递归查询,下面代码没调试,不保证运行, 阅读全文
posted @ 2024-07-15 10:05 干炸小黄鱼 阅读(49) 评论(0) 推荐(0) 编辑
摘要: 工具类cvs util.py #!/usr/bin/env python # -*- coding: utf-8 -*- import csv import codecs import io class UTF8Recoder: """ Iterator that reads an encoded 阅读全文
posted @ 2024-07-11 09:16 干炸小黄鱼 阅读(25) 评论(0) 推荐(0) 编辑
摘要: 需求; 统计不同组织下的成绩风险等级类型个数; attacker_group = ( db.session.query(ReportResult, Report, Organization) .join(Report, Report.id == ReportResult.report_id) .jo 阅读全文
posted @ 2024-06-28 15:49 干炸小黄鱼 阅读(95) 评论(0) 推荐(0) 编辑
摘要: 常用匹配规则 . 除换行符以外的所有字符。 ^ 字符串开头。 $ 字符串结尾。 \d,\w,\s 匹配数字、字符、空格。 \D,\W,\S 匹配非数字、非字符、非空格。 [abc] 匹配 a、b 或 c 中的一个字母。 [a-z] 匹配 a 到 z 中的一个字母。 [^abc] 匹配除了 a、b 或 阅读全文
posted @ 2024-06-03 10:24 干炸小黄鱼 阅读(11) 评论(0) 推荐(0) 编辑
点击右上角即可分享
微信分享提示