aboutsummaryrefslogtreecommitdiffstats
path: root/bruiser/lua-scripts/misc.lua
diff options
context:
space:
mode:
authorbloodstalker <thabogre@gmail.com>2018-07-21 08:40:18 +0000
committerbloodstalker <thabogre@gmail.com>2018-07-21 08:40:18 +0000
commitc61c7b4a33a04d5470961fc559be61e8f8cc5ef2 (patch)
tree97872a361bb92848560a37cee85b8e47fdbf396c /bruiser/lua-scripts/misc.lua
parenta fix for the luatablegen json file, added a new option to load.py, minor cos... (diff)
downloadmutator-c61c7b4a33a04d5470961fc559be61e8f8cc5ef2.tar.gz
mutator-c61c7b4a33a04d5470961fc559be61e8f8cc5ef2.zip
updated the README with the mirror repo links for luatablegen, delf and dwasm
Diffstat (limited to '')
-rw-r--r--bruiser/lua-scripts/misc.lua35
1 files changed, 35 insertions, 0 deletions
diff --git a/bruiser/lua-scripts/misc.lua b/bruiser/lua-scripts/misc.lua
new file mode 100644
index 0000000..711f795
--- /dev/null
+++ b/bruiser/lua-scripts/misc.lua
@@ -0,0 +1,35 @@
+
+------------------------------------------------Project Mutator-----------------------------------------------
+--bruiser's lua functions that fall under misc or util
+--Copyright (C) 2018 Farzad Sadeghi
+
+--This program is free software; you can redistribute it and/or
+--modify it under the terms of the GNU General Public License
+--as published by the Free Software Foundation; either version 3
+--of the License, or (at your option) any later version.
+
+--This program is distributed in the hope that it will be useful,
+--but WITHOUT ANY WARRANTY; without even the implied warranty of
+--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+--GNU General Public License for more details.
+
+--You should have received a copy of the GNU General Public License
+--along with this program; if not, write to the Free Software
+--Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.*/
+--------------------------------------------------------------------------------------------------------------
+--start of xobj module
+local misc = {}
+
+function misc.pgrep(name)
+ local handle = io.popen("pgrep "..name)
+ local ret = {}
+ for line in handle:lines() do
+ table.insert(ret, tonumber(line))
+ end
+ return ret
+end
+
+--end of xobj module
+return misc
+--------------------------------------------------------------------------------------------------------------
+