Merge branch 'master' into develop
Add backslash and colon to exfil regex

Better support for Windows. Fixes #23
Refactor socket communications

Instead of using 9 bytes with each byte being a decimal digit, use a 32
bit binary value message prefix because apparently that's the legit way
to do socket communications.

Fixes #28
Refactor socket comms using PoetSocket class(es)

Add a PoetSocket class which is a light wrapper over regular sockets and
implements the convention poet uses (32 bit big endian prefix to
messages indicating length). Eliminates all the `socksend(s, ...)'
calls which are now something like `s.send(...)'. Add slightly higher
level subclasses for client and server just to clean up main code.

Addresses #26
Refactor client/server to use OOP

Convert the client and server to use OOP style by putting all the
shell_* functions into PoetServer/Client classes.

Addresses #26
Merge branch 'oop' into develop
Make socket code more robust

Support high load networks where potentially the message prefix will not
arrive intact the first recv()

Fixes #19
Minor fix
Add client delete flag and improve selfdestruct

Add flag to client that instructs client to delete itself on disk at
beginning of execution. Adapt client selfdestruct handling to check
whether client already deleted itself before exiting.

Fixes #30
Add command to change client interval time

Add `chint' (change interval) command which lets the server change the
time the client sleeps between connection attempts between 1 second and
1 week.

Fixes #29
Minor fix

Reformat the "Connected By:" print to be consistent with the other
prints
Refactor exfil

- Allow dashes in exfil file names
- Do not include timestamps in actual file (works for text files, but
  breaks binary files). Instead put them in filenames.
Add compression, slightly refactor write()

Fixes #21
Add docstrings to client and server

Whew!
Add initial shell line buffering

Instead of waiting for the entire command to finish in the client
(via .communicate()[0]) and sending the whole stdout over, buffer the
output line by line so commands like ping get immediate feedback.
Fix random recv() hangs

In the initial while loop of PoetSocket.recv(), cap the initial recv()'s
at a maximum of prefix_len (4 bytes). I'm not exactly sure why
recv()'ing SIZE (4096) resulted in hangs, but in situations where lots
of data is being sent over by the client extremely quickly (ls -lR, for
example), the socket buffer could have actually been filled with the
contents of multiple send()'s from the client before the server had a
chance to process the data of one message and flush the buffer.
Since we're using such as massive recv() size (4096), relative to the
length of each message being sent on the wire (10's of bytes), the
initial loop recv() would have scooped up the contents of multiple
messages, 4 byte header and all.

This is actually the cause of the base64 decoding crashes I noticed. In
these crashes, we were trying to decode valid base64 strings separated
by groups of 3 NULL bytes. These three NULLs are actually the unused
bytes of the header, since messages in this case rarely exceeded the length
that could be represented by 1 byte.
Fix exec -o bug

Fix bug where if there were multiple extensions to file (.tar.gz) we
would leave out periods when reassembling extension. Also default to
.txt extension is no extension is given.
Add remote signals (Unix targets)

In client use select() to multiplex the proc's stdout/err and the
socket so we can simultaneously line buffer the proc output to the
server and listen for anything coming from the server (remote
signal). Only works on Unix targets currently.

Fixes #34
Add cd shell support
Minor fix

Make prefix_len variable a global constant which is more appropriate.
Also get rid of SBUF_LEN which should have been deleted long ago.