Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

🚫💾 Run binaries straight from memory in Linux

License

NotificationsYou must be signed in to change notification settings

liamg/memit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Execute a binary from memory, without touching the disk. Linux only.

Available as both a Go module and a binary.

demo

Using the Go module

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()}

Using the binary

Grab thelatest release and run it like this:

memit https://.../mybinary --# args for the actual binary can be put after the --

[8]ページ先頭

©2009-2025 Movatter.jp