# 631 - Internet Printing Protocol(IPP)

<details>

<summary><strong>从零开始学习AWS黑客技术，成为专家</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE（HackTricks AWS Red Team Expert）</strong></a><strong>！</strong></summary>

其他支持HackTricks的方式：

* 如果您想看到您的**公司在HackTricks中做广告**或**下载PDF格式的HackTricks**，请查看[**订阅计划**](https://github.com/sponsors/carlospolop)!
* 获取[**官方PEASS & HackTricks周边产品**](https://peass.creator-spring.com)
* 探索[**PEASS家族**](https://opensea.io/collection/the-peass-family)，我们的独家[**NFTs**](https://opensea.io/collection/the-peass-family)
* **加入** 💬 [**Discord群**](https://discord.gg/hRep4RUj7f) 或 [**电报群**](https://t.me/peass) 或 **关注**我们的**Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**。**
* 通过向[**HackTricks**](https://github.com/carlospolop/hacktricks)和[**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github仓库提交PR来分享您的黑客技巧。

</details>

## 互联网打印协议 (IPP)

**互联网打印协议（IPP）**，如**RFC2910**和**RFC2911**中所规定的，作为在互联网上进行打印的基础。它的可扩展性通过**IPP Everywhere**等发展得到展示，旨在标准化移动和云打印，并引入了用于**3D打印**的扩展。

利用**HTTP**协议，IPP受益于已建立的安全实践，包括**基本/摘要身份验证**和**SSL/TLS加密**。执行诸如提交打印作业或查询打印机状态等操作是通过针对运行在**631/tcp端口**上的IPP服务器的**HTTP POST请求**完成的。

IPP的一个众所周知的实现是**CUPS**，这是一个开源打印系统，在各种Linux发行版和OS X中广泛使用。尽管它很实用，但类似于LPD，IPP可以被利用来通过**PostScript**或**PJL文件**传输恶意内容，突显了潜在的安全风险。

```python
# Example of sending an IPP request using Python
import requests

url = "http://printer.example.com:631/ipp/print"
headers = {"Content-Type": "application/ipp"}
data = b"..."  # IPP request data goes here

response = requests.post(url, headers=headers, data=data, verify=True)
print(response.status_code)
```

如果你想了解更多关于[**黑客打印机的信息，请阅读此页面**](http://hacking-printers.net/wiki/index.php/Main_Page)。

<details>

<summary><strong>从零开始学习AWS黑客技术，成为专家</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE（HackTricks AWS红队专家）</strong></a><strong>！</strong></summary>

支持HackTricks的其他方式：

* 如果你想看到你的**公司在HackTricks中做广告**或**下载PDF格式的HackTricks**，请查看[**订阅计划**](https://github.com/sponsors/carlospolop)!
* 获取[**官方PEASS & HackTricks周边产品**](https://peass.creator-spring.com)
* 探索[**PEASS家族**](https://opensea.io/collection/the-peass-family)，我们独家[**NFTs**](https://opensea.io/collection/the-peass-family)收藏品
* **加入** 💬 [**Discord群**](https://discord.gg/hRep4RUj7f) 或 [**电报群**](https://t.me/peass) 或 **关注**我们的**Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**。**
* 通过向[**HackTricks**](https://github.com/carlospolop/hacktricks)和[**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github仓库提交PR来分享你的黑客技巧。

</details>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://hacktricks.xsx.tw/network-services-pentesting/pentesting-631-internet-printing-protocol-ipp.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
