02 2017 档案
Jscraft 使用 Shell 与预先加载别名混合使用
摘要:Session session = a.getSessionShell("user", "pwd", "host"); Channel channel = session.openChannel("shell"); OutputStream outS = channel.getOutputStream(); PrintStream commander = new Print... 阅读全文
posted @ 2017-02-19 10:40 wblade 阅读(333) 评论(0) 推荐(0)
Https 忽略证书\使用自定义证书的java代码实现
摘要:public SSLContext createIgnoreVerifySSL() throws KeyManagementException, NoSuchAlgorithmException, KeyStoreException { SSLContext sc = new SSLContextBuilder().loadTrustMaterial(null, new Tru... 阅读全文
posted @ 2017-02-05 23:42 wblade 阅读(4155) 评论(0) 推荐(0)
获取cookie后,使用cookie进行接下来的自动化操作
摘要:System.setProperty("javax.net.ssl.trustStore", certPath); public void uploadComponent() throws Exception { HttpClient httpclient = HttpClientBuilder.create().build(); HttpPut httpget = new HttpPu... 阅读全文
posted @ 2017-02-03 17:38 wblade 阅读(1108) 评论(0) 推荐(0)
第一次调用从server获取Cookie
摘要:System.setProperty("javax.net.ssl.trustStore", certPath); public String getCookieString(String userId, String pwd) throws Exception { HttpClient httpc 阅读全文
posted @ 2017-02-03 17:36 wblade 阅读(876) 评论(0) 推荐(0)
grep与egrep的区别
摘要:grep与egrep的区别; 在linux系统环境下,我们通常使用grep命令来过滤出需要的行而egrep确很少使用,他们的区别其实很简单,grep默认不支持正则表达式,egrep默认支持正则表达式,egrep 等于 grep -E 命令。 阅读全文
posted @ 2017-02-03 16:54 wblade 阅读(1073) 评论(0) 推荐(0)
alias with parameter,linux
摘要:alias demoAlias1='_(){ git checkout -b $1; command2;}; _' 阅读全文
posted @ 2017-02-02 11:33 wblade 阅读(171) 评论(0) 推荐(0)
SED Command
摘要:替换当前变量的内容 echo $BASE | sed -e 's:\/originalStr:\/targetString:g' 替换文件里面的特殊字符 sed -e "s/originalStr/targetString/g" /tmp/package.txt > newFile.txt 阅读全文
posted @ 2017-02-02 11:27 wblade 阅读(130) 评论(0) 推荐(0)