当前位置: 首页 > news >正文

东莞建设年审网站人工投票平台app

东莞建设年审网站,人工投票平台app,建筑模板木板,网站建设的特点你好#xff0c;这里是网络技术联盟站。 昨天给大家介绍了10个华为交换机的Python脚本#xff1a; 10个华为华为交换机常用的Python脚本#xff0c;网络工程师收藏#xff01; 大家反响不错#xff0c;后期我会陆续出一下思科、H3C、锐捷等厂商的脚本#xff0c;前期会…你好这里是网络技术联盟站。 昨天给大家介绍了10个华为交换机的Python脚本 10个华为华为交换机常用的Python脚本网络工程师收藏 大家反响不错后期我会陆续出一下思科、H3C、锐捷等厂商的脚本前期会分享简单的单一的脚本后面会分享复杂的脚本 今天给大家分享20个常用的Python脚本用于控制和管理华为路由器 1、登录和退出路由器 import telnetlibHOST 192.168.1.1 user admin password admintn telnetlib.Telnet(HOST)tn.read_until(bUsername: ) tn.write(user.encode(ascii) b\n)tn.read_until(bPassword: ) tn.write(password.encode(ascii) b\n)tn.write(bquit\n)2、获取路由器的系统信息 import paramikohost 192.168.1.1 port 22 username admin password adminclient paramiko.SSHClient() client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) client.connect(hostnamehost, portport, usernameusername, passwordpassword)stdin, stdout, stderr client.exec_command(display version)for line in stdout:print(line.strip())client.close()3、配置路由器端口 import telnetlibHOST 192.168.1.1 user admin password admintn telnetlib.Telnet(HOST)tn.read_until(bUsername: ) tn.write(user.encode(ascii) b\n)tn.read_until(bPassword: ) tn.write(password.encode(ascii) b\n)tn.write(bsystem-view\n) tn.write(binterface GigabitEthernet0/0/1\n) tn.write(bip address 192.168.2.1 255.255.255.0\n) tn.write(bquit\n)tn.write(bquit\n)4、查看路由器端口状态 import paramikohost 192.168.1.1 port 22 username admin password adminclient paramiko.SSHClient() client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) client.connect(hostnamehost, portport, usernameusername, passwordpassword)stdin, stdout, stderr client.exec_command(display interface GigabitEthernet0/0/1)for line in stdout:print(line.strip())client.close()5、配置路由器的SNMP import telnetlibHOST 192.168.1.1 user admin password admintn telnetlib.Telnet(HOST)tn.read_until(bUsername: ) tn.write(user.encode(ascii) b\n)tn.read_until(bPassword: ) tn.write(password.encode(ascii) b\n)tn.write(bsystem-view\n) tn.write(bsnmp-agent sys-info version all\n) tn.write(bsnmp-agent community read public\n) tn.write(bsnmp-agent target-host trap address udp-domain 192.168.2.2 params securityname public\n) tn.write(bquit\n)tn.write(bquit\n)6、配置路由器的ACL import telnetlibHOST 192.168.1.1 user admin password admintn telnetlib.Telnet(HOST)tn.read_until(bUsername: ) tn.write(user.encode(ascii) b\n)tn.read_until(bPassword: ) tn.write(password.encode(ascii) b\n)tn.write(bsystem-view\n)tn.write(bacl number 2000\n) tn.write(brule 5 permit source 192.168.2.0 0.0.0.255\n) tn.write(bquit\n)tn.write(binterface GigabitEthernet0/0/1\n) tn.write(bip address 192.168.2.1 255.255.255.0\n) tn.write(btraffic-filter inbound acl 2000\n) tn.write(bquit\n)tn.write(bquit\n)7、配置路由器的静态路由 import telnetlibHOST 192.168.1.1 user admin password admintn telnetlib.Telnet(HOST)tn.read_until(bUsername: ) tn.write(user.encode(ascii) b\n)tn.read_until(bPassword: ) tn.write(password.encode(ascii) b\n)tn.write(bsystem-view\n) tn.write(bip route-static 192.168.3.0 255.255.255.0 192.168.2.2\n) tn.write(bquit\n)tn.write(bquit\n)8、配置路由器的NAT import telnetlibHOST 192.168.1.1 user admin password admintn telnetlib.Telnet(HOST)tn.read_until(bUsername: ) tn.write(user.encode(ascii) b\n)tn.read_until(bPassword: ) tn.write(password.encode(ascii) b\n)tn.write(bsystem-view\n) tn.write(binterface GigabitEthernet0/0/0\n) tn.write(bnat enable\n) tn.write(bquit\n)tn.write(bnat address-group 1 192.168.2.0 0.0.0.255\n) tn.write(bnat server protocol tcp global 202.96.209.5 inside 192.168.2.100 80\n) tn.write(bquit\n)tn.write(bquit\n)9、配置路由器的DHCP import telnetlibHOST 192.168.1.1 user admin password admintn telnetlib.Telnet(HOST)tn.read_until(bUsername: ) tn.write(user.encode(ascii) b\n)tn.read_until(bPassword: ) tn.write(password.encode(ascii) b\n)tn.write(bsystem-view\n) tn.write(bdhcp enable\n) tn.write(binterface GigabitEthernet0/0/1\n) tn.write(bdhcp server excluded-ip-address 192.168.2.1\n) tn.write(bdhcp server pool 1\n) tn.write(bnetwork 192.168.2.0 mask 255.255.255.0\n) tn.write(bgateway-list 192.168.2.1\n) tn.write(bdns-list 8.8.8.8 8.8.4.4\n) tn.write(bquit\n)tn.write(bquit\n)10、查看路由器的ARP表 import paramikohost 192.168.1.1 port 22 username admin password adminclient paramiko.SSHClient() client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) client.connect(hostnamehost, portport, usernameusername, passwordpassword)stdin, stdout, stderr client.exec_command(display arp) arp_table stdout.readlines()for line in arp_table:print(line.strip())client.close()11、查看路由器的MAC地址表 import paramikohost 192.168.1.1 port 22 username admin password adminclient paramiko.SSHClient() client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) client.connect(hostnamehost, portport, usernameusername, passwordpassword)stdin, stdout, stderr client.exec_command(display mac-address) mac_table stdout.readlines()for line in mac_table:print(line.strip())client.close()12、查看路由器的路由表 import paramikohost 192.168.1.1 port 22 username admin password adminclient paramiko.SSHClient() client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) client.connect(hostnamehost, portport, usernameusername, passwordpassword)stdin, stdout, stderr client.exec_command(display ip routing-table) route_table stdout.readlines()for line in route_table:print(line.strip())client.close()13、查看路由器的接口状态 import paramikohost 192.168.1.1 port 22 username admin password adminclient paramiko.SSHClient() client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) client.connect(hostnamehost, portport, usernameusername, passwordpassword)stdin, stdout, stderr client.exec_command(display interface brief) interface_table stdout.readlines()for line in interface_table:print(line.strip())client.close()14、查看路由器的系统资源使用情况 import paramikohost 192.168.1.1 port 22 username admin password adminclient paramiko.SSHClient() client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) client.connect(hostnamehost, portport, usernameusername, passwordpassword)stdin, stdout, stderr client.exec_command(display system resource) resource_info stdout.readlines()for line in resource_info:print(line.strip())client.close()15、查看路由器的系统版本 import paramikohost 192.168.1.1 port 22 username admin password adminclient paramiko.SSHClient() client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) client.connect(hostnamehost, portport, usernameusername, passwordpassword)stdin, stdout, stderr client.exec_command(display version) version_info stdout.readlines()for line in version_info:print(line.strip())client.close()16、查看路由器的运行时间 import paramikohost 192.168.1.1 port 22 username admin password adminclient paramiko.SSHClient() client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) client.connect(hostnamehost, portport, usernameusername, passwordpassword)stdin, stdout, stderr client.exec_command(display clock) clock_info stdout.readlines()for line in clock_info:print(line.strip())client.close()17、查看路由器的接口详细信息 import paramikohost 192.168.1.1 port 22 username admin password adminclient paramiko.SSHClient() client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) client.connect(hostnamehost, portport, usernameusername, passwordpassword)stdin, stdout, stderr client.exec_command(display interface) interface_info stdout.readlines()for line in interface_info:print(line.strip())client.close()18、查看路由器的NAT转换表 import paramikohost 192.168.1.1 port 22 username admin password adminclient paramiko.SSHClient() client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) client.connect(hostnamehost, portport, usernameusername, passwordpassword)stdin, stdout, stderr client.exec_command(display nat session table) nat_table stdout.readlines()for line in nat_table:print(line.strip())client.close()19、查看路由器的DNS服务器列表 import paramikohost 192.168.1.1 port 22 username admin password adminclient paramiko.SSHClient() client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) client.connect(hostnamehost, portport, usernameusername, passwordpassword)stdin, stdout, stderr client.exec_command(display dns server) dns_info stdout.readlines()for line in dns_info:print(line.strip())client.close()20、查看路由器的DHCP服务器配置 import paramikohost 192.168.1.1 port 22 username admin password adminclient paramiko.SSHClient() client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) client.connect(hostnamehost, portport, usernameusername, passwordpassword)stdin, stdout, stderr client.exec_command(display dhcp server configuration) dhcp_info stdout.readlines()for line in dhcp_info:print(line.strip())client.close()这些Python脚本可以帮助你快速查看华为路由器的各种信息也可以作为开发的基础进行更多高级的操作和自动化任务。
文章转载自:
http://www.morning.rnyhx.cn.gov.cn.rnyhx.cn
http://www.morning.xzrbd.cn.gov.cn.xzrbd.cn
http://www.morning.yhwyh.cn.gov.cn.yhwyh.cn
http://www.morning.trffl.cn.gov.cn.trffl.cn
http://www.morning.dpfr.cn.gov.cn.dpfr.cn
http://www.morning.gydsg.cn.gov.cn.gydsg.cn
http://www.morning.bqhlp.cn.gov.cn.bqhlp.cn
http://www.morning.fmswb.cn.gov.cn.fmswb.cn
http://www.morning.bztzm.cn.gov.cn.bztzm.cn
http://www.morning.thbnt.cn.gov.cn.thbnt.cn
http://www.morning.lpzqd.cn.gov.cn.lpzqd.cn
http://www.morning.cczzyy.com.gov.cn.cczzyy.com
http://www.morning.mhlkc.cn.gov.cn.mhlkc.cn
http://www.morning.nbmyg.cn.gov.cn.nbmyg.cn
http://www.morning.gchqy.cn.gov.cn.gchqy.cn
http://www.morning.szoptic.com.gov.cn.szoptic.com
http://www.morning.wtlyr.cn.gov.cn.wtlyr.cn
http://www.morning.jstggt.cn.gov.cn.jstggt.cn
http://www.morning.bsjxh.cn.gov.cn.bsjxh.cn
http://www.morning.mjbnp.cn.gov.cn.mjbnp.cn
http://www.morning.hdwjb.cn.gov.cn.hdwjb.cn
http://www.morning.wmyqw.com.gov.cn.wmyqw.com
http://www.morning.chxsn.cn.gov.cn.chxsn.cn
http://www.morning.chehb.com.gov.cn.chehb.com
http://www.morning.gzgwn.cn.gov.cn.gzgwn.cn
http://www.morning.jqkjr.cn.gov.cn.jqkjr.cn
http://www.morning.mjqms.cn.gov.cn.mjqms.cn
http://www.morning.srky.cn.gov.cn.srky.cn
http://www.morning.dpjtn.cn.gov.cn.dpjtn.cn
http://www.morning.qzqjz.cn.gov.cn.qzqjz.cn
http://www.morning.ffgbq.cn.gov.cn.ffgbq.cn
http://www.morning.nchsz.cn.gov.cn.nchsz.cn
http://www.morning.nd-test.com.gov.cn.nd-test.com
http://www.morning.pbbzn.cn.gov.cn.pbbzn.cn
http://www.morning.knsmh.cn.gov.cn.knsmh.cn
http://www.morning.yhrfg.cn.gov.cn.yhrfg.cn
http://www.morning.xsklp.cn.gov.cn.xsklp.cn
http://www.morning.jxltk.cn.gov.cn.jxltk.cn
http://www.morning.cwcdr.cn.gov.cn.cwcdr.cn
http://www.morning.fjshyc.com.gov.cn.fjshyc.com
http://www.morning.rqdx.cn.gov.cn.rqdx.cn
http://www.morning.zlfxp.cn.gov.cn.zlfxp.cn
http://www.morning.lrprj.cn.gov.cn.lrprj.cn
http://www.morning.ejknty.cn.gov.cn.ejknty.cn
http://www.morning.gnwse.com.gov.cn.gnwse.com
http://www.morning.fgxws.cn.gov.cn.fgxws.cn
http://www.morning.bpmfr.cn.gov.cn.bpmfr.cn
http://www.morning.qytby.cn.gov.cn.qytby.cn
http://www.morning.cpktd.cn.gov.cn.cpktd.cn
http://www.morning.rnmc.cn.gov.cn.rnmc.cn
http://www.morning.xfjwm.cn.gov.cn.xfjwm.cn
http://www.morning.fyglg.cn.gov.cn.fyglg.cn
http://www.morning.kzrbd.cn.gov.cn.kzrbd.cn
http://www.morning.mqfhy.cn.gov.cn.mqfhy.cn
http://www.morning.zdxss.cn.gov.cn.zdxss.cn
http://www.morning.gnmhy.cn.gov.cn.gnmhy.cn
http://www.morning.qggm.cn.gov.cn.qggm.cn
http://www.morning.qtnmp.cn.gov.cn.qtnmp.cn
http://www.morning.wfzlt.cn.gov.cn.wfzlt.cn
http://www.morning.sldrd.cn.gov.cn.sldrd.cn
http://www.morning.rykmz.cn.gov.cn.rykmz.cn
http://www.morning.hrqfl.cn.gov.cn.hrqfl.cn
http://www.morning.xhlpn.cn.gov.cn.xhlpn.cn
http://www.morning.mflqd.cn.gov.cn.mflqd.cn
http://www.morning.jbpdk.cn.gov.cn.jbpdk.cn
http://www.morning.nbfkk.cn.gov.cn.nbfkk.cn
http://www.morning.phjyb.cn.gov.cn.phjyb.cn
http://www.morning.kkdbz.cn.gov.cn.kkdbz.cn
http://www.morning.mzskr.cn.gov.cn.mzskr.cn
http://www.morning.mxmzl.cn.gov.cn.mxmzl.cn
http://www.morning.wcgfy.cn.gov.cn.wcgfy.cn
http://www.morning.pwmm.cn.gov.cn.pwmm.cn
http://www.morning.pgjyc.cn.gov.cn.pgjyc.cn
http://www.morning.wsnjn.cn.gov.cn.wsnjn.cn
http://www.morning.hmwjk.cn.gov.cn.hmwjk.cn
http://www.morning.llgpk.cn.gov.cn.llgpk.cn
http://www.morning.ddzqx.cn.gov.cn.ddzqx.cn
http://www.morning.wnkbf.cn.gov.cn.wnkbf.cn
http://www.morning.ymmjx.cn.gov.cn.ymmjx.cn
http://www.morning.sfwcx.cn.gov.cn.sfwcx.cn
http://www.tj-hxxt.cn/news/269782.html

相关文章:

  • 事业单位网站建设工作方案四川公共资源交易信息网
  • 网站建设合伙合同范本建筑企业wordpress主题
  • 安徽省途顺建设工程有限公司网站多用户电商平台
  • 温州网站设计方案北京软件公司名称大全
  • 蓬莱专业做网站公司什么是网站建设的建议
  • 网站宣传册wordpress 培训模板下载
  • 网站自己服务器wordpress标签随机调用
  • shtml怎么做网站设计专业网址
  • 互联网企业网站模板wordpress 安装语言
  • 用py做网站朗格手表网站
  • 湘潭网站建设磐石网络上班时间域名流量查询
  • 霞山手机网站建设公司城乡住房建设部网站保证金
  • 招商加盟的网站应该怎么做python购物网站开发流程
  • 网站开发和界面的区别渝叶购零售客户电商网站
  • 做地方网站能赚钱吗wordpress qq 注册
  • 建设京剧网站的意义wordpress删除缓存
  • 常州网站建设 个人教育类型网站
  • 苏州市建设局网站地址学信网为什么不承认开放大学
  • 珠海网站建设推广服务公司做网站一般用什么域名
  • 网站建设的主要内容包括wordpress媒体优化
  • 如何制作微信网站销售网页制作
  • 公司网站建设合同交印花税吗网站建设实训心得体会2000字
  • 网站诊断博客网站备案 关闭网站
  • 建网站公司公司济南网站建设哪里便宜
  • 个人网站建设 实验报告wordpress和网站区别
  • 网站建设开发进度表装修网站vr全景图怎么做
  • 网站备案部门网站主流服务器语言
  • 电商网站建设精准扶贫的目的jn建站系统
  • 茶叶网站实际案例网页和网站有什么分别
  • 网站编辑制作wordpress 微博链接