From 88c0d3eb7451a10affa197a0b43cba22035b4cee Mon Sep 17 00:00:00 2001 From: bloodstalker Date: Mon, 8 Jan 2018 13:15:30 +0330 Subject: readme update [ci skip] --- bruiser/README.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'bruiser/README.md') diff --git a/bruiser/README.md b/bruiser/README.md index 97c0f67..642b10b 100644 --- a/bruiser/README.md +++ b/bruiser/README.md @@ -34,8 +34,8 @@ Imagine we have a classical mutation operator that mutates all `+` operators to ### How? I'm going to write about it as soon as I get my thoughts organized. In the meantime you can look at the source code for some hints.
-### Example -First you should clone the mutator repo and run `git submodule init` and `git submodule update` to get the cool third-party repos that enable mutator to run.
+### Exampless +First you should clone the mutator repo and run `git submodule init` and `git submodule update` to get the third-party repos that enable mutator to run.
To build bruiser you can either run the makefile in bruiser's directory, then run `make` or just run the makefile at mutator's root directory and run `make bruiser`.
After building bruiser, you can run it like any other mutator tool. So for example if you want to run bruiser on its test file run:
@@ -45,6 +45,8 @@ After building bruiser, you can run it like any other mutator tool. So for examp ``` +or if you're lazy like me just run the shellscript `run.sh` in bruiser's directory.
+ After that you can just run your commands.
To run you commands from a lua file, you can just use `dofile()` to call your script. Bruiser has an embedded lua interpreter with the bruiser functions registered in it, so you do have full access to all lua libraries and functionalities plus the added bruiser functionality.
For example you can run one of the example scripts that come with bruiser like this:
@@ -63,3 +65,11 @@ You can also run bruiser in non-cli mode:
``` Bruiser requires a compilation database to run. If you don't have a compilation database, take a look at [Bear](https://github.com/rizsotto/Bear). If you're using `cmake`, just tell it to generate a compilation database.
+ +TLDR; now let's look at some useful example.
+#### ELF info +mutator has it's own pyelf script which resides at `/bfd`, named `load.py`. `load.py` reads an ELF file and then returns the results to lua in the form of tables. For more detailed info please look at the wiki entry.
+Running the following command will return a table containing the names of the objects found in the specified ELF file. To build `../bfd/test/test.so` go to the test dir for bfd and run the makefile.
+```lua +objload("elf_get_obj_names", "../bfd/test/test.so", "symbol_list") +``` -- cgit v1.2.3