上一页 1 2 3 4 5 6 7 ··· 16 下一页
摘要: 前言 secureCRT 是一款比较简介轻量的远程工具,支持ssh、串口登录等操作。下面的内容是根据本人操作习惯做的一些配置,留作后续再次安装时参考。 配置 1. 修改鼠标功能 设置 -> 全设置 -> 外观 -> 鼠标功能 去掉勾选 粘贴(P)用鼠标的xx键,默认是鼠标右键,但是查询系统日志时,如 阅读全文
posted @ 2025-02-13 10:44 BrianSun 阅读(142) 评论(0) 推荐(0)
摘要: analysis_nginx.sh #!/bin/bash # 定义日志文件的路径 ACCESS_LOG="/var/log/nginx/access.log" ERROR_LOG="/var/log/nginx/error.log" # 定义阈值 THRESHOLD=100 # 同一 IP 地址发 阅读全文
posted @ 2025-02-11 12:18 BrianSun 阅读(128) 评论(0) 推荐(0)
摘要: http 文件服务器 start_http_server.sh #!/bin/bash port=$1 host=0.0.0.0 function Usage() { echo -e "Usage:${0} [port]" exit 0 } if [[ ${port} == "" ]];then U 阅读全文
posted @ 2024-11-12 17:53 BrianSun 阅读(39) 评论(0) 推荐(0)
摘要: 内容来源于chatgpt def format_size(bytes): """ 将字节大小转换为适当的单位(KB, MB, GB等),支持负数。 :param bytes: 原始字节大小,可以为负数 :return: 字符串,格式化后的大小和单位 """ # 定义单位和阈值 units = ["B 阅读全文
posted @ 2024-11-12 14:25 BrianSun 阅读(56) 评论(0) 推荐(0)
摘要: tcp_client.py # -*- coding:utf-8 -*- # tcp 客户端,使用单例模式实现 # create: 2023-06-26 import socket import time import traceback class TCPConnection: __instanc 阅读全文
posted @ 2024-10-30 23:34 BrianSun 阅读(94) 评论(0) 推荐(0)
摘要: copy_with_hardlink.py import os import argparse def copy_with_hardlinks(src, dst): if not os.path.exists(dst): os.makedirs(dst) for item in os.listdir 阅读全文
posted @ 2024-10-25 17:31 BrianSun 阅读(58) 评论(0) 推荐(0)
摘要: python3 log工具 logutil.py # -*- coding: utf-8 -*- import os,sys,traceback import logging from logging.handlers import RotatingFileHandler import getpas 阅读全文
posted @ 2024-10-14 15:16 BrianSun 阅读(62) 评论(0) 推荐(0)
摘要: python3 mysql 连接脚本 # -*- coding: utf-8 -*- # import MySQLdb,sys,os import pymysql as MySQLdb,sys,os import os,sys,traceback # import MySQLdb.cursors # 阅读全文
posted @ 2024-10-12 17:22 BrianSun 阅读(29) 评论(0) 推荐(0)
摘要: python3 sqlite3 数据库创建 & 连接 脚本 # -*- coding:utf-8 -*- import traceback import sqlite3 import re import os class DB(object): def __init__(self, dbname, 阅读全文
posted @ 2024-10-12 16:32 BrianSun 阅读(126) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>中秋快乐</tit 阅读全文
posted @ 2024-09-14 13:06 BrianSun 阅读(151) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 ··· 16 下一页