diff options
| author | auth <[email protected]> | 2020-07-17 15:49:00 +0200 |
|---|---|---|
| committer | auth <[email protected]> | 2020-07-17 15:49:00 +0200 |
| commit | bc9a539dc2dc40435f3e7b63306ed80a5198458b (patch) | |
| tree | 85bc4addae613067e175b7c7d7af1593f09b9c4d /client/src | |
| parent | Merge branch 'master' into windows (diff) | |
| parent | Refactoring. (diff) | |
| download | loader-bc9a539dc2dc40435f3e7b63306ed80a5198458b.tar.xz loader-bc9a539dc2dc40435f3e7b63306ed80a5198458b.zip | |
Merge branch 'master' into windows
Diffstat (limited to 'client/src')
| -rw-r--r-- | client/src/main.cpp | 10 | ||||
| -rw-r--r-- | client/src/shellcode/shellcode.cpp (renamed from client/src/assembler/shellcode.cpp) | 8 | ||||
| -rw-r--r-- | client/src/shellcode/shellcode.h (renamed from client/src/assembler/shellcode.h) | 10 |
3 files changed, 13 insertions, 15 deletions
diff --git a/client/src/main.cpp b/client/src/main.cpp index 09db5cb..4a47e01 100644 --- a/client/src/main.cpp +++ b/client/src/main.cpp @@ -1,20 +1,12 @@ #include "include.h" #include "util/io.h" #include "client/client.h" -#include "assembler/shellcode.h" +#include "shellcode/shellcode.h" #include "injection/mapper.h" int main(int argc, char* argv[]) { io::init(); - /*assembler a; - a.push({1, 2, 3, 7, 9}); - a.end(); - for(auto &b : a()) { - io::logger->info("{:x}", b); - } - std::cin.get();*/ - tcp::client client; std::thread t{tcp::client::monitor, std::ref(client)}; diff --git a/client/src/assembler/shellcode.cpp b/client/src/shellcode/shellcode.cpp index af3160b..67cbabf 100644 --- a/client/src/assembler/shellcode.cpp +++ b/client/src/shellcode/shellcode.cpp @@ -1,9 +1,9 @@ #include "../include.h" #include "shellcode.h" -void sc::start() {} +void sc::generator::start() {} -void sc::push(const std::vector<uintptr_t>& args) { +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); @@ -14,9 +14,9 @@ void sc::push(const std::vector<uintptr_t>& args) { // 64bit impl } -void sc::call(const uintptr_t addr) {} +void sc::generator::call(const uintptr_t addr) {} -void sc::end() { +void sc::generator::end() { if (m_x64) { } diff --git a/client/src/assembler/shellcode.h b/client/src/shellcode/shellcode.h index 6fb2f61..5f0e135 100644 --- a/client/src/assembler/shellcode.h +++ b/client/src/shellcode/shellcode.h @@ -1,8 +1,12 @@ #pragma once +#include <asmjit/src/asmjit/asmjit.h> + using namespace asmjit; -class sc { +namespace sc { + +class generator { std::vector<uint8_t> m_buf; CodeHolder m_code; @@ -11,7 +15,7 @@ class sc { bool m_x64; public: - sc(const bool x64 = false) : m_x64{x64} { + generator(const bool x64 = false) : m_x64{x64} { Environment env(x64 ? Environment::kArchX64 : Environment::kArchX86); m_code.init(env); @@ -26,4 +30,6 @@ class sc { auto &operator()() const { return m_buf; } auto &operator->() const { return m_assembler; } +}; + };
\ No newline at end of file |