aboutsummaryrefslogtreecommitdiffstats
path: root/bruiser/bruiser.cpp
diff options
context:
space:
mode:
authorbloodstalker <thabogre@gmail.com>2017-12-31 19:25:40 +0000
committerbloodstalker <thabogre@gmail.com>2017-12-31 19:25:40 +0000
commitd2bff8aa39c98c4ebc904b836dcffbea3f7045bb (patch)
treeeee4c48bc69314cb90518a05f553e8eea9c17e8c /bruiser/bruiser.cpp
parentbruiser gets the function code and name from bfd now. besides that minor chan... (diff)
downloadmutator-d2bff8aa39c98c4ebc904b836dcffbea3f7045bb.tar.gz
mutator-d2bff8aa39c98c4ebc904b836dcffbea3f7045bb.zip
wip
Diffstat (limited to '')
-rw-r--r--bruiser/bruiser.cpp20
1 files changed, 17 insertions, 3 deletions
diff --git a/bruiser/bruiser.cpp b/bruiser/bruiser.cpp
index 324841d..8934867 100644
--- a/bruiser/bruiser.cpp
+++ b/bruiser/bruiser.cpp
@@ -299,7 +299,7 @@ class PyExec {
PRINT_WITH_COLOR_LB(YELLOW, "functions with a zero size will not be printed:");
for (auto &iter : hexobj) {
for (auto &iterer : iter) {
- std::cout << RED << int(iterer) << " ";
+ std::cout << RED << std::hex << int(iterer) << " ";
}
std::cout << "\n" << NORMAL;
}
@@ -1588,8 +1588,7 @@ class LuaWrapper
unsigned int returncount = 0;
for (auto &iter : ShellGlobalInstance.PATH)
- {
- lua_pushstring(__ls, iter.c_str());
+ { lua_pushstring(__ls, iter.c_str());
std::cout << BLUE << iter.c_str() << NORMAL << "\n";
returncount++;
}
@@ -1611,6 +1610,21 @@ class LuaWrapper
return returncount;
}
+ int BruiserLuaCallXFunc(lua_State* __ls) {
+ int numargs = lua_gettop(__ls);
+ std::string argtype;
+
+ if (numargs % 2 != 0) {
+ PRINT_WITH_COLOR_LB(RED, "Each arg should be accompanied with its type.");
+ }
+
+ for (int i = 0; i < numargs; i = i + 2) {
+ argtype = lua_tostring(__ls, i);
+ }
+
+ return 0;
+ }
+
int BruiserLuaChangeDirectory(lua_State* __ls)
{
int numargs = lua_gettop(__ls);