aboutsummaryrefslogtreecommitdiff
path: root/client/src/assembler/shellcode.cpp
diff options
context:
space:
mode:
authorauth12 <[email protected]>2020-07-16 13:37:51 +0100
committerauth12 <[email protected]>2020-07-16 13:37:51 +0100
commite2379c4956099294994e090b9bede94bbbbdcab1 (patch)
treec62f61d77157e8eed8d4ad90db93fc79b587ba36 /client/src/assembler/shellcode.cpp
parentClient login handling on server. (diff)
downloadloader-e2379c4956099294994e090b9bede94bbbbdcab1.tar.xz
loader-e2379c4956099294994e090b9bede94bbbbdcab1.zip
Added windows support on client.
Diffstat (limited to 'client/src/assembler/shellcode.cpp')
-rw-r--r--client/src/assembler/shellcode.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/client/src/assembler/shellcode.cpp b/client/src/assembler/shellcode.cpp
new file mode 100644
index 0000000..af3160b
--- /dev/null
+++ b/client/src/assembler/shellcode.cpp
@@ -0,0 +1,31 @@
+#include "../include.h"
+#include "shellcode.h"
+
+void sc::start() {}
+
+void sc::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::call(const uintptr_t addr) {}
+
+void sc::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