curl

通过 Ansible role 安装 Jenkins Server

我们两清 提交于 2020-12-31 11:06:25
创建 CI 流程的第一件事应该是安装 CI 工具,本文以最常见的 Jenkins 为例,介绍如何使用 Ansible 自动安装 Jenkins Server。说明:本文的演示环境为 ubuntu 16.04。 Ansible roles(角色) Ansible 中除了 playbook,还有更高层级的抽象,称为 role(角色)。所谓的 role 其实就是把一些 playbook 组织成为一个更简洁、清晰的可重用对象。比如把安装 Jenkins Server 的 playbook 组织成为一个 role。 感谢开源社区,当我们需要安装 Jenkins Server 的时候并不需要自己写一个对应的 role,直接使用大神们写好的就可以了。 Ansible Galaxy Ansible Galaxy 是社区和分享 Ansible role 的地方。直接搜索 jenkins,由 geerlingguy 贡献的 jenkins role 是目前最受欢迎的: ansible-galaxy 命令 通过 ansible-galaxy 命令可以把上面搜索到的 role 安装到本地: $ ansible-galaxy install geerlingguy.jenkins 由于 geerlingguy.jenkins role 依赖 geerlingguy.java role,所以在安装

如何进行 kubernetes 问题的排障

♀尐吖头ヾ 提交于 2020-12-31 05:03:52
点击关注“OPPO互联网技术”,阅读更多技术干货 1. 排障的前置条件 k8s的成熟度很高,伴随着整个项目的扩增,以及新功能和新流程的不断引入,也伴随这产生了一些问题。虽然自动化测试可以排除掉大部分,但是一些复杂流程以及极端情况却很难做到bug的完全覆盖。因此在实际的工作过程中,需要对运行的集群进行故障定位和解决。 当然,进行排障的前提是对于k8s的流程和概念进行掌握,对于源码有一定的掌握能力,才可以更好的进行。待排障的环境和版本和源代码的版本需要进行匹配。版本号可以通过version命令获取,然后从源码进行对照。而且kubectl version还可以展示更为git的commit id。这样更为精准一些。 本文以一次排障过程为例,介绍进行kubernetes问题排障的一般思路和方法。 2. 故障背景 在某个压测的集群(集群版本为v1.12.10)内,为了测试极端性能,于是kubelet上配置了单节点可以创建的容器数从110调整为了600。并且进行反复大批量的容器创建和删除。在压测后一段时间,陆续多个节点变为NotReady,直到整个节点全部变为了NotReady。 在节点上看到有大量的容器待删除。kubelet虽然仍在运行,但是已经不进行任何的pod生命周期的管理了,已经呆住了。其他组件大都正常。此时停了压测工具,kubelet仍然不能够恢复正常

Is it possible to do a simple health check of RTSP stream with curl tool?

烈酒焚心 提交于 2020-12-30 09:02:00
问题 I'm trying to do a simple health check of RTSP stream with curl tool. But command like this always gives me 404 Stream Not Found error: curl -v --url rtsp://192.168.1.80/h264/ --user admin:1234 * Trying 192.168.1.80... * Connected to 192.168.1.80 (192.168.1.80) port 554 (#0) * Server auth using Basic with user 'admin' > OPTIONS * RTSP/1.0 > CSeq: 1 > User-Agent: curl/7.47.0 > Authorization: Basic YWRtaW46YWRtaW4= > < RTSP/1.0 404 Stream Not Found < CSeq: 1 < Date: Tue, Feb 27 2018 01:14:21

Is it possible to do a simple health check of RTSP stream with curl tool?

假如想象 提交于 2020-12-30 09:00:22
问题 I'm trying to do a simple health check of RTSP stream with curl tool. But command like this always gives me 404 Stream Not Found error: curl -v --url rtsp://192.168.1.80/h264/ --user admin:1234 * Trying 192.168.1.80... * Connected to 192.168.1.80 (192.168.1.80) port 554 (#0) * Server auth using Basic with user 'admin' > OPTIONS * RTSP/1.0 > CSeq: 1 > User-Agent: curl/7.47.0 > Authorization: Basic YWRtaW46YWRtaW4= > < RTSP/1.0 404 Stream Not Found < CSeq: 1 < Date: Tue, Feb 27 2018 01:14:21

Python using system SSL certificates?

感情迁移 提交于 2020-12-30 08:56:33
问题 I ran into the recent Authorize.net SSL certificate invalidation debacle last week. I've been able to get curl to accept their certificate finally: $ curl -Iv https://secure.authorize.net ... * SSL certificate verify ok. ... but python is still rejecting it with requests: >>> requests.get('https://secure.authorize.net', verify=True) ... InsecurePlatformWarning and in my code: File "/usr/lib/python2.7/ssl.py", line 405, in do_handshake self._sslobj.do_handshake() SSLError: [Errno 1] _ssl.c:510

Python using system SSL certificates?

非 Y 不嫁゛ 提交于 2020-12-30 08:53:08
问题 I ran into the recent Authorize.net SSL certificate invalidation debacle last week. I've been able to get curl to accept their certificate finally: $ curl -Iv https://secure.authorize.net ... * SSL certificate verify ok. ... but python is still rejecting it with requests: >>> requests.get('https://secure.authorize.net', verify=True) ... InsecurePlatformWarning and in my code: File "/usr/lib/python2.7/ssl.py", line 405, in do_handshake self._sslobj.do_handshake() SSLError: [Errno 1] _ssl.c:510

brew install fails: curl(77) error setting certificate verify

☆樱花仙子☆ 提交于 2020-12-30 06:24:22
问题 ok, so im running an old Mac 10.6.8 with homebrew. brew doctor reports no errors and i have tried brew prune update etc. Everytime i try to install a package, i get this error: curl: (77) error setting certificate verify locations: CAfile: /etc/ssl/certs/ca-certificates.crt CApath: /usr/local/etc/openssl/certs ive tried everything, openssl is installed, but the folder mentioned /usr/local/etc/openssl/certs as well as /etc/ssl/certs/ca-certificates.crt is not there. can anyone save me? Full

HTB-靶机-Charon

我只是一个虾纸丫 提交于 2020-12-29 10:55:22
本篇文章仅用于技术交流学习和研究的目的,严禁使用文章中的技术用于非法目的和破坏,否则造成一切后果与发表本文章的作者无关 靶机是作者购买VIP使用退役靶机操作,显示IP地址为10.10.10.31 本次使用https://github.com/Tib3rius/AutoRecon 进行自动化全方位扫描 执行命令 autorecon 10.10.10.31 -o ./charon-autorecon 最终的扫描结果 还看了使用gobuster跑的目录,没发现有价值的目录,逐改下参数,再使用ffuf和gobuster跑一下 ffuf -u http://10.10.10.31/FUZZ -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt gobuster dir -u http://10.10.10.31/cmsdata -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -x php -o bmfx-charon.gobusters -t 100 但是访问cmsdata显示跳转到403,所以再次使用gobuster进行子目录爆破,发现如下信息 最终访问http://10.10.10.31/cmsdata/login.php

ES系列四、ES6.3常用api之文档类api

落爺英雄遲暮 提交于 2020-12-27 01:00:22
1.Index API: 创建并建立索引 PUT twitter/tweet/ 1 { " user " : " kimchy " , " post_date " : " 2009-11-15T14:12:12 " , " message " : " trying out Elasticsearch " } 官方文档参考: Index API 。 2.Get API: 获取文档 curl -XGET 'http://localhost:9200/twitter/tweet/1' 官方文档参考: Get API 。 3.DELETE API: 删除文档 $ curl -XDELETE 'http://localhost:9200/twitter/tweet/1' 官方文档参考: Delete API 。 4.UPDATE API: 更新文档 PUT test/type1/1{ "counter" : 1, "tags" : ["red"]} 官方文档参考: Update API 。 5.Multi Get API: 一次批量获取文档 PUT ' localhost:9200/_mget { " docs " : [ { " _index " : " test " , " _type " : " type " , " _id " : " 1 " }, { " _index " : "

curl 的用法指南

妖精的绣舞 提交于 2020-12-25 15:39:36
作者: 阮 一峰 原文链接:http://www.ruanyifeng.com/blog/2019/09/curl-reference.html 简介 curl 是常用的命令行工具,用来请求 Web 服务器。它的名字就是客户端(client)的 URL 工具的意思。 它的功能非常强大,命令行参数多达几十种。如果熟练的话,完全可以取代 Postman 这一类的图形界面工具。 本文介绍它的主要命令行参数,作为日常的参考,方便查阅。内容主要翻译自《curl cookbook》。为了节约篇幅,下面的例子不包括运行时的输出,初学者可以先看我以前写的《curl 初学者教程》。 不带有任何参数时,curl 就是发出 GET 请求。 $ curl https://www.example.com 上面命令向www.example.com发出 GET 请求,服务器返回的内容会在命令行输出。 -A -A参数指定客户端的用户代理标头,即User-Agent。curl 的默认用户代理字符串是curl/[version]。 $ curl -A 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36' https://google