<commit_before>Ropper
================

With ropper you can show information about files in different file formats
and you can search for gadgets to build rop chains for different architectures. For disassembly ropper uses the
awesome Capstone Framework.

Install
-------

Download and Install Capstone

    $ wget http://www.capstone-engine.org/download/2.1.2/capstone-2.1.2.tgz
    $ tar xf capstone-2.1.2.tgz
    $ cd capstone-2.1.2
    $ ./make.sh
    $ sudo ./make.sh install
    $ cd ./bindings/python
    $ sudo make install

Install and execute Ropper

    $ python setup.py install
    $ ropper

You can also install Ropper with pip

    $ pip install ropper

If you want, you can use Ropper without installation

    $ ./ropper.py


Usage
-----

    usage: ropper.py [-h] [-v] [--console] [-f <file>] [-i] [-e] [--imagebase]
                 [-c] [-s] [-S] [--imports] [--symbols] [--set <option>]
                 [--unset <option>] [-I <imagebase>] [-p] [-j <reg>]
                 [--depth <n bytes>] [--search <regex>] [--filter <regex>]
                 [--opcode <opcode>] [--type <type>] [--detail]
                 [--chain <generator>] [-b <badbytes>]

    With ropper you can show information about files in different file formats
    and you can find gadgets to build rop chains for different architectures.

    supported filetypes:
      ELF
      PE
      Mach-O

    supported architectures:
      x86
      x86_64
      MIPS
      ARM
      ARM64

    available rop chain generators:
      execve (execve[=<cmd>], default /bin/sh) [Linux x86]
      mprotect  (mprotect=<address>:<size>) [Linux x86]

    optional arguments:
      -h, --help            show this help message and exit
      -v, --version         Print version
      --console             Starts interactive commandline
      -f <file>, --file <file>
                            The file to load
      -i, --info            Shows file header [ELF/PE/Mach-O]
      -e                    Shows EntryPoint
      --imagebase           Shows ImageBase [ELF/PE/Mach-O]
      -c, --dllcharacteristics
                            Shows DllCharacteristics [PE]
      -s, --sections        Shows file sections [ELF/PE/Mach-O]
      -S, --segments        Shows file segments [ELF/Mach-O]
      --imports             Shows imports [ELF/PE]
      --symbols             Shows symbols [ELF]
      --set <option>        Sets options. Available options: aslr nx
      --unset <option>      Unsets options. Available options: aslr nx
      -I <imagebase>        Uses this imagebase for gadgets
      -p, --ppr             Searches for 'pop reg; pop reg; ret' instructions
                            [only x86/x86_64]
      -j <reg>, --jmp <reg>
                            Searches for 'jmp reg' instructions (-j reg[,reg...])
                            [only x86/x86_64]
      --depth <n bytes>     Specifies the depth of search (default: 10)
      --search <regex>      Searches for gadgets
      --filter <regex>      Filters gadgets
      --opcode <opcode>     Searches for opcodes
      --type <type>         Sets the type of gadgets [rop, jop, all] (default:
                            all)
      --detail              Prints gadgets more detailed
      --chain <generator>   Generates a ropchain [generator=parameter]
      -b <badbytes>, --badbytes <badbytes>
                            Set bytes which should not contains in gadgets

    example uses:
      [Generic]
      ropper.py
      ropper.py --file /bin/ls --console

      [Informations]
      ropper.py --file /bin/ls --info
      ropper.py --file /bin/ls --imports
      ropper.py --file /bin/ls --sections
      ropper.py --file /bin/ls --segments
      ropper.py --file /bin/ls --set nx
      ropper.py --file /bin/ls --unset nx

      [Gadgets]
      ropper.py --file /bin/ls --depth 5
      ropper.py --file /bin/ls --search "sub eax" --badbytes 000a0d
      ropper.py --file /bin/ls --search "sub eax" --detail
      ropper.py --file /bin/ls --filter "sub eax"
      ropper.py --file /bin/ls --depth 5 --filter "sub eax"
      ropper.py --file /bin/ls --opcode ffe4
      ropper.py --file /bin/ls --detail
      ropper.py --file /bin/ls --ppr
      ropper.py --file /bin/ls --jmp esp,eax
      ropper.py --file /bin/ls --type jop
      ropper.py --file /bin/ls --chain execve=/bin/sh
      ropper.py --file /bin/ls --chain execve=/bin/sh --badbytes 000a0d
      ropper.py --file /bin/ls --chain mprotect=0xbfdff000:0x21000




Planned features for future versions
------------------------------------
  Architectures:
- PowerPC-Support
- ARM Thumb Support

  File formats:
- Raw


Project page
------------------------------------
http://scoding.de/ropper<commit_msg>README changed<commit_after>Ropper
================

With ropper you can show information about files in different file formats
and you can search for gadgets to build rop chains for different architectures. For disassembly ropper uses the
awesome Capstone Framework.

Install
-------

Download and Install Capstone

    $ wget http://www.capstone-engine.org/download/2.1.2/capstone-2.1.2.tgz
    $ tar xf capstone-2.1.2.tgz
    $ cd capstone-2.1.2
    $ ./make.sh
    $ sudo ./make.sh install
    $ cd ./bindings/python
    $ sudo make install

Install and execute Ropper

    $ python setup.py install
    $ ropper

You can also install Ropper with pip

    $ pip install ropper

If you want, you can use Ropper without installation

    $ ./ropper.py


Usage
-----

    usage: ropper.py [-h] [-v] [--console] [-f <file>] [-i] [-e] [--imagebase]
                 [-c] [-s] [-S] [--imports] [--symbols] [--set <option>]
                 [--unset <option>] [-I <imagebase>] [-p] [-j <reg>]
                 [--depth <n bytes>] [--search <regex>] [--filter <regex>]
                 [--opcode <opcode>] [--type <type>] [--detail]
                 [--chain <generator>] [-b <badbytes>] [--nocolor]

    With ropper you can show information about files in different file formats
    and you can find gadgets to build rop chains for different architectures.

    supported filetypes:
      ELF
      PE
      Mach-O

    supported architectures:
      x86
      x86_64
      MIPS
      ARM/Thumb
      ARM64
      PowerPC

    available rop chain generators:
      execve (execve[=<cmd>], default /bin/sh) [Linux x86]
      mprotect  (mprotect=<address>:<size>) [Linux x86]

    optional arguments:
      -h, --help            show this help message and exit
      -v, --version         Print version
      --console             Starts interactive commandline
      -f <file>, --file <file>
                            The file to load
      -i, --info            Shows file header [ELF/PE/Mach-O]
      -e                    Shows EntryPoint
      --imagebase           Shows ImageBase [ELF/PE/Mach-O]
      -c, --dllcharacteristics
                            Shows DllCharacteristics [PE]
      -s, --sections        Shows file sections [ELF/PE/Mach-O]
      -S, --segments        Shows file segments [ELF/Mach-O]
      --imports             Shows imports [ELF/PE]
      --symbols             Shows symbols [ELF]
      --set <option>        Sets options. Available options: aslr nx
      --unset <option>      Unsets options. Available options: aslr nx
      -I <imagebase>        Uses this imagebase for gadgets
      -p, --ppr             Searches for 'pop reg; pop reg; ret' instructions
                            [only x86/x86_64]
      -j <reg>, --jmp <reg>
                            Searches for 'jmp reg' instructions (-j reg[,reg...])
                            [only x86/x86_64]
      --depth <n bytes>     Specifies the depth of search (default: 10)
      --search <regex>      Searches for gadgets
      --filter <regex>      Filters gadgets
      --opcode <opcode>     Searches for opcodes
      --type <type>         Sets the type of gadgets [rop, jop, all] (default:
                            all)
      --detail              Prints gadgets more detailed
      --chain <generator>   Generates a ropchain [generator=parameter]
      -b <badbytes>, --badbytes <badbytes>
                            Set bytes which should not contains in gadgets
      --nocolor             Disables colored output

    example uses:
      [Generic]
      ropper.py
      ropper.py --file /bin/ls --console

      [Informations]
      ropper.py --file /bin/ls --info
      ropper.py --file /bin/ls --imports
      ropper.py --file /bin/ls --sections
      ropper.py --file /bin/ls --segments
      ropper.py --file /bin/ls --set nx
      ropper.py --file /bin/ls --unset nx

      [Gadgets]
      ropper.py --file /bin/ls --depth 5
      ropper.py --file /bin/ls --search "sub eax" --badbytes 000a0d
      ropper.py --file /bin/ls --search "sub eax" --detail
      ropper.py --file /bin/ls --filter "sub eax"
      ropper.py --file /bin/ls --depth 5 --filter "sub eax"
      ropper.py --file /bin/ls --opcode ffe4
      ropper.py --file /bin/ls --detail
      ropper.py --file /bin/ls --ppr --nocolor
      ropper.py --file /bin/ls --jmp esp,eax
      ropper.py --file /bin/ls --type jop
      ropper.py --file /bin/ls --chain execve=/bin/sh
      ropper.py --file /bin/ls --chain execve=/bin/sh --badbytes 000a0d
      ropper.py --file /bin/ls --chain mprotect=0xbfdff000:0x21000





Planned features for future versions
------------------------------------
  File formats:
  - Raw

  Edit Headerfields
  Print more informations

  For any other ideas please contact me 



Project page
------------------------------------
http://scoding.de/ropper
{'fraction_non_alphanumeric': 0.13427377220480669, 'fraction_numerical': 0.01233019853709509, 'mean_word_length': 1.5979913137893593, 'pattern_counts': {'":': 0, '<': 63, '<?xml version=': 0, '>': 63, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2509987', 'n_tokens_mistral': 3121, 'n_tokens_neox': 2892, 'n_words': 956}