Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33
🚫💾 Run binaries straight from memory in Linux
License
liamg/memit
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Execute a binary from memory, without touching the disk. Linux only.
Available as both a Go module and a binary.
TheCommand()
method takes anio.Reader
, so you can use it with things like an HTTP response body, abytes.Buffer
, etc.
It provides an*exec.Cmd
(viamemit.Command(...)
) so you can wire up stdin/out and configure other parameters just like you would with a regular command.
package mainimport"github.com/liamg/memit"funcmain() {resp,_:=http.Get("https://.../mybinary")cmd,_,_:=memit.Command(resp.Body,"--args","--go","--here")cmd.Stderr=os.Stderrcmd.Stdin=os.Stdincmd.Stdout=os.Stdout_=cmd.Run()}
Grab thelatest release and run it like this:
memit https://.../mybinary --# args for the actual binary can be put after the --
About
🚫💾 Run binaries straight from memory in Linux
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Contributors2
Uh oh!
There was an error while loading.Please reload this page.