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

learn more… | top users | synonyms

1
vote
0answers
68 views

How to avoid curl trying IPv6 name resolution

From a docker container when I try to curl 'another container name', curl first tries to resolve the name to IPv6. This causes few seconds delay because the web server is not reachable over ipv6. I ...
1
vote
1answer
419 views

How to fix curl sslv3 alert handshake failure on Gentoo?

I'm trying open a website with cURL like this: $ curl -vH "Accept: application/json" https://www.rocketleaguereplays.com/api/replays/-1/ The output is: * Trying 104.24.114.83... * Connected to ...
1
vote
1answer
70 views

Script a mobile recharge website

I recently come to know that I can curl a website using the bash command curl --user user:pass xyz.com I have an idea for recharging my mobile using the bash script. I want to write a script which ...
2
votes
1answer
425 views

Filtering JSON request with JQ and bash scripting

I'm requesting a JSON from Twitch with: curl --silent -H 'Accept: application/vnd.twitchtv.v3+json' -X GET https://api.twitch.tv/kraken/streams/$1 where $1 is the input I send for my function. Now ...
0
votes
1answer
850 views

Why is curl failing write to body?

I am trying to install pathogen.vim plugin with following command: mkdir -p ~/.vim/autoload ~/.vim/bundle && \ curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim But it is ...
1
vote
3answers
53 views

Joining two parts together to make a single script

I'm trying to create a script to do the following: extract the magnet link from a lynx bookmark and then use it as part of a curl command. like this: curl http://my_ip:my_port_number/startdownload/...
1
vote
2answers
82 views

downloading images from webpage with different links

I am trying to download all the images from a webpage. The images are included as follows: <img src="https://alwaysSamePart.com/SomeRandomLinkThatVaries.jpg"> How should I parametrize my wget ...
0
votes
0answers
514 views

How to get curl progress bar in terminal?

I'm using curl to upload files from a bash shell. I know there's the option --progress-bar which is supposed to give an upload progress indicator, but no matter what, I can't get it to show. I do ...
1
vote
2answers
207 views

Copy output of curl to file

I'm running raspbian and using this bash script to take a photo every minute and upload it to my FTP server: #!/bin/bash while [ 1 ]; do DATE=$(date +"%Y-%m-%d_%H_%M_%S") raspistill -q 10 -th none ...
0
votes
0answers
458 views

Curl fails with ntlm proxy

My work uses an NTLM proxy. On my Linux servers and workstations we us cntlm to authenticate. I'm not having any issues with yum,wget, or the web browser, but for some reason curl refuses to work ...
0
votes
1answer
145 views

cURL: Request to http and https by default

A server is running on 5000 port. I have to write a bash script to cURL that URL and parse the response. Here the problem is server can run on either http or https protocol. That means I have curl ...
0
votes
0answers
41 views

Creating a manual delay (30 seconds) on server side (VSFTPD ) - while a bash client sends to it some files using curl

I have created a shell script in ubuntu that connects to a vsftp server using curl and transfer some files. In my testing 3 files and each file will take 0.3 seconds to get transferred (very fast to ...
1
vote
1answer
86 views

Get page in curl as text

Is there any option for curl that saves a page as text? I mean, in the same way a page can be saved in browser as Text Files. At least, Firefox has that option. I need it for a script, I simply ...
0
votes
2answers
215 views

Parsing HTTP response with shell

I want to parse below HTTP response but I cannot figure out how to grep the values separately using a single curl request. I need these two output. 1. status_code - (Array of HTTP status codes) 2. ...
0
votes
2answers
320 views

curl hangs after client hello

When I execute the following command in Ubuntu: curl -v --insecure -XGET 'https://user:pass@IP_ADDR:PORT/SOME_FILE.php' I get this output: * Hostname was NOT found in DNS cache * Trying IP_ADDR....
1
vote
0answers
221 views

curl --data-urlencode and underscores

I've been using curl -XPOST to post some links to a Telegram channel via a bot api/key, the urls are in form of https://site/x/pre_encoded_string, where pre_encoded_string is in form (real samples) ...
0
votes
0answers
69 views

curl fails to login in to my router

I wanted to port my reconnect script from iMacros to curl. iMacros was great because it acts like regular web browser and you can record your actions and then edit the code, but i'd like to port it to ...
1
vote
0answers
48 views

How to get all files of a certain type from a virtual web path?

I try to use wget to download certain files from a website. But probably the virtual locations of the files do not represent their actual location. For example, if the link to the file is http://file....
0
votes
1answer
230 views

Curl error (2) when trying to connect with sftp

I have confirmed that I can login via Telnet $ telnet ftp.domain.com 990 Trying xx.xxx.xxx.xx... Connected to ftp.domain.com. Escape character is '^]'. I am getting the following error when ...
1
vote
1answer
124 views

Delay FIN-ACK sent on linux

For a project I need to delay the FIN-ACK sent in an SSL connection on Linux. Is there any way to do this? I can send an https request by using curl https://www.google.com, but how do I modify the TCP ...
0
votes
2answers
22 views

curl stopped to post anything

In the below dev-netpro.sh script 'curl' does not post anything if my $FWK (i.e. '8fwk3_dev 2fwk0_dev' - could be up to 9 words) and $CON (in the example it is series of digits:'72 43 172 28021 8261 ...
1
vote
1answer
209 views

GET URI from webserver by IP address not matching hostname's IP

Using curl, I would like to request a URI from a web server via a specific IP address that does not necessarily match the forward DNS of the hostname. For example, suppose the hostname www.example....
1
vote
1answer
154 views

Launch web page secured with HTTP authentication from a terminal kiosk

I am trying to launch Chromium to open a specific webpage that requires username and password login details. I can open the webpage no problem from the terminal however I have been unable to so far ...
1
vote
1answer
65 views

Curl or Lynx: stripping Javascript possible?

I am doing corpus generation through curl or lynx of some web pages. I have written a program in bash to strip away the html code (e.g., when I do lynx -source myurl), but the problem is that some ...
2
votes
1answer
124 views

Error when substituting part of curl command with variable

I'm writing a script where I am running curl commands several times. The use of the curl command varies throughout the script and I would like to save myself time (in the future when I have to debug ...
0
votes
1answer
67 views

Does anyone know a good pastebin where I can easily pickup the code with curl?

I'm in a domU with nothing but a console to work with an internet connection. I need to configure a file in it that I feel is too long to just type by hand. So I want to pick it up from somewhere ...
0
votes
2answers
165 views

curl download multiple files with brace syntax

I am trying to download two files by the following syntax: curl -O http://domain/path/to/{file1,file2} The problem is that only the first file is actually saved locally, and the second was simply ...
0
votes
1answer
1k views

Connection refused on port 8081 using curl

I have two CentOS 7 boxes, called Turbo and Demo. I started a daemon/service on the first one, Turbo, and wish to call the service from the second one, Demo. I started the service to monitor port 8081....
2
votes
3answers
260 views

How to download files without full URL?

I was always wondering how to download the files through the Linux shell (I have wget, curl) that do not have a full URL of the file to be downloaded, but the full URL is passed e.g. to the browser ...
2
votes
3answers
303 views

curl page source from text file containing URLs

I have a text file containing up to 100 URLs. I am able to curl the page source from them using: cat /path/to/url.txt|xargs curl -o /path/to/output.txt This will download the page source for all of ...
1
vote
2answers
172 views

(Shell Script) Variable not pass correctly when fetching value from file?

I have this section of curl command inside my shell script which caused a error 500 repsonse from the server. However, this code works when I manually run the command. curl -qgsSkH "Content-Type: ...
0
votes
2answers
261 views

How to get the contents of a webpage but after running javascript?

I am trying to download the contents of a web page using curl but it seems l am missing some content that l suspect to be generated by JavaScript. If the page runs on the browser l am able to get all ...
2
votes
2answers
69 views

Extract info with curl or something

I plan to write a script for automatic VirtualBox build I see every release VirtualBox put a version (of course) and a release version. In this example http://download.virtualbox.org/virtualbox/5.0....
0
votes
1answer
26 views

Using xargs to generate links

I have a file that looks like this: abc,123,x xabc,345,xy cabc,6234,ab abgc,12,yo jabc,9991,to I need to generate a list of links: http://www.mywebsite.com?param1=abc&param2=123&param3=x ...
1
vote
1answer
988 views

Use curl to download list of files in csv

I have a csv of JPG url extensions. http://www.example.com/images/[url_extension] I want to use curl to loop through the CSV and download the jpg at each extension. So far I have the following, but ...
1
vote
0answers
241 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....
8
votes
2answers
408 views

What is most secure and simplest way to have a user-typed password on bash become part of stdin to a program?

I'm looking for the (1) most secure and (2) simplest way to have a user type a password on a bash shell prompt and to have that password become part of stdin to a program. This is what the stdin ...
1
vote
1answer
135 views

Pipe multiple file from curl to other program

I would like to download several images (from a server with a self-signed certificate) and view them all with feh. Is this possible with a single command? Something like curl -sk -b ...
0
votes
1answer
246 views

curl and wget cut off url

I have a web cms that allows so called action IDs which are urls. When you hit those, they perform some code in the cms. So I wanted to perform an action periodically and used cron for that. PROBLEM: ...
0
votes
3answers
101 views

Make curl/cat not scroll down when given long text?

I have made a program where I read the text from a url using curl. The problem is that when given texts that are larger than the terminal window, it automatically scrolls down to the bottom, I want to ...
1
vote
1answer
141 views

curl progress in dialog

how can i properly display the curl progress in the dialog window? curl http://mysite.corp/image/root_21.tar.bz2 | tar -C /mnt/dest/ -jxf - i tried this command but as you can see it does not ...
-2
votes
1answer
156 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
1answer
110 views

Using curl as a test [duplicate]

I'm writing Puppet configuration to automate the creation of an Elastic Search repository resource. Unfortunately, as far as I can tell, there's no way to specify this configuration in the Elastic ...
0
votes
1answer
1k views

Script with curl works manually but not in cron job

My script (status.sh) is: #!/bin/bash SITE=http://www.example.org/ STATUS=$(/usr/bin/curl -s -o /dev/null -I -w "%{http_code}" $SITE) if [ $STATUS -eq 200 ] then echo $STATUS >> /home/myuser/...
0
votes
1answer
48 views

Trying to request a variable before running a curl and read back as integer

echo -e "Enter layoutID: \c" read layoutID echo -e "Enter playlistID: \c" read playlistID echo -e "Enter siteID: \c" read siteID curl -H "Content-Type: application/json" -d '{"LayoutId":$LayoutId........
-1
votes
2answers
143 views

Curl, ping hangs/waits when using private network ips

I have a whole bunch of servers working inside my office premises private network. When I try to run my tests outside office network, curl/ping/python/nodejs requests library, all of them wait ...
1
vote
0answers
260 views

Using curl results in error: “Library not loaded: /usr/local/lib/libcurl.4.dylib …”

I had a few issues with the cURL library interfering with Homebrew. After hopefully removing the library (I no longer use it anyway), I started receiving errors whenever I used commands such as curl ...
3
votes
2answers
465 views

Embed “cat file” in CURL data

I would like to cat the contents of a file.txt and use this as part of the --data field in my curl query. I tried: curl ... --data '{ "file_content":[" $(cat file.txt) ", ...]}"' ... but that ...
2
votes
2answers
1k views

Execute CURL command only once in script?

To explain a little, I am currently monitoring a folder for any changes and when changes are detected it simply uploads the detected files to my server via rsync. This is working without any issues : ...
0
votes
3answers
258 views

Curl freezes when downloading from ftp

I'm trying to download a file from ftp server using curl: curl --user kshitiz:pAssword ftp://@11.111.11.11/myfile.txt -o /tmp/myfile.txt -v curl connects to the server and freezes: * Hostname was ...