#!/usr/bin/expect#!/bin/bashforNUMin{1..10}doping-c1-w1172.25.254.$NUM&>/dev/null&&(/mnt/ssh.exp172.25.254.$NUMredhathostname|grep-E"^The|ECDSA|connecting|Warning|password|spawn"-v|sed"s/Permission\denied\,\please\try\again\./172.25.254.$NUMp..
分类:
其他好文 时间:
2016-12-16 01:52:53
阅读次数:
193
/// /// 设置App样式 /// /// 窗口标题栏样式 /// 背景样式 private void ChangeTheme(string accentName, string themeName) { Accent expectedAccent ... ...
分类:
移动开发 时间:
2016-12-16 01:11:51
阅读次数:
2097
#!/usr/bin/expect-fsetip[lindex$argv0]setpasswd[lindex$argv1]setpath[lindex$argv2]setfile[lindex$argv3]setcmd[lindex$argv2]spawnscp$filepasswordusernameroot@${ip}:$pathexpect"password:*"send"${passwd}\r"spawn/usr/bin/sshroot@${ip}expect"password:"send"${pas..
分类:
其他好文 时间:
2016-12-15 18:24:02
阅读次数:
140
1--》IndentationError:expected an indented block 》IndentationError: unindent does not match any outer indentation level 》IndentationError: unexpected i ...
分类:
编程语言 时间:
2016-12-15 11:22:20
阅读次数:
337
elasticsearch的config文件夹里面有两个配置文件:elasticsearch.yml和logging.yml,第一个是es的基本配置文件,第二个是日志配置文件,es也是使用log4j来记录日志的,所以logging.yml里的设置按普通log4j配置文件来设置就行了。下面主要讲解下e ...
分类:
其他好文 时间:
2016-12-15 00:33:59
阅读次数:
176
在编译go语言的时候; 写了一段这样的代码 运行的时候报这样的错误 syntax error: unexpected semicolon or newline befor { 调试了很久之后发现是 花括号的原因 go语言方法的花括号不能像C#一样放在方法名的下面,开头的花括号需要放在方法名的前面 运 ...
分类:
编程语言 时间:
2016-12-15 00:28:17
阅读次数:
194
1、sshpass:使用场景:ssh登陆不能在命令行中指定密码,sshpass的出现,解决了这一问题,用于非交互的ssh密码验证它支持密码从命令行,文件,环境变量中读龋安装[root@node6~]#yuminstallsshpass-y
已安装:
sshpass.x86_640:1.05-1.el6
完毕!
[root@node6~]#参数:[root@node6..
分类:
其他好文 时间:
2016-12-14 22:32:13
阅读次数:
292
#!/bin/bash
#example:
#usrname=‘svnuser‘
#passwd=‘svnpassword‘
#svn_link="http://url/svn_dir"
#svn_dir="target_dir"
usrname=$1
passwd=$2
svn_link=$3
svn_dir=$4
svn_flag=".svn"
cmd=$(rpm-qa|grep"expect")
if[$?-ne0];then
yum-yinstallexpect
fi
cd${svn_dir}..
分类:
其他好文 时间:
2016-12-14 02:53:12
阅读次数:
203
#!/usr/bin/expect
ip_array=$(cat/tmp/ip.txt)
username=root
foripin${ip_array[*]}{######IP
spawnssh-p6122$username@$$ip
expect{
"(yes/no)?"{send"yes\r";exp_continue}
"Password:"{send"p@ssw0rdWAS\r"}######root密码
}
expect"*#"
send"cp/etc/login.defs/..
分类:
系统相关 时间:
2016-12-13 16:35:26
阅读次数:
224
1、通过$RANDOM和md5sum的方式echo $RANDOM | md5sum | cut -c 1-322、用时间随机date +%s%N3、通过openssl随机openssl rand -base64 84、通过/dev/urandomhead /dev/urandom | md5sum ...
分类:
其他好文 时间:
2016-12-12 19:02:06
阅读次数:
197