Cách tham số cần biết khi dùng lệnh Curl

TricksMMO

Administrator
Staff member
** Cách sử dụng Curl với trang web với Giao thức HTTPS **

Curl là một công cụ dòng lệnh cho phép bạn chuyển dữ liệu đến hoặc từ máy chủ, sử dụng bất kỳ giao thức được hỗ trợ nào (HTTP, FTP, IMAP, POP3, SCP, SFTP, SMTP, TFTP, Telnet, LDAP hoặc tệp).Curl được cung cấp bởi libcurl.Công cụ này được ưu tiên để tự động hóa vì nó được thiết kế để hoạt động mà không cần sự tương tác của người dùng.Curl có thể chuyển nhiều tệp cùng một lúc.

** Thêm người giới thiệu với lệnh Curl **

Nếu bạn muốn truy cập trang web bằng lệnh CURL, hãy sử dụng tham số `-Referer`.Ví dụ:

`` `
Curl -Referer 'Google.com' -K Tricksmo.com
`` `

** Thêm người giới thiệu trống với lệnh Curl **

Sử dụng 2 Dấu đơn liên tục `''`.

`` `
Curl-Refeferer '-K Tricksmo.com
`` `

** Thêm tác nhân người dùng với lệnh Curl **

Tác nhân người dùng giúp máy chủ web xác định thiết bị, trình duyệt của bạn bạn đang truy cập trang web.Để sử dụng tác nhân người dùng với các lệnh Curl, bạn thêm tham số `--User-Agent`.

Đặt tác nhân người dùng trong lần nhấp kép `" `.

`` `
Curl --User -Agent "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_0) Applebkit/535.11 (Khtml, như Gecko) Chrome/17.0.963.65 Safari/535.11" -K
`` `

** Thêm tác nhân người dùng trống với lệnh Curl **

Sử dụng 2 lần nhấp đúp hoặc 2 lần nhấp đơn liên tục

`` `
Curl --User -ag "" -K Tricksmo.com
`` `

**Ví dụ:**

`` `
Curl -K Tricksmo.com
`` `
=======================================
**How to use curl with website with https protocol**

Curl is a command-line tool that allows you to transfer data to or from a server, using any supported protocol (HTTP, FTP, IMAP, POP3, SCP, SFTP, SMTP, TFTP, Telnet, LDAP or File). Curl is provided by Libcurl. This tool is prioritized to automate because it is designed to operate without the need for user interaction. Curl can transfer multiple files at the same time.

**Add referrer with curl command**

If you want to access the website with a curl command, use a parameter `--Referer`. For example:

```
curl --referer 'google.com' -k tricksmmo.com
```

**Add empty referrer with curl command**

Use 2 continuous single marks `''`.

```
curl --referer '-K tricksmmo.com
```

**Add user-agent with curl command**

User-agent helps webserver to identify equipment, your browser you are visiting the site. To use user-agent with curl commands, you add the parameter `--user-agent`.

Place the user-agent in the double click `"`.

```
curl --user-agent "mozilla/5.0 (macintosh; Intel mac os x 10_7_0) Applebkit/535.11 (khtml, like gecko) chrome/17.0.963.65 Safari/535.11" -K tricksmmo.com
```

**Add empty user-agent with curl command**

Use 2 double clicks or 2 continuous single clicks

```
curl --user-ag "" -K tricksmmo.com
```

**Example:**

```
curl -k tricksmmo.com
```
 
Join Telegram ToolsKiemTrieuDoGroup
Back
Top