## Bin v1.0

This is a script to write shellcode to a binary file. When creating exploits it is common occurrence to create a copy of the shellcode in a binary file. This process is tedious and time consuming so I thought to myself “There should be an app for that!” hehe. The script has some error tolerance for sloppy-copy use. It should filter out junk characters when copying from most common exploits formats (python, perl, c). When using msfpayload/msfencode you can set the output type to perl or c. Feel free to add some rules for filtering (email me if you have any suggestions). The rule of thumb is to copy as cleanly as possible and check the contents of the binary file after creation. If you’re not sure why you would need this script check out the tutorial I wrote here.
Download: bin.sh

    root@bt:~/Desktop# ./bin.sh
    --------------------------------------------------------------------
    |                          Bin v1.0 ~ b33f                         |
    |                  -Convert you shellcode to *.bin-                |
    --------------------------------------------------------------------
    | USAGE: ./bin.sh -i [Input File] -o [Output File] -t [B/Z]        |
    |                                                                  |
    | REQUIRED                                                         |
    |         -i  Input (text) file containing the shellcode.          |
    |         -o  Output filename without extention (eg: shell).       |
    |         -t  Type can be B (regular bin file) or Z (zipped.       |
    |             bin file).                                           |
    |                                                                  |
    | DETAILS                                                          |
    |         The input text file should just contain the shellcode.   |
    |         If you are using msfpayload (possibly/probably in        |
    |         combinatione with msfencode) set the output type to      |
    |         c or perl. If you have some shellcode in an exploit      |
    |         just copy it to a text file...                           |
    --------------------------------------------------------------------

    root@bt:~/Desktop# ./bin.sh -i badchars.txt -o compare -t B
    [>] Parsing Input File
    [>] Pipe output to xxd
    [>] Clean up
    [>] Done!!

    root@bt:~/Desktop# hexeditor -b compare.bin