sushimaster单个二进制可执行多个命令
寿司师傅POC:单个二进制可执行许多命令,如busybox。安装命令:
go get github.com/riywo/sushimaster
准备一个目录如下:
$ tree data/
└── bin
├── bar
└── bar
查看文件内容:
$ cat data/bin/bar
#!/bin/bash
echo bar
运行命令:
$ ./data/bin/bar
$ ./data/bin/bar
bar
然后,由sushimaster制作sushibox,享受乐趣:
$ sushimaster data
$ ls data
sushibox
$ file sushibox
sushibox: Mach-O 64-bit executable x86_64
$ ./sushibox bar
$ ./sushibox bar