Questions tagged as ['curl']

cURL is an HTTP client library and command line tool.
Score: 0
user3256843 avatar
Best practices to troubleshoot stuck php application due to internal curl calls to unresponsive endpoints
cn flag

Recently I found myself with a website (Prestashop e-commerce on a Centos PHP-FPM /Apache / MySql machine ) that was down and not responding to web requests.

After investigation, issue was due to an API call made with php-curl towards an endpoint that was temporarily offline, inside an application PHP file that was recalled in all pages of the website.

The cURL call had been wrongly made without a C ...

Score: 0
inframan avatar
Curl error (56) while trying to install Zabbix packages on RHEL 8
cn flag

I followed the instructions here to install Zabbix 5.4 Mysql/Apache on my RHEL 8 server.

When i tried to install the package with sudo dnf install zabbix-server-mysql (or with yum) , i got this error :

Errors during downloading metadata for repository 'zabbix':
  - Curl  ...
Score: 1
Curl Command Send Asynchronous Request
sx flag

I using this curl request for sending data to API :

curl --location --request POST 'MY_IP' \
--header 'Content-Type: text/plain' \
--data-raw ' [{
    "event_id": "123",

I want to check the API performance by sending request asynchronously and measure the time take I tried to use xargs -P 10 which say send 10 request parallel but not able to do so ? Any help and how I can measure time ?

Score: 0
Replace anonymous ldapsearch command with curl command?
cl flag

I have this working ldapsearch command for connecting anonymously to an internal ldap server:

$ ldapsearch -h -p 389 -x -LLL -s base -b "" namingContexts
namingContexts: DC=org,DC=sample

Now I would like to list the same using curl:

$ curl -v "ldap://,dc=sample namingContexts"
*   Trying ...
* Connected to (....) port 389 (#0)
* LDAP remote: search failed Success 00 ...
Score: 0
Software Fan avatar
Downloading a file using Windows CMD line with curl/wget
in flag

I have a client [Windows 10 VM] and a server [say a linux based VM].

I have Apache running on the Linux Server.

I have a file on the linux server that I want to download on my windows client.

I want to do it in 2 ways from the windows CMD: -Using curl -using wget

I tried the foll commands on my windows CMD. But doesnt work. Is something wrong with my CLI?

curl http://x.x.x.x/home/abc/ -O
wge ...
Score: 1
tio oit avatar
curl says a valid certificate is expired
in flag

I have a gitlab community edition hosted on a server, and when using curl on this server to fetch this local gitlab website, I get an expired certificate error even if the dates are valid:

curl --insecure -vvI 2>&1 | awk 'BEGIN { cert=0 } /^\* Server certificate:/ { cert=1 } /^\*/ { if (cert) print }'
* Server certificate:
*  subject:
*  start d ...
Score: 0
Add some text to curl's user agent string? (i.e. curl with a UA that includes curl's default UA & my text)
bg flag

I am writing a shell script which uses curl(1) to download files. By default curl will set a HTTP User-Agent (UA) to something like curl/7.74.0. I want to be a good internet citizen and set the UA to say what my script is. Since the software that is making HTTP requests is still curl, I would like this user agent to also include the default curl UA.

I can replace User-Agent with -A, but is it possible ...

Score: 0
Dario Corno avatar
cURL suddenly gives Connection Refused to an Ubuntu Server
us flag

I have a custom wordpress "client" plugin that makes a cURL call to a Node app on an Ubuntu server.

The call works perfectly from every WP installation, except for one where everything worked fine until yesterday then the following cURL call suddenly started to return a

Failed to connect to x.x.x.x port 3344 after 1040 ms: Connection refused.

    $curl = curl_init();

    curl_setopt_array($curl, array(
Score: 0
Aby Golzar avatar
Failed to connect to port 443: Connection refused cloudflare firewall
mm flag

I'm trying to send a POST request to one of my websites which uses Cloudflare. but it returns Failed to connect to port 443: Connection refused I thought it might be the Cloudflare firewall that is blocking the connection, and I tried creating a firewall rule in the Cloudflare panel that allows my IP address. it didn't work. I contacted my hosting and they said their firewall is not block ...

Score: 2
ndd avatar
Since Sep 30 14:01:15 2021 GMT any software using openssl <=1.0 (like curl, php etc.) can't connect to hosts with Let’s Encrypt certificates
ru flag

Since Sep 30 14:01:15 2021 GMT any software using openssl <=1.0 (like curl, php etc.) can't connect to hosts with Let’s Encrypt certificates

* SSL certificate problem: certificate has expired
Score: -1
How can I disable IP forwarding from IPv6 toIPv4
us flag

I have IPv4 and ipv6 addresses on my network card, when I send a request with curl I want only the respective IPv4 or IPv6 to be used and no fallback e.g. When IPv6 to IPv4 takes place.

curl --interface XXXX: c020: XXXX: e601: XXXX: 596c: XXXX: db97

curl: (45) bind failed with error 22: Invalid argument

curl -x http: // [2603: XXXX: 8003: e601: XXXX: 596c: XXXX: db97]: 8080 ...
Score: 0
northport avatar
cURL POST bash script adds single quotes to variables with spaces
us flag

The first 3 variables will always have no spaces. The fourth "slacksitename" has spaces

slacksitename:”123 Main St"

When called with cURL

curl -X POST -H 'Content-type: application/json' --data '{"text":"’$slacksitename': '$ip' '$record_name' DDNS updated.”}’ $slackuri

The output is as follows:

curl -X POST -H 'Content-type: applicat ...
Score: 0
Dan Wilt avatar
Why is my PHP CLI Curl version different from curl and libcurl even if I try to force it with --with-curl flag during compilation?
jp flag

I have compiled PHP after compiling Curl 7.73 .

Curl -v shows me it's 7.73, and if I go to my web server and check phpinfo() output it's also 7.73 .

However, the compiled php cli is showing me that it's running Curl 7.68 !

To confirm this, I checked the output of php --ini and also ran a script from cli to get the output of curl_version() .

In order to try to force php cli curl version to be 7.73 I recomp ...

Score: 0
Port 80 not open. Still gets 404 when curl
de flag

Weird issue I'm facing currently! There is nothing running on port 80.

Still curl gives 404 page not found. I can telnet to port 80 and even start a container exposing port 80 (host). But no requests reaches the container!

Any idea what might be going on? How do I debug this?

$ netstat -tulpn | grep :80
tcp        0      0  *               LISTEN      -                   
Score: 0
John Doe avatar
Jenkins maven curl - Can't open target/**.war
cz flag

I'm trying to deploy war file using Tomcat manager remote deploy script but I get the error 'Can't open 'target/**war' file. I'm following a tutorial and it works for the author. article says

The curl command line utility is mainly intended for one-shot file transfers, it doesn't support wildcards per se.

So ho ...

Score: 3
Anon957 avatar
Upgrading command line tools to support TLS1.3 on Amazon Linux 2
tr flag

A server I need to communicate with only allows TLS1.3 traffic.

I have thus updated the version of OpenSSL bundled with Amazon Linux 2 to OpenSSL 1.1.1c. Following this guide

I am now able to use TLS 1.3 using OpenSSL e.g. openssl s_client -connect -tls1_3.

I need other command line tools such as cURL and Git to use this updated version of OpenSSL so they can communicate to the server  ...

Score: 2
Ken Tsoi avatar
cURL can connect to localhost but browser cannot
th flag

My system is Win10 with WSL2, I ran a gogs docker container (from ubuntu in WSL):

    83b2a8833235   gogs/gogs                    "/app/gogs/docker/st…"   17 minutes ago   Up 17 minutes>22/tcp, :::10022->22/tcp,>3000/tcp, :::10080->3000/tcp       gogs

I found that I can cURL it, but cannot use browser to visit it:

    >curl -vvv http://localhost:10 ...
Score: 0
Eamon Donovan avatar
Automatic captive portal detection is problematic because some networks redirect outbound traffic and others block DNS requests entirely
in flag

I am trying to automate captive portal detection on an IoT device. My basic understanding of a typical captive portal is that it checks a device's MAC address on connection, and if the device's user hasn't already agreed to the network owner's T&Cs then it will redirect all outgoing traffic to its splash page. This is easy to check for with curl, because if we try to access a known URL and get a 3XX ...

Score: 0
Orphans avatar
Sending a malicious package as a test to test Suricata alerts
cn flag

I have a reverseproxy that proxies HTTP/HTTPS traffic between webbservers and I have set up Suricata in order to find and block malicious traffic to it.

Is there any way to trigger a alert via a CURL-request? Does the EICAR-test work?

I have done some googling but I could not find something straight-forward in order to trigger Suricata with curl.

Score: 0
Max H. Balsmeier avatar
wget or curl timeout after connection established, before download begins
do flag

I need to download data from a server in batch operations. The server shows the following behaviour with approximately 30 % of the downloads:

  1. DNS works, host gets resolved.
  2. Connection gets established.
  3. Download does not even begin (no data is sent).

Therefore I need to retry a few times until it works. The problem is that if the download does not begin within one second, it hangs forever. Therefore ...

Score: 0
soundtruck avatar
Building cURL with NSS on Ubuntu server fails
in flag

On a fresh ubuntu 21.04 x64 or 20.04 lts x64 I do:

apt install build-essential
tar -xvzf curl-7.77.0.tar.gz 
cd curl-7.77.0/
apt install libnss3-dev
./configure --with-nss

That's what I get:

Making all in lib
make[1]: Entering directory '/root/curl-7.77.0/lib'
make  all-am
make[2]: Entering directory '/root/curl-7.77.0/lib'
  CC       libcurl_ ...
Score: 0
install curl 7.77 with http3 TLS-SRP SSPI ECH cent os 7
bq flag

I'm trying to install curl 7.77 (libcurl) with all options (I also wan to try http3)...

I downloaded from and decompresse it, I ./configure like this

./configure --with-ssl --with-bearssl --with-gnutls --with-mesalink --with-nss --with-openssl --with-polarssl --with-wolfssl --with-mbedtls --with-winssl --with-darwinssl --with-libssh2 --with-libssh --with-quiche --with ...