Chinaunix首页 | 论坛 | 博客
  • 博客访问: 4995730
  • 博文数量: 921
  • 博客积分: 16037
  • 博客等级: 上将
  • 技术积分: 8469
  • 用 户 组: 普通用户
  • 注册时间: 2006-04-05 02:08
文章分类

全部博文(921)

文章存档

2020年(1)

2019年(3)

2018年(3)

2017年(6)

2016年(47)

2015年(72)

2014年(25)

2013年(72)

2012年(125)

2011年(182)

2010年(42)

2009年(14)

2008年(85)

2007年(89)

2006年(155)

发布时间:2013-08-30 09:42:40

windows平台很多压缩文档为rar文件,那么怎么做到Linux解压rar文件(unrar安装和使用)?简单,centos5安装unrar即可。 unrar安装方法如下:wget  http://dag.wieers.com/rpm/packages/unrar/unrar-3.6.8-1.el5.rf.i386.rpm;rpm -Uvh unrar-3.6.8-1.el5.rf.i386.rpm;复制上面的命令,在root.........【阅读全文】

阅读(3873) | 评论(0) | 转发(0)

发布时间:2013-08-17 07:09:03

参考http://blog.csdn.net/csapr1987/article/details/7633239简单模式from hashlib import md5  def md5_file(name):     m = md5()     a_file = open(name, 'rb') #需要使用二进制格式读取文件内容.........【阅读全文】

阅读(1834) | 评论(0) | 转发(0)

发布时间:2013-08-16 23:37:27

#!/usr/bin/env pythonimport paramikoimport timeip_list=('ip1','ip2')log_file=open('mpwdok.log','w+')log_file1=open('mpwderr.log','w+')for ip in ip_list:    try: &nbs.........【阅读全文】

阅读(1342) | 评论(0) | 转发(0)

发布时间:2013-08-16 23:09:16

What I've tried:invoke_shell() then channel.send su then send the password resulted in not being rootinvoke_shell() then channel.exec_command resulted in Channel Closed error_transport.open_session() then channel.exec_command resulted in not being in rootinvoke_shell() .........【阅读全文】

阅读(2142) | 评论(0) | 转发(0)

发布时间:2013-08-16 15:29:17

最近在学习python,自己在写一个自动化运维平台,所以接触到了这个模块,有2种方法;一种是直接用密码来登录的,具体代码如下:ssh = paramiko.SSHClient()ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())ssh.connect(hostname, port, username, password)stdi.........【阅读全文】

阅读(10434) | 评论(0) | 转发(0)
给主人留下些什么吧!~~
留言热议
请登录后留言。

登录 注册