Questions tagged [curl]

cURL is a CLI tool for issuing HTTP GET, POST, & PUT request.

Filter by
Sorted by
Tagged with
0
votes
1answer
15 views

curl with headers loop syntax issue

I'm trying to do some API REST requests with the curl loop command below. With a first list of URL (with REST request inside), this works perfectly, with a second one I get "curl: (3) Illegal ...
0
votes
2answers
1k views

403 http code appears when I go to a certain website

I wrote a PHP script to a particular site using a home computer for debugging. Script worked properly, when I tested it on a home computer. The script has stopped working when I deploy the script on ...
0
votes
1answer
81 views

How to install php7.2-curl on a Debian 10? It depends on libcurl3 that is not available

I need php7.2-curl. But on Debian 10 apt says that it cannot be installed due to a dependency with libcurl3. But libcurl3 cannot be installed (it gives me no reason). Must I rollback to Debian 9.9? ...
0
votes
1answer
909 views

curl in Jenkins, [closed]

What i want to do is: The 1st curl command output will be the input of the 2nd curl command... Have a jenkins build which originally runs a curl commands such as: curl -u $user:$PS -h "content-type:...
1
vote
1answer
27 views

Understanding fetching mutiple URLs and documents using curl

It's not clear to me how to fetch multiple documents using curl mainly because I do not fully understand the explanation in the curl documentation The curl documentation says: -o, --output <file&...
21
votes
4answers
11k views

What's the difference between `curl | sh` and `sh -c “$(curl)”`?

One easy install method for Docker (for example) is this: curl -sSL https://get.docker.com/ | sh However, I have also seen some that look like this (using the Docker example): sh -c "$(curl -sSL ...
0
votes
0answers
19 views

Can't curl without port 80 open, but port 80 shows as open anyway

So I made a apache server and put a page up, and it should be accessible on port 80 (so default), and I should be able to curl it. Apache listens on port 80 (/etc/httpd/conf/httpd.conf) But when I ...
1
vote
2answers
4k views

curl authentication works but I cannot reach other pages

I'm trying to use cURL to automate some processes that we usually do using a website. I was able to login to the website using curl and the following command: curl -k -v -i --user "[user]:[password]"...
52
votes
4answers
174k views

Set a network range in the no_proxy environment variable

I'm in a network using a proxy. I've got machines using lots of scripts here and there accessing each other over HTTP. The network is 10.0.0.0/8. My proxy is 10.1.1.1:81, so I set it up accordingly: ...
4
votes
1answer
1k views

TOR hidden service not always accessible through cURL. Takes multiple tries

When I try to access a hidden service on TOR using cURL, for some reason I'm not getting access to the site 100% of the time. Many times it returns "curl: (7) Can't complete SOCKS5 connection to 0.0.0....
2
votes
1answer
62 views

curl delete command won't work in scripted for loop

Is there any reason why a curl command won't work with variables? Here is my set up - I am not using real values as I can not expose client data and I have no test environment. You will notice that ...
0
votes
0answers
30 views

Transfer multiple files using curl over TFTP [duplicate]

I have to copy files from a host computer(windows based) to a hardware (both are on the same network, the hardware is proprietary and have certain limitations). So , I run the TFTP server on the host ...
0
votes
1answer
26 views

How to import pgp keys from a search on an keyserver using curl?

Is there a standard method for searching and importing a pgp key using curl or wget? I was going through verifying the download with a gpg signed shasum256 file and encountered the problem of trying ...
1
vote
1answer
810 views

How to upload a file to FTP via curl but from stdin?

Basically, I'm trying to do this: some_other_program | curl ftp://username:password@192.168.1.10/file.txt As a test case to see if I can get it working, I'm trying it with cat like so: cat test.txt ...
3
votes
3answers
2k views

How do I post something using cURL that starts with `@`?

The command curl http://localhost/ --data @hello will try to read from file hello. How do I escape the @ symbol?
0
votes
1answer
907 views

Curl fails to download a file during start up

I am adding startup script in Ubuntu with update-rc.d. My script says : #!/bin/bash nohup curl -C - -o ~/Downloads/linuxmint-17-xfce-dvd-64bit.iso.part 'http://mirror.umd.edu/linuxmint/images/...
0
votes
1answer
26 views

How can I extract status code digits from curl?

I am writing a plugin and I want to extract a status code from my curl request: curl -I localhost | grep HTTP; Right now I have % Total % Received % Xferd Average Speed Time Time Time ...
0
votes
1answer
37 views

Cronjob fetching JSON with cURL. Check if response isn't empty before writing to file

I'm running Ubuntu and got a simple cronjob fetching a remote JSON-file and (over)writing it to the server. */15 * * * * /usr/bin/curl -m 120 -s https://path/to/remote/json.json > /store/json/here....
1
vote
0answers
29 views

Curl sftp download returns error 9, access denied to remote resource [closed]

I am having trouble downloading files with command-line curl from an sftp site. Files which I uploaded myself (by using the same account) can be downloaded again with no trouble. Files which were put ...
2
votes
1answer
4k views

SSL Certificate Problem: unable to get local issuer certificate

I am having small initramfs with static busybox into it. The sole purpose of this initramfs is to download/upload files to the HTTPS server. I have the proper certificate and credentials to do so. ...
0
votes
1answer
27 views

trim using sed to get the exact value from curl

I'm getting this string data from curl command {"password": [["passwordreal", "2035/01/01 00:00"]], "user": "user1", "address": "kobebkokoko.net"} How do I get passwordreal using sed? Example, ...
4
votes
3answers
13k views

How to trust self-signed certificate in cURL command line?

I've created a self-signed certificate for foo.localhost using a Let's Encrypt recommendation using this Makefile: include ../.env configuration = csr.cnf certificate = self-signed.crt key = self-...
2
votes
1answer
1k views

Curl NSS / SSL error after update

I use a custom internal authentication server. With the last round of updates it started having issues, apparently due to a change in the ciphers. This is on a CentOS6 box, fully updated. curl https:...
0
votes
0answers
14 views

Problem with the limit of requests api youtube v3 search

I execute the following command: curl -G https://www.googleapis.com/youtube/v3/search \ -d part="id" \ -d q="es-por-ti-juanes" \ -d maxResults="1" \ -d key="..........." \ -d type="video" \ -d ...
0
votes
2answers
2k views

Debian 9.4: cannot install php7.2-curl

Trying to install php7.2-curl library from a well-known repository deb.sury.org on Debian 9.4. But it gives the error: The following packages have unmet dependencies: php7.2-curl : Depends: libcurl4 ...
0
votes
2answers
54 views

Get web page complete data

I'm using busybox tools and I want to take all http links in a web page. I save an example link page by using curl or wget. However, it saves the page as html. How to do it with curl or wget commands? ...
3
votes
3answers
3k views

Sanitize Json for sending with Curl

I have to send a POST request to some service with json payload, and it includes some user input. That input variable needs to be Json-encoded to prevent injection attacks. Code example that ...
0
votes
1answer
41 views

RH 7.5 Linux using curl with sftp to pull multiple files ending in a particular file extension

I am in a Red Hat Linux 7.5 environment. I am trying to write a curl script to pull/receive any file from a folder that ends with a particular file extension. Previously, I have written a script to ...
428
votes
3answers
587k views

Does curl have a --no-check-certificate option like wget?

I am trying to make a curl request to one of our local development servers running a dev site with a self-signed SSL cert. I am using curl from the command line. I saw some blog posts mentioning that ...
-1
votes
1answer
14 views

how to download ebi fastq link via command line using wget/curl

I have loads of data (fastq) to download from ENA database. Example: ERS076383 ERS012262 ERS160574 ERS349280 etc Link to download via browser: https://www.ebi.ac.uk/ena/data/warehouse/filereport?...
245
votes
3answers
128k views

What is the difference between curl and wget?

I am keen to know the difference between curl and wget. Both are used to get files and documents but what the key difference between them. Why are there two different programs?
0
votes
2answers
2k views

Curl not returning response

I have a scenario where I was using curl --noproxy "*" https://.. to get the response but suddenly when I use it now it doesn't return me the response instead it says curl: (60) Peer certificate ...
1
vote
1answer
103 views

Bash script curl input variable from command line

I would like to be able to pass in what environment when script is run. Like script.sh dev ($dev would populate appropriate URL in curl command in script). Maybe even print the environment as options ...
0
votes
0answers
22 views

Binary Output from Curl [duplicate]

When I executed the command: curl https://piwik.openstreetmap.org/piwik.php?idsite=1 I received a warning that binary output can mess up my terminal, which, yes it did having ignored the warning, so ...
1
vote
2answers
7k views

What is the meaning of “curl -k -i -X” in Linux?

I have read the man pages of Curl, but I can't understand what those parameters (k, i and X) mean. I see it used in a REST API call, but can someone please explain what those three parameters do? It's ...
0
votes
4answers
49 views

how to capture IP address from info

by the following api we can get the info about master1/2 machines curl -sH "X-Requested-By: ambari" -u "admin"":""admin" -i http://192.23.39.2:8080/api/v1/hosts?fields=Hosts/host_name,Hosts/ip | ...
0
votes
1answer
2k views

how to put variable in CURL header using shell script?

I want to call an API using shellscript but I m not able to put header properly...whats going wrong in my script... thanks in advance. shell script : #!/bin/bash curl -H "Authorization: Basic ...
1
vote
0answers
66 views

Curl download speed restricted when down/uploading from stdin/stdout

I'm running 2 curl commands where one downloads all the data into stdout/in until the stack is filled and another uploading whatever is in it out but it seems like the speed is restricted. For the ...
0
votes
1answer
19 views

asus ac68 merlin curl ignore http_proxy

asus ac68 is a router. I have installed the latest firmware(merlin) 384.11. curl -V curl 7.64.1 (arm-unknown-linux-gnu) libcurl/7.64.1 OpenSSL/1.0.2r zlib/1.2.5 Release-Date: 2019-03-27 Protocols: ...
32
votes
8answers
150k views

Health check of web page using curl

I'd like to do a health check of a service by calling a specific url on it. Feels like the simplest solution would be to use cron to do the check every minute or so. In case of errors, cron sends me ...
0
votes
0answers
18 views

Automatically upload directory to dropbox in no time (whenever any changes done to that directory

I installed the following Script on my CentOS 7 terminal access. I'll use this script to upload specific directory from the Linux to dropbox. using the following command i can upload the directory ...
-2
votes
1answer
728 views

Shell script curl limit the try time for page not found

I found following code to check web url. if curl --output /dev/null --silent --head --fail "$url"; then echo "URL exists: $url" else echo "URL does not exist: $url" fi Here if the page not ...
1
vote
2answers
104 views

php curl not getting installed on Debian 8 [duplicate]

I am using linux debian 8. I have webmin/virtualmin installed and 1 domain is running over the server. Php version is 7.1. But, i can not run curl on my server. i tried to install curl but it throws ...
1
vote
0answers
21 views

After setcap on executable, curl_easy_perform throws out of memory error

I've cross compiled an executable to run on Debian Stretch that requires a specific version of cURL (greater than 7.56) to run, and needs specific capabilities during execution. So on the executable ...
2
votes
1answer
3k views

Curl 7.27: [ANY]_PROXY set; curl does not resolve the hostname via proxy

I'm using curl with a Socks proxy. The proxy is configured via ANY_PROXY="socks5://NNN.NNN.NNN.NNN.PPPP" I observed that curl resolves the hostname locally, not via the proxy. When requesting a URL ...
1
vote
1answer
17 views

Terminology used in the manual for the curl package

An extract from the manual for the curl package reads: Using --anyauth is not recommended if you are doing uploads from stdin, since it may require the data to be sent twice and the client must be ...
0
votes
2answers
38 views

Phantom binary installed with curl

I upgraded binary youtube-dl following this instruction. locate seems to find it, not ls, and it cannot be invoked. What is happening? /usr/bin $ sudo apt-get remove youtube-dl /usr/bin $ sudo curl -...
8
votes
3answers
21k views

Setting jq output to a Bash Variable

I'm using curl to get JSON back from a rest api like this: content=$(curl -s -X GET -H "Header:Value" http://127.0.0.1:8200/etc) echo "${content}"| jq -r '.data.value' which produces the value I ...
0
votes
1answer
264 views

Download ZIP file of private GitHub repository using `wget` like `curl`

There are already some questions with answers how to download the ZIP file of GitHub repositories, but they don't work if the repository is private. I know it should work with wget somehow since it ...
2
votes
1answer
2k views

How to Resolve undefined reference to 'RAND_egd'

Debian 8 Jessie, OpenSSL version 1.1.0, cURL version: 7.50.2 I am trying to build curl on a Linux Debian system. All stages go well up until trying to build with make command. The linking stage fails ...