|
needs some curl help
Could someone explain to me why my curl string is breaking...
WORKING: https://fqdn.net/
Code:
$ curl -k -u user:pass -e https://anexternalpage.net/ -A "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.4) Gecko/2008102920 Firefox/3.0.4" -v https://anexternalpage.net/
* About to connect() to anexternalpage.net port 443 (#0)
* Trying 68.180.206.184... connected
* Connected to anexternalpage.net (68.180.206.184) port 443 (#0)
* successfully set certificate verify locations:
* CAfile: /usr/local/share/curl/curl-ca-bundle.crt
CApath: none
* SSLv2, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
* SSLv3, TLS handshake, CERT (11):
* SSLv3, TLS handshake, Server key exchange (12):
* SSLv3, TLS handshake, Server finished (14):
* SSLv3, TLS handshake, Client key exchange (16):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSL connection using DHE-RSA-AES56-SHA
* Server certificate:
* subject: /C=US/ST=Colorado/L=Englewood/O=Gator Inc./CN=anexternalpage.net
* start date: 2008-10-14 00:24:05 GMT
* expire date: 2009-11-14 01:24:05 GMT
* common name: anexternalpage.net (matched)
* issuer: /C=US/O=Equifax/OU=Equifax Secure Certificate Authority
* SSL certificate verify ok.
* Server auth using Basic with user 'username'
> GET / HTTP/1.1
> Authorization: Basic amV2ZWlsbyZDphZXJpbzkwMA==
> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.4) Gecko/2008102920 Firefox/3.0.4
> Host: anexternalpage.net
> Accept: */*
> Referer: https://anexternalpage.net/
>
< HTTP/1.1 200 OK
< Date: Thu, 04 Dec 2008 04:12:39 GMT
< Server: Apache/2.2.8 (FreeBSD) mod_ssl/2.2.8 OpenSSL/0.9.7e-p1 DAV/2 PHP/5.2.6 with Suhosin-Patch mod_auth_kerb/5.3
< Last-Modified: Fri, 19 Sep 2008 17:55:59 GMT
< ETag: "b358b-4cd-4574369f609c0"
< Accept-Ranges: bytes
< Content-Length: 1229
< Content-Type: text/html
<
<html>
<head>
--chopped for brevity and my own job secuirty.. hehe.
</body>
</html>
* Connection #0 to host anexternalpage.net left intact
* Closing connection #0
* SSLv3, TLS alert, Client hello (1):
$
DOESN'T WORK: https://fqdn.net/cgi-bin/and?some&really=long&string..
Code:
$ curl -k -u user:pass -e https://anexternalpage.net/nag/cgi-bin/status.cgi?host=all&servicestatustypes=28&serviceprops=10&hostprops=10&sorttype=2&sortoption=3 -A "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.4) Gecko/2008102920 Firefox/3.0.4" -v https://anexternalpage.net/nag/cgi-bin/status.cgi?host=all&servicestatustypes=28&serviceprops=10&hostprops=10&sorttype=2&sortoption=3
[1] 40941
[2] 40942
[3] 40943
[4] 40944
[5] 40945
[6] 40946
[7] 40947
[8] 40948
[9] 40949
[10] 40950
$ -bash: -A: command not found
curl: no URL specified!
curl: try 'curl --help' or 'curl --manual' for more information
^C
Code:
[1] Exit 2 curl -k -u user:pass -e https://anexternalpage.net/nag/cgi-bin/status.cgi?host=all
[2] Done servicestatustypes=28
[3] Done serviceprops=10
[4] Done hostprops=10
[5] Done sorttype=2
[6] Exit 127 sortoption=3 -A "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.4) Gecko/2008102920 Firefox/3.0.4" -v https://anexternalpage.net/nag/cgi-bin/status.cgi?host=all
[7] Done servicestatustypes=28
[8] Done serviceprops=10
[9]- Done hostprops=10
[10]+ Done sorttype=2
$
Why isn't it looking at the command as one vs. multiple commands and more importantly, how can I work around it? Could the request to cgi-bin have anything to do with it?
I'm working with..
FreeBSD 6.3-RELEASE #2
Curl 7.18.0
Also, here is the FF interaction if it helps any. FF doesn't complain 
Code:
https://anexternalpage.net/nag/cgi-bin/status.cgi?host=all&servicestatustypes=28&serviceprops=10&hostprops=10&sorttype=2&sortoption=3
GET /nag/cgi-bin/status.cgi?host=all&servicestatustypes=28&serviceprops=10&hostprops=10&sorttype=2&sortoption=3 HTTP/1.1
Host: anexternalpage.net
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.4) Gecko/2008102920 Firefox/3.0.4
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Authorization: Basic amV2ZWlsbGFyZhZXJpbzkwMA==
HTTP/1.x 200 OK
Date: Thu, 04 Dec 2008 04:38:16 GMT
Server: Apache/2.2.8 (FreeBSD) mod_ssl/2.2.8 OpenSSL/0.9.7e-p1 DAV/2 PHP/5.2.6 with Suhosin-Patch mod_auth_kerb/5.3
Cache-Control: no-store
Pragma: no-cache
refresh: 90
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Last-Modified: Thu, 04 Dec 2008 04:38:16 GMT
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html
----------------------------------------------------------
Please, any info would be greatly appreciated.
|