本文中是以h3c的为例,其它品牌的请自行扩展
另本文中是以查询信息相关信息为例,换成查看配置的命令即可起到备份配置的作用



如果想赏钱,可以用微信扫描下面的二维码,一来能刺激我写博客的欲望,二来好维护云主机的费用; 另外再次标注博客原地址 itnotebooks.com 感谢!

手把手搭建CI/CD(一)

gitlab + tekton + argoCD

阅读全文

自动分析国家关于每年的法定节假日安排公告,生成查询接口自动判断作息日

背景 工作中经常遇到需要根据作息去做排班系统、跑定时报表任务、统一告警通道、巡检等等场景,之前是比较粗暴的区分周一~周五、周六和周日这样,遇到法定节...

阅读全文

Golang Terraform 创建阿里云ECS云主机

封装NewTerraform方法 将Terraform的环境相关信息都在这个方法内定义完成 1. Terraform工作目录定义 2. Plugins初始化,考虑到在线初始化太慢,这里是提前下...

阅读全文

7 条评论

  1. 我用的pycharm断点测试,到了
    def run(self):
    try:
    就不往下执行了,直接跳到最后了,请问什么情况呢?

  2. 有报错,请问大佬如何处理,谢谢!我用的python 3.8
    Telnet(10.1.8.5,23): recv b’************************************************\r\n’
    Telnet(10.1.8.5,23): recv b’* Copyright (c) 2004-2016 Hangzhou H3C Tech. Co., ‘
    Telnet(10.1.8.5,23): recv b”Ltd. All rights reserved. *\r\n* Without the owner’”
    Telnet(10.1.8.5,23): recv b’s prior written consent, ‘
    Telnet(10.1.8.5,23): recv b’ *\r\n* no decompiling or reverse-engineering ‘
    Telnet(10.1.8.5,23): recv b’shall be allowed. *\r\n**********’
    Telnet(10.1.8.5,23): recv b’**************************************************’
    Telnet(10.1.8.5,23): recv b’******************\r\n’
    Telnet(10.1.8.5,23): recv b’\xff\xfc\x01′
    Telnet(10.1.8.5,23): IAC WONT 1
    Telnet(10.1.8.5,23): recv b’\xff\xfc\x03′
    Telnet(10.1.8.5,23): IAC WONT 3
    Telnet(10.1.8.5,23): recv b’\xff\xfe\x18′
    Telnet(10.1.8.5,23): IAC DONT 24
    Telnet(10.1.8.5,23): recv b’\xff\xfe\x1f’
    Telnet(10.1.8.5,23): IAC DONT 31
    Telnet(10.1.8.5,23): recv b’\r\n\r\nLogin authentication\r\n\r\n’
    Telnet(10.1.8.5,23): recv b’\r\nUsername:’
    Can’t connection 10.1.8.5

  3. 有报错,请问大佬如何处理,谢谢!我用的python 3.8
    Telnet(10.1.8.5,23): recv b’************************************************\r\n’
    Telnet(10.1.8.5,23): recv b’* Copyright (c) 2004-2016 Hangzhou H3C Tech. Co., ‘
    Telnet(10.1.8.5,23): recv b”Ltd. All rights reserved. *\r\n* Without the owner'”
    Telnet(10.1.8.5,23): recv b’s prior written consent, ‘
    Telnet(10.1.8.5,23): recv b’ *\r\n* no decompiling or reverse-engineering ‘
    Telnet(10.1.8.5,23): recv b’shall be allowed. *\r\n**********’
    Telnet(10.1.8.5,23): recv b’**************************************************’
    Telnet(10.1.8.5,23): recv b’******************\r\n’
    Telnet(10.1.8.5,23): recv b’\xff\xfc\x01′
    Telnet(10.1.8.5,23): IAC WONT 1
    Telnet(10.1.8.5,23): recv b’\xff\xfc\x03′
    Telnet(10.1.8.5,23): IAC WONT 3
    Telnet(10.1.8.5,23): recv b’\xff\xfe\x18′
    Telnet(10.1.8.5,23): IAC DONT 24
    Telnet(10.1.8.5,23): recv b’\xff\xfe\x1f’
    Telnet(10.1.8.5,23): IAC DONT 31
    Telnet(10.1.8.5,23): recv b’\r\n\r\nLogin authentication\r\n\r\n’
    Telnet(10.1.8.5,23): recv b’\r\nUsername:’
    Can’t connection 10.1.1.1

  4. “D:\Program Files (x86)\python3.6\python.exe” D:/desktop/python3.6/1.py
    Telnet(192.168.10.254,23): recv b’\r\r\nWarning: Telnet is not a secure protocol, and i’
    Telnet(192.168.10.254,23): recv b’t is recommended to use Stelnet.\r\n\r\nLogin authenti’
    Telnet(192.168.10.254,23): recv b’cation\r\n\r\n\r\nUsername:\xff\xfb\x01\xff\xfb\x01\xff\xfb\x01\xff\xfb\x03\xff\xfd\x18\xff\xfd\x1f’
    Telnet(192.168.10.254,23): IAC WILL 1
    Telnet(192.168.10.254,23): IAC WILL 1
    Telnet(192.168.10.254,23): IAC WILL 1
    Telnet(192.168.10.254,23): IAC WILL 3
    Telnet(192.168.10.254,23): IAC DO 24
    Telnet(192.168.10.254,23): IAC DO 31
    Can’t connection 192.168.10.254

回复 Eric Winn 取消回复