De Wiki inetshell
Saltar a: navegación, buscar

Obtener codigo de salida[editar]

https://superuser.com/questions/272265/getting-curl-to-output-http-status-code

curl -s -o /dev/null -w "%{http_code}" https://www.google.com

Upload[editar]

curl -v -u username:password --upload-file file http://server/path/file

Revisar puerto usando usando cURL[editar]

curl -v telnet://192.168.1.1:8080

Mandar correo usando cURL[editar]

https://stackoverflow.com/questions/14722556/using-curl-to-send-email

https://stackoverflow.com/questions/10523147/what-are-the-curl-smtp-command-line-arguments-to-support-gmail-tls-starttls-vs-s

  • mail.txt
From: "Server" <[email protected]>
To: "User" <'[email protected]>
Subject: This is a test

Hi John,
I’m sending this mail with curl thru my gmail account.
Bye!
  • Using TLS:
curl --url 'smtp://mail.example.com:587' --ssl-reqd --anyauth --mail-from '[email protected]' --mail-rcpt '[email protected]' --upload-file mail.txt --user '[email protected]:password' --insecure
  • Using SSL:
curl --url 'smtps://smtp.gmail.com:465' --ssl-reqd --mail-from '[email protected]' --mail-rcpt '[email protected]'  --upload-file mail.txt --user [email protected]:password' --insecure