Asterisk Telegram -

4

1990- , , , , , Curl. , - IRC . , , , .


curl

-V --version , .

$ curl --version

curl 7.47.0 (x86_64-pc-linux-gnu) libcurl/7.47.0 GnuTLS/3.4.10 zlib/1.2.8 libidn/1.32 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smb smbs smtp smtps telnet tftp 
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP UnixSockets

, curl -O -o. , , / .

$ curl -O http://merionet.ru/yourfile.tar.gz # Save as yourfile.tar.gz
$ curl -o newfile.tar.gz http:// merionet.ru /yourfile.tar.gz # Save as newfile.tar.gz

- (, Ctrl + c), . -C - ( C, , ) curl , .

$ curl -C - -O http://merionet.ru/yourfile.tar.gz

info.html about.html http://merionet.ru http://wiki.merionet.ru .

$ curl -O http://merionet.ru/info.html -O http://wiki.merionet.ru/about.html

URL

curl xargs, URL- .

$ xargs -n 1 curl -O < listurls.txt

-, 8080 proxy.yourdomain.com, :

$ curl -x proxy.merionet.ru:8080 -U user:password -O http://merionet.ru/yourfile.tar.gz

-U user: , .


HTTP

HTTP - . , .

HTTP , :

$ curl -I www.merionet.ru

.


POST

firstName lastName https://merionet.ru/info.php.

$ curl --data "firstName=John&lastName=Doe" https://merionet.ru/info.php.

HTML.


FTP-

FTP- ftp://yourftpserver, yourfile.tar.gz .

$ curl -u username:password -O ftp://yourftpserver/yourfile.tar.gz

-u username: password, FTP- .


FTP-

mylocalfile.tar.gz ftp://yourftpserver curl, :

$ curl -u username:password -T mylocalfile.tar.gz ftp://yourftpserver

, HTTP-. , , .

$ curl -I http://localhost --user-agent "New web browser"

Cookies

, cookie , https://www.cnn.com? , cnncookies.txt. cat .

$ curl --cookie-jar cnncookies.txt https://www.cnn.com/index.html -O

cookie

cookie, , .

$ curl --cookie cnncookies.txt https://www.cnn.com

- merionet.ru, , curl http://www.merionet.ru :

$ curl --resolve www.merionet.ru:80:localhost http://www.merionet.ru/

, http://www.merionet.ru curl localhost DNS /etc /hosts.


, 100 / .

$ curl --limit-rate 100K http://merionet.ru/yourfile.tar.gz -O

?


: