yaegi | Yaegi is Another Elegant Go Interpreter | Interpreter library
kandi X-RAY | yaegi Summary
kandi X-RAY | yaegi Summary
Yaegi is Another Elegant Go Interpreter. It powers executable Go scripts and plugins, in embedded interpreters or interactive shells, on top of the Go runtime.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of yaegi
yaegi Key Features
yaegi Examples and Code Snippets
Community Discussions
Trending Discussions on yaegi
QUESTION
I know that it is possible to embed executables in Golang executables and run them, or run Golang code from a string using projects like Yaegi, but is it possible to run a binary stored as a variable without writing it to a file, as a child process? The binary is already in memory as a variable so is it possible to just execute it somehow?
If I'm not mistaken there is a difference between executable memory and data memory so would that prevent this from being done?
The reason for my question is that I'm writing an open-source RAT/payload dropper as a project to learn Golang and would like to make is as modular as possible, including file-less updates and binary (also file-less) payloads.
EDIT: Any solution is welcome, but cross-platform solutions are preferred.
EDIT2: According to this SO answer, this is not possible / very difficult in C++. Seemingly, the main reason for this is dynamically linking libraries. As Golang is statically linked, would this be any easier?
...ANSWER
Answered 2020-May-04 at 13:36No, there is no portable way to do this.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install yaegi
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page