Skip to main content

A etool package for security monitoring

Project description

安装

使用 pip 安装 etool:

pip install -U etool

功能与使用示例

网络

测试网络速度

from etool import ManagerSpeed
ManagerSpeed.network() # 网络测试
ManagerSpeed.disk() # 硬盘测试
ManagerSpeed.memory() # 内存测试
ManagerSpeed.gpu_memory() # GPU测试

屏幕与文件分享

分享屏幕

from etool import ManagerShare
ManagerShare.screen_share() # 分享屏幕

分享文件

from etool import ManagerShare
ManagerShare.share_file() # 分享文件

办公

PDF处理

from etool import ManagerPdf
# 功能升级,代码重构中

docx处理

from etool import ManagerDocx
word_path = 'ex1.docx' # docx文件路径
result_path = 'result' # 保存路径
ManagerDocx.replace_words(word_path, '1', '2') # 替换文档中的文字
ManagerDocx.change_forward(word_path, 'result.docx') # 更改文档格式
ManagerDocx.get_pictures(word_path, result_path) # 提取docx中的图片至result文件夹

邮件发送

from etool import ManagerEmail
ManagerEmail.send_email(
    sender='1234567890@qq.com',
    password='1234567890',
    recipients=['1234567890@qq.com'],
    subject='测试邮件',
    message='测试邮件内容',
    file_path='test.txt',
    img_path='test.webp'
) # 发送邮件

图片处理

from etool import ManagerImage
pics = ['pic1.webp', 'pic2.webp'] # 图片路径列表
ManagerImage.merge_LR(pics) # 左右拼接
ManagerImage.merge_UD(pics) # 上下拼接
ManagerImage.fill_image('pic1_UD.webp') # 填充图片
ManagerImage.cut_image('pic1_UD_fill.webp') # 裁剪图片
ManagerImage.rename_images('tests', remove=True) # 重命名图片

表格处理

from etool import ManagerExcel
excel_path = 'ex1.xlsx' # excel文件路径
save_path = 'result.xlsx' # 保存路径
ManagerExcel.excel_format(excel_path, save_path) # 复制ex1.xlsx的样式到result.xlsx

二维码生成

from etool import ManagerQrcode
qr_path = 'qr.png' # 保存路径
ManagerQrcode.generate_english_qrcode(words='https://www.baidu.com', qr_path) # 生成不含中文的二维码
ManagerQrcode.generate_qrcode(words='百度', qr_path) # 生成含中文的二维码
ManagerQrcode.decode_qrcode(qr_path) # 解码二维码

ipynb转换

from etool import ManagerIpynb
ipynb_dir = 'ipynb_dir' # ipynb文件夹路径
md_dir = 'md' # md文件夹路径

ManagerIpynb.merge_notebooks(ipynb_dir) # 合并ipynb文件
ManagerIpynb.convert_notebook_to_markdown(ipynb_dir+'.ipynb', md_dir) # 将ipynb文件转换为md文件

其他

任务调度

from etool import ManagerScheduler
# 由于定时发送不宜频繁测试,功能未在README中详细列出

密码生成

from etool import ManagerPassword
print(ManagerPassword.generate_pwd_list(ManagerPassword.results['all_letters'] + ManagerPassword.results['digits'], 2))
# 生成2位密码的所有可能(可用于密码爆破)
print(ManagerPassword.random_pwd(8))
# 随机生成8位密码(随机加密)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

etool-1.3.3.tar.gz (29.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

etool-1.3.3-py3-none-any.whl (30.8 kB view details)

Uploaded Python 3

File details

Details for the file etool-1.3.3.tar.gz.

File metadata

  • Download URL: etool-1.3.3.tar.gz
  • Upload date:
  • Size: 29.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.21

File hashes

Hashes for etool-1.3.3.tar.gz
Algorithm Hash digest
SHA256 4e331fb0aa07f2eb1d1521d333581c2b29994493a8c99a8260837d06d4514cc1
MD5 28c129f293bd2e8f9557a763264da195
BLAKE2b-256 6c6ca543455bde495f106c4829de9cce3b8a71a62dd08dcf4f5019f8ba785a79

See more details on using hashes here.

File details

Details for the file etool-1.3.3-py3-none-any.whl.

File metadata

  • Download URL: etool-1.3.3-py3-none-any.whl
  • Upload date:
  • Size: 30.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.21

File hashes

Hashes for etool-1.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 99a6f31276bb720ac7c1f296d7ccfbf32cbcf7629cf09d0d901e0ed5e6d0e8ca
MD5 bc777ab89ee17f58696f767711cad035
BLAKE2b-256 528c517a72b25b3736a67306296177effa3c6aeaa34d0403766eaa54d267ae1b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page