Questions tagged [curl]

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

Filter by
Sorted by
Tagged with
-1 votes
5 answers
70 views

How to extract certain value from curl JSON output

I can't use, for some reasons, the jq command to parse curl JSON output. I need to extract certain fields using standard Unix tools like grep, awk, sed, etc. Example of curl output: [ { "...
user avatar
  • 11
0 votes
1 answer
73 views

How to send with curl JSON from another curl command output

I want to get JSON with curl command, so with below command I am getting output: curl -GET http://localhost:9200/oldindex/_mapping?pretty { "gl-events_1" : { "mappings" : { ...
user avatar
  • 31
0 votes
0 answers
108 views

SSL connect error (LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to crates.io:443 )

Today when I am using this cargo command in macOS Monteney to build the rust project: cargo build shows error like this: warning: spurious network error (1 tries remaining): [35] SSL connect error (...
user avatar
  • 363
0 votes
0 answers
17 views

Command line tool to use JS-enabled browser to save web page

I currently have a bash script that runs on a headless Raspi, using Curl to retrieve a small number of web pages* and then sed and comm to parse the html and send an email if the content differs from ...
user avatar
0 votes
1 answer
99 views

How to read a JSON file and then send via curl as HTTP POST in Unix Shell Script?

Am trying to read a JSON file from a Unix Shell Script (am inside the same dir as product.json) and send it using curl. curlProduct.sh: for file in ~/work/project/json/product.json do echo "$...
user avatar
0 votes
0 answers
63 views

Couldn't download an URL using curl or wget but it works in browser

I'm trying to download the below URL via terminal: https://wallpaperaccess.com/download/8k-graphics-4312822 I tried the below methods: curl -L "https://wallpaperaccess.com/download/8k-graphics-...
user avatar
  • 13
0 votes
0 answers
39 views

Curl resolving a URL

I'm attempting to get the following little program to work. Without the --resolve part it work fine but I need to able to resolve the URL within the program as I can't go adding a DNS to the systems ...
user avatar
  • 1
0 votes
1 answer
41 views

Count the number of words ends with specific character using Bash

Heys guys I wanted to count the number of words that end with 's' from this URL, https://matt.might.net/articles/what-cs-majors-should-know/ Here's what I did curl https://matt.might.net/articles/what-...
user avatar
0 votes
2 answers
25 views

How to install libcurl from git clone source (has configure.ac but is missing ./configure)

I'm trying to install libcurl from source, but it's missing the configure executable, so I can't run ./configure. How do I generate it? Here is my attempt: time git clone https://github.com/curl/curl....
user avatar
0 votes
1 answer
39 views

How to print domain name in the curl output

I am using xargs and curl command to get the response from the list of domains in the input file. xargs -n 1 curl -sS < input.txt 2>&1 | tee curltest It is hard to find which domain out is ...
user avatar
  • 717
0 votes
3 answers
64 views

Curl against list domains from a file not working

I have a bash script below that is intended to curl against a list of domains, from a file, and output the results. #!/bin/bash baseurl=https://csp.infoblox.com domains=/home/user/Documents/...
user avatar
  • 587
0 votes
0 answers
24 views

Oracle Linux 7.9 - SSL Handshake failure

I ran into a weird issue involving 2 Oracle Linux 7.9 machines running on 2 different OCI (Oracle Cloud Infrastructure) tenancies. The source and destination server are in different networks and have ...
user avatar
0 votes
1 answer
41 views

Installing node 14 on centos 7, how does it work?

The code for installing node 14 on centos7 is: RUN curl -sL https://rpm.nodesource.com/setup_14.x | bash - RUN yum -y install nodejs How does it work? The first command downloads the package. Where ...
user avatar
  • 101
0 votes
0 answers
83 views

Download a file without filename

I need to download a file that is located in a short URL. When I copy this URL in the browser, it takes a few seconds and then asks me to save the Excel file, but I'm trying to do it using curl or ...
user avatar
  • 9
0 votes
0 answers
41 views

curl -X GET is reaching the server with HTTP/1.1 200 OK but not producing expected output

I am using the below command: curl -X GET 'https://<my_account>.atlassian.net/rest/api/3/project/search' This returns "header" information indicating that that command was successful:...
user avatar
1 vote
0 answers
46 views

What causes my cURLs to fail on some Unix systems and work on others?

As some of you might have noticed on other sites in the network, I have a couple of scripts which fix broken images and links across Stack Exchange. Most of these scripts run automatically as a ...
user avatar
0 votes
0 answers
94 views

curl request with spnego authentication fails with "gss_init_sec_context() failed: : Success"

curl request with kerberos authentication fails. Checking the output with -v option, the output says: $ curl -v -u : --negotiate https://URL ... < Connection: keep-alive < Set-Cookie: ...
user avatar
  • 143
4 votes
1 answer
172 views

Why is curl, but not wget, having trust issues with software.download.prss.microsoft.com?

The following URL redirects to a microsoft.com subdomain: https://tb.rg-adguard.net/dl.php?go=3dd1ce66 Namely to https://software.download.prss.microsoft.com/db/Win10_20H2_v2_EnglishInternational_x64....
user avatar
  • 697
0 votes
2 answers
289 views

How to speed up curl?

I wrote a script on my Debian machine to read a file of URLs and output the HTTP Status code for each one: ... while read url do urlstatus=$(curl -H 'Cache-Control: no-cache' -o /dev/null --silent ...
user avatar
  • 265
0 votes
0 answers
35 views

How to resume a choked recursive wget download without download previous files again?

I'm on a recursive wget download using a command I searched somewhere, wget --recursive -np -nc -nH --cut-dirs=4 --random-wait --wait 1 -e robots=off https://... The directory has hundreds of pdfs, ...
user avatar
0 votes
1 answer
297 views

Command curl not found, even though it is installed

First I've installed curl: company@rb-VirtualBox:~$ apt install curl E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied) E: Unable to acquire the dpkg frontend lock (...
user avatar
  • 1,720
0 votes
1 answer
61 views

curl.h not found in manjaro

Everywhere people say you'll have to apt install libcurl. But I'm on manjaro and I have curl installed, there is no libcurl in the repo. No idea what to do now. In file included from ../main/main.c:1: ...
user avatar
  • 321
1 vote
1 answer
53 views

Assign variable to a file downloaded via curl with origin filename preserved

I have looked through several examples but I cannot find what I need. I am trying to dynamically assign the name of a file I am downloading to a variable so that I can refer to it later. I have to ...
user avatar
0 votes
1 answer
140 views

Trying to loop values into curl command from a file

I am not even sure if this is possible or not. I am trying to create a loop where i can curl with different values from a file. for i in `cat id`; do curl -X POST 'https:/myurl \ --header 'X-XX-...
user avatar
0 votes
0 answers
56 views

wget/curl command not getting the contents of a file from a link

I have a .bin file that I would like to download, it's around 10GB in size. The file can be found here (any of the 4 download links): http://mazajak.inf.ed.ac.uk:8000/#embedding-page. When I download ...
user avatar
  • 121
3 votes
2 answers
287 views

cURL inside script

I'm trying to troubleshoot some problem on FreeBSD server that is intermittently (at random times) being blocked by a network firewall from downloading some file over HTTPS from a webserver.  In an ...
user avatar
1 vote
1 answer
52 views

How can I display an image coming as a binary stream?

I would like to display an image that I am receiving from a curl command. For example, I would like to display it using Eye of Gnome. How can I do that? Something like: curl https://example.com/image....
user avatar
0 votes
0 answers
76 views

How to configure proxychains without TOR

I try to configure proxychains without tor I followed the procedure from this website . https://linuxhint.com/proxychains-tutorial/ and then i'm using the proxylist from the following site https://...
user avatar
0 votes
2 answers
70 views

I get a different html page using Ctrl+u and curl

When I go to a this web-page (https://imgur.com/user/Ultraruben/submitted for example) and press Ctrl+u, I get one web-page. When I try to extract the html through the command line with curl <url&...
user avatar
  • 3,606
0 votes
0 answers
82 views

MacOS - curl: (60) SSL certificate problem

On Mac(Catalina) I'm trying to re-install m4 package using terminal, However it fails with below errors. $ brew reinstall m4 ==> Downloading https://ghcr.io/v2/homebrew/core/m4/manifests/1.4.19 ...
user avatar
  • 123
0 votes
1 answer
54 views

how to make sure the proxy works or not in macOS iterm

Now I am set the proxy in .zshrc like this: alias proxy='export all_proxy=socks5://127.0.0.1:7890' and check using the env command in terminal, shows the proxy env value like this: all_proxy=socks5://...
user avatar
  • 363
0 votes
0 answers
58 views

How can I print grep results using curl in a shell script?

How can I print grep results in a shell script? This is my code: #url is https://batteryzone.pk/assets/kcfinder/browse.php read -p "Url: " url response=$(curl -Lsk $url | grep uploadURL) if [...
user avatar
0 votes
2 answers
87 views

Transfer Token value from one curl command to another

I want to transfer the value of one curl command that gets a token to another curl command. keeping the same value. This code will get a token value but when using another curl command it seems to ...
user avatar
0 votes
1 answer
1k views

How to make jq output into a variable

here is my code curl random args "link" | jq and gives it gives is { "id": "961438154596153411", "username": "testing", "avatar": &...
user avatar
0 votes
1 answer
84 views

Piping yes when running scripts from curl

I need to run the following script when making a new docker image. sh -c "$(curl -fsSL https://starship.rs/install.sh)" The above script asks me to proceed and I have to answer with y/N. ...
user avatar
0 votes
1 answer
107 views

Change /etc/hosts

I want this file from api.example.com/test/info.php to be taken from localhost/test/info.php. The idea is that I don't want all files from api.example.com to be taken from localhost, just the info.php ...
user avatar
0 votes
1 answer
483 views

curl -- via proxy -- how to ignore self signed certificate

I can access insecure sites: curl -k https://self-signed.badssl.com I can access a site with mitmproxy: curl --proxy 127.0.0.1:8080 --cacert ~/.mitmproxy/mitmproxy-ca-cert.pem https://google.com ...
user avatar
  • 264
3 votes
1 answer
65 views

aborting previous steps in curl, xargs pipe when head finishes

I'm trying to download a bunch of web pages, and once I've downloaded N lines of html, I want the whole thing to stop. But instead, the previous steps in the pipe just keep going. An example to see ...
user avatar
  • 155
0 votes
0 answers
66 views

How to end curl command

I want to execute a curl command curl "https://172%40-34%40-40%40-66.cl-api-tst.pod.dcr.non-prod.ichp.ing.net:8443/xyz/bla-bla/search/" but this command never ends and execute the terminal ...
user avatar
0 votes
1 answer
3k views

Curl bad URL (3)

I iterate through a file and I'd like to curl an api with the line (word) in the URL. The content of the list2csv.sh is: #!/bin/bash for word in $( cat $1 ) do echo "https://api....
user avatar
0 votes
1 answer
61 views

Disable CGI script buffering for web browsers

I have a tiny CGI script written in Perl which prints numbers from 1 to 10 with 1 second interval: root@debian-s-1vcpu-1gb-fra1-01:~# cat /usr/lib/cgi-bin/test #!/usr/bin/perl use strict; local $|=1; ...
user avatar
  • 6,378
0 votes
0 answers
108 views

Parameters into CURL string

I run this curl command: curl -i -U '<....>' 'https://download-flexnetoperations.com/512175/1386/317/18754317/${last_zip_file_name}?ftpRequestID=2 ...... At the end of the month I need to ...
user avatar
0 votes
1 answer
206 views

"curl" downloads .zip file as ASCII text (zipfile is not corrupted!)

I want to download package from Artifactory. If I download it manually from Artifactory UI, and transfer that file to Linux server (RHEL 8) I can see that file is in proper ZIP format: file arena-web....
user avatar
  • 188
0 votes
0 answers
163 views

Linuxmint 20.3: Update Manager won't start

Unable to start Update Manager from GUI or from terminal. Any suggestions? $ mintupdate $ Traceback (most recent call last): File "/usr/lib/linuxmint/mintUpdate/mintUpdate.py", line 18, in &...
user avatar
  • 1,354
0 votes
2 answers
121 views

How to find the number of jobs (created by gnu parallel) running in each CPU core at any given time?

I'm using gnu parallel that reads a text file containing curl commands. If I do ps -ef | grep -cw [c]url it shows total number of curl process at a moment. But I want to know number of gnu parallel ...
user avatar
  • 119
1 vote
0 answers
64 views

Why wasn't curl able to connect to bit.ly?

I was trying to install Hyperledger Fabric and the sample code and examples they have, following the instructions on their page. However, when I tried to execute the following command: curl -sSL https:...
user avatar
  • 111
1 vote
3 answers
287 views

GNU Parallel vs. xargs vs. Python tools - Sending 10000 reqs/second [closed]

I have 1000000 different requests (different request I mean it has different query param. It is just a GET request, and no payload. Size of request and response are in order of KBs only. no images or ...
user avatar
  • 119
-1 votes
1 answer
334 views

Curl Parallel requests using links source file

I have this script to go through a list of URLs and the check return codes using Curl. Links file goes like this: https://link1/... https://link2/... https://link200/... (...) The script: INDEX=0 DIR=...
user avatar
0 votes
3 answers
350 views

How to get the json data used in each curl statement while using xargs and maps it to its corresponding result?

I have text file that has arguments of curl command. This is how the file looks 'https://example.com/tl/' -X POST -H 'Content-Type: application/json' --data-raw '{"email":"username2&...
user avatar
  • 119
1 vote
1 answer
156 views

Make parallel http requests using raw data files

I've several files containg POST body requests. I'd like to send those requests in parallel. Related curl command is like: curl -s -X POST $FHIR_SERVER/ -H "Content-Type: application/fhir+json&...
user avatar
  • 285

1
2 3 4 5
20