0.3.1: ARGS for args and back to sh

Signed-off-by: Ivan Bushchik <ivabus@ivabus.dev>
This commit is contained in:
Ivan Bushchik 2024-02-03 22:31:40 +03:00
parent cae10cc45e
commit bcb4fed2f4
No known key found for this signature in database
GPG key ID: 2F16FBF3262E090C
3 changed files with 7 additions and 5 deletions

View file

@ -2,7 +2,7 @@ workspace = { members = [ "runner" ] }
[package]
name = "binhost"
version = "0.3.0"
version = "0.3.1"
edition = "2021"
license = "MIT"
repository = "https://github.com/ivabus/binhost"

View file

@ -53,17 +53,19 @@ runners
Manifest validity check provides a fully-secured binary distribution chain.
```shell
curl ADDRESS:PORT/<bin> | KEY=... bash
curl ADDRESS:PORT/<bin> | KEY=... sh
```
`KEY` first few symbols from hex representation of SHA256 sum of manifest (printed to stdout on `binhost` startup).
Additional arguments are set with `ARGS` environment variable
Only this option should be considered as secure.
### Execute specific binary <bin> without validity check
```shell
curl ADDRESS:PORT/<bin> | bash
curl ADDRESS:PORT/<bin> | sh
```
### Download and reuse script

4
web.sh
View file

@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/sh
# SPDX-License-Identifier: MIT
set -e
@ -96,7 +96,7 @@ fi
chmod +x "$FILE"
$FILE < /dev/tty
$FILE $ARGS < /dev/tty
cd