aboutsummaryrefslogtreecommitdiff
path: root/client/src/shellcode/shellcode.cpp
diff options
context:
space:
mode:
authorauth <[email protected]>2020-07-17 15:49:00 +0200
committerauth <[email protected]>2020-07-17 15:49:00 +0200
commitbc9a539dc2dc40435f3e7b63306ed80a5198458b (patch)
tree85bc4addae613067e175b7c7d7af1593f09b9c4d /client/src/shellcode/shellcode.cpp
parentMerge branch 'master' into windows (diff)
parentRefactoring. (diff)
downloadloader-bc9a539dc2dc40435f3e7b63306ed80a5198458b.tar.xz
loader-bc9a539dc2dc40435f3e7b63306ed80a5198458b.zip
Merge branch 'master' into windows
Diffstat (limited to 'client/src/shellcode/shellcode.cpp')
-rw-r--r--client/src/shellcode/shellcode.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/client/src/shellcode/shellcode.cpp b/client/src/shellcode/shellcode.cpp
new file mode 100644
index 0000000..67cbabf
--- /dev/null
+++ b/client/src/shellcode/shellcode.cpp
@@ -0,0 +1,31 @@
+#include "../include.h"
+#include "shellcode.h"
+
+void sc::generator::start() {}
+
+void sc::generator::push(const std::vector<uintptr_t>& args) {
+ if (!m_x64) {
+ for (auto it = args.rbegin(); it != args.rend(); ++it) {
+ m_assembler.push(*it);
+ }
+ return;
+ }
+
+ // 64bit impl
+}
+
+void sc::generator::call(const uintptr_t addr) {}
+
+void sc::generator::end() {
+ if (m_x64) {
+ }
+
+ void* func;
+ m_runtime.add(&func, &m_code);
+
+ const size_t size = m_code.codeSize();
+
+ m_buf.resize(size);
+
+ std::memcpy(&m_buf[0], func, size);
+} \ No newline at end of file