From 89c13129a55ccbecda31614c83e88612972c11a6 Mon Sep 17 00:00:00 2001 From: Malfurious Date: Sun, 22 Aug 2021 08:25:26 -0400 Subject: Refactor genhex into shelltool For convenience, I've rewritten my old shellcode parser program in Python. It is moved to the shellcode templates dir and renamed to shelltool. As a new feature, shelltool will now check the result for NULL bytes and newline bytes that may cause problems in an exploit. Signed-off-by: Malfurious --- tools/genhex.cpp | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 tools/genhex.cpp (limited to 'tools') diff --git a/tools/genhex.cpp b/tools/genhex.cpp deleted file mode 100644 index a37f91e..0000000 --- a/tools/genhex.cpp +++ /dev/null @@ -1,33 +0,0 @@ -#include -#include - -/* - * Read in all of stdin (should be piped from objdump), look for bytecode hex, - * and print this code, escaped in a C-string literal, to stdout. - * - * EG output: "\x01\x02\x03\x04" - */ - -int main() -{ - std::string tmp; - unsigned int hex; - - std::cout << "\""; - - while (true) - { - std::cin >> tmp; - - if (std::cin.eof()) - break; - - if (tmp.size() == 2 && - tmp.find(":") == std::string::npos && - sscanf(tmp.c_str(), "%x", &hex) > 0) - std::cout << "\\x" << tmp; - } - - std::cout << "\"\n"; - return 0; -} -- cgit v1.2.3 From 083f76002476dd722a2989cf2c33d0e616e3fd84 Mon Sep 17 00:00:00 2001 From: Malfurious Date: Sun, 22 Aug 2021 10:06:40 -0400 Subject: Globally ignore all build artifacts Signed-off-by: Malfurious --- tools/.gitignore | 1 - 1 file changed, 1 deletion(-) delete mode 100644 tools/.gitignore (limited to 'tools') diff --git a/tools/.gitignore b/tools/.gitignore deleted file mode 100644 index c18dd8d..0000000 --- a/tools/.gitignore +++ /dev/null @@ -1 +0,0 @@ -__pycache__/ -- cgit v1.2.3