1 个不稳定版本
使用旧的 Rust 2015
0.0.1 | 2022 年 8 月 18 日 |
---|
#6 in #pixelflut
29KB
481 行
pixelpwnr
一个快速 pixelflut (视频) 客户端,用 Rust 编写,用于在 34C3 上使用,可以 控制 整个 pixelflut 面板。
对于高性能的 pixelflut 服务器实现,请参阅
→ pixelpwnr-server (服务器)
注意:这是一个原型项目。一些功能可能无法正确工作。或者某些功能可能运行速度较慢。
特性
- 许多并发绘图管道,快速多线程
- 动画图像,带有多帧图像
- 控制渲染大小和偏移量
- 自动图像大小和格式化
- 比大多数其他客户端都快 :-)
- Linux、Windows 和 macOS
用法
Pixelflut 一个简单的图像
# Flut a simple image.
# - To host 127.0.0.1 on port 8080
# - With the image: image.png
# - With 4 painting threads
# - With the size of the screen (default)
pixelpwnr 127.0.0.1:8080 -i image.png -c 4
# Other CLI syntax is also supported
pixelpwnr "127.0.0.1:8080" --image="image.png" -c=4
Pixelflut 一个动画图像
# Flut an animated image, with multiple frames.
# - To host 127.0.0.1 on port 8080
# - With the images: *.png
# - With 5 frames per second
# - With 4 painting threads
# - With a size of (400, 400)
# - With an offset of (100, 100)
pixelpwnr 127.0.0.1:8080 -i *.png --fps 5 -c 4 -w 400 -h 400 -x 100 -y 100
使用 --help
标志,或查看 帮助 部分,了解所有可用选项。
安装
安装需要 Git 和 Rust cargo。使用 rustup 安装 Rust 的最新版本。
然后,使用以下命令克隆和安装 pixelpwnr
# Clone the project
git clone https://github.com/timvisee/pixelpwnr.git
cd pixelpwnr
# Install pixelpwnr
cargo install -f
# Start using pixelpwnr
pixelpwnr --help
# or run it directly from Cargo
cargo run --release -- --help
或者直接构建并调用二进制文件(Linux/macOS)
# Clone the project
git clone https://github.com/timvisee/pixelpwnr.git
cd pixelpwnr
# Build the project (release version)
cargo build --release
# Start using pixelpwnr
./target/release/pixelpwnr --help
性能 & 速度优化
有很多因素会影响在 pixelflut 服务器上绘制像素的速度。
其中一些是
- 绘制的图像大小。
- 用于推送像素的连接数量。
pixelpwnr
运行的机器的性能。- 客户端的网络接口性能。
- 服务器的网络接口性能。
- pixelflut 服务器的性能。
提高绘画性能的方法
- 使用有线连接。
- 使用局域网连接,与 pixelflut 服务器紧密相连。连接越低延迟越好,因为连接是通过 TCP 进行的。
- 使用尽可能多的线程(
-c
标志) - 绘制较小的图像(
-w
、-h
标志)。 - 在屏幕上绘画的区域,尽量选择其他物体最少的地方。
- 使用多个机器(服务器)和多个
pixelpwnr
实例将像素推送到屏幕。
未来改进
此应用程序仍处于原型阶段,许多方面都可以进行改进,以实现显著更好的性能和可用性。请参阅待办事项文件,了解未来改进的列表。
帮助
pixelpwnr --help
pixelpwnr 0.1
Tim Visee <[email protected]>
A quick pixelflut client, that pwns pixelflut panels.
USAGE:
pixelpwnr [OPTIONS] <HOST> --image <PATH>...
FLAGS:
--help Prints help information
-V, --version Prints version information
OPTIONS:
-i, --image <PATH>... Image paths
-w, --width <PIXELS> Draw width (def: screen width)
-h, --height <PIXELS> Draw height (def: screen height)
-x <PIXELS> Draw X offset (def: 0)
-y <PIXELS> Draw Y offset (def: 0)
-c, --count <COUNT> Number of concurrent threads (def: CPUs)
-r, --fps <RATE> Frames per second with multiple images (def: 1)
ARGS:
<HOST> The host to pwn "host:port"
相关项目
许可
本项目采用 GNU GPL-3.0 许可证发布。有关更多信息,请参阅许可证文件。
依赖项
~18MB
~142K SLoC