We are trying to invoke a https service from our unix script using curl command. The service is not getting invoked because it is SSL configured. Bypassing certification (using curl –k) does not work.
curl -k https://site
curl -k -x IP:Port https://site
curl -k -x IP:443 https://id:pwd@site
... (0 Replies)
Hi
I need a Shell script that will download a zip file every second from a http server but i can't use neither curl nor wget.
Can anyone will help me go about this task ???
Thanks!! (1 Reply)
i use curl and wget quite often.
i set up alarms on their output. for instance, i would run a "wget" on a url and then search for certain strings within the output given by the "wget".
the problem is, i cant get the entire output or response of my wget/curl command to show up correctly in... (3 Replies)
Hi,
My script needs to crawl the data from a third party site. Currently it is written in wget. The third party site is of shared interface with different IP addresses.
My wget works with all the IP address but not with one. Whereas the curl is able to hit that IP address and comes out... (2 Replies)
Experts,
I login to a 3rd party and pull some valuable information with my credentials. I pass my credentials via --post-data in wget.
Now my Account is locked. I want my wget to alert that the Account is locked. How can i achieve this.
My idea is, get the Source page html from the... (2 Replies)
Hello,
What I am trying to do is to get html data of a website automatically.
Firstly I decided to do it manually and via terminal I entered below code:
$ wget http://www.***.*** -q -O code.html
Unfortunately code.html file was empty.
When I enter below code it gave Error 303-304
$... (1 Reply)
i'm using this command to post data to a remote host:
wget --post-data="My Data" http://<my-ip>:80 -O /dev/null -q
and
curl --data "My Data" http://<my-ip>:80
however, when i run the above, i see the following in my access log on the remote host:
Wget:
10.10.10.10 - - "POST /... (1 Reply)
What can I use instead of wget/curl when I need to log into websites that use javascript?
Wget and curl don't handle javascript. (6 Replies)
Discussion started by: locoroco
6 Replies
LEARN ABOUT MOJAVE
curlinfo_primary_ip
CURLINFO_PRIMARY_IP(3) curl_easy_getinfo options CURLINFO_PRIMARY_IP(3)NAME
CURLINFO_PRIMARY_IP - get IP address of last connection
SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_PRIMARY_IP, char **ip);
DESCRIPTION
Pass a pointer to a char pointer to receive the pointer to a zero-terminated string holding the IP address of the most recent connection
done with this curl handle. This string may be IPv6 when that is enabled. Note that you get a pointer to a memory area that will be re-used
at next request so you need to copy the string if you want to keep the information.
The ip pointer will be NULL or pointing to private memory you MUST NOT free - it gets freed when you call curl_easy_cleanup(3) on the cor-
responding CURL handle.
PROTOCOLS
All network based ones
EXAMPLE
{
char *ip;
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
/* Perform the request, res will get the return code */
res = curl_easy_perform(curl);
/* Check for errors */
if((res == CURLE_OK) &&
!curl_easy_getinfo(curl, CURLINFO_PRIMARY_IP, &ip) && ip) {
printf("IP: %s
", ip);
}
/* always cleanup */
curl_easy_cleanup(curl);
}
AVAILABILITY
Added in 7.19.0
RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
SEE ALSO curl_easy_getinfo(3), curl_easy_setopt(3), CURLINFO_PRIMARY_PORT(3), CURLINFO_LOCAL_IP(3),
libcurl 7.54.0 March 22, 2017 CURLINFO_PRIMARY_IP(3)