From 8e5e48337a6cf7a33ecbee7cf9c594fa18bd93ae Mon Sep 17 00:00:00 2001 From: auth Date: Fri, 17 Jul 2020 15:47:51 +0200 Subject: Refactoring. --- client/src/shellcode/shellcode.cpp | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 client/src/shellcode/shellcode.cpp (limited to 'client/src/shellcode/shellcode.cpp') 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& 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 -- cgit v1.2.3