summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMalfurious <m@lfurio.us>2021-08-22 10:24:45 -0400
committerMalfurious <m@lfurio.us>2021-08-22 10:24:45 -0400
commitad0ff4ede0e35d7c70fa0469f94f526196fa8ad4 (patch)
tree64258b519fa6ea1a36cdf50a7f7bf20567098d13 /tools
parent442640f100727a081cf26460992465386fe3a633 (diff)
parent083f76002476dd722a2989cf2c33d0e616e3fd84 (diff)
downloadlib-des-gnux-ad0ff4ede0e35d7c70fa0469f94f526196fa8ad4.tar.gz
lib-des-gnux-ad0ff4ede0e35d7c70fa0469f94f526196fa8ad4.zip
Merge branch 'shellcode-templates'
This is content from an old repo of mine. I think it makes much more sense to merge it into lib-des-gnux. templates/shellcode/ will track any useful shellcode recipes and contains utilities for building them into ready-to-use payloads. * shellcode-templates: Globally ignore all build artifacts Add Makefile for shellcode templates Refactor genhex into shelltool Add sys_exit shellcode templates Add generic /bin/sh shellcode templates
Diffstat (limited to '')
-rw-r--r--tools/.gitignore1
-rw-r--r--tools/genhex.cpp33
2 files changed, 0 insertions, 34 deletions
diff --git a/tools/.gitignore b/tools/.gitignore
deleted file mode 100644
index c18dd8d..0000000
--- a/tools/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-__pycache__/
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 <iostream>
-#include <string>
-
-/*
- * 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;
-}