
since version 1.03 it is possible to expand shellcode functionality
with "snippets", or tiny plugins written in assembly.

to do that, turn snippet option on (in the shc_w.exe)
and edit snippet prefix.

then, you can play with remote shell, and when you need
to get/put some file, do task list or whatever, you only need
to send corresponding snippet to the shellcode.


sending snippet - stage 1/2
---------------------------

   <snippet prefix:any> + <snippet_length:DWORD>

   both must be sent in a single packet,
   i.e. do some Sleep() before/after sending it;

   NOTE: if shellcode is compiled without ALLOC_BUF option
   (i.e. on-the-stack data allocation),
   then snippet length MUST BE 4-ALIGNED.

sending snippet - stage 2/2
---------------------------

after prefix+length is sent, you must send

    <snippet_code> of length <snippet_length>

! snippet is executed on the stack OR in the heap,
   depending on ALLOC_BUF option,
   as such, to use big snippets you should turn ALLOC_BUF option on.

! when snippet is executed:
    ;input registers/vars:
    ; [ESP+4]  = open socket handle
    ; EDI      = ptr to snippet's code
    <your code>
    ;if you wanna return back to shellcode:
    retn

! if you have enabled XORBYTE option,
   snippet prefix && snippet code should be encrypted.

passing text argument to snippet
--------------------------------

if some snippet requires additional data,
this data is appended to <snippet_code> before any
actions/length calculations on <snippet_code> are done.

data is always padded by zero byte,
empty data means that single zero byte should be appended to snippet code
(only for plugins which requires additional data)

as such, to send msgboxt.bin with argument 'abc'
you should send

[snippet_prefix] +
[ALIGN4( filesize(msgboxt.bin) + strlen('abc')+1 )] +
[msgboxt.bin] +
['abc' + '\0'] +
[0..3 padding bytes]
