Remove copy/paste of comments that don't apply.
Bring over connector.py from previous work.
Move common finishing tasks to a function.

If a service is distributable but being run in a non-distributed manner
that service now needs to call self.finalize() upon completion.

If a service is not distributable there is no changes that need to be made.
We can use .only() now.
Fix result handling.
Make generic the best-effort parsing of HELO from a .msg

Some Boeing specific code needed to be cleaned up. This change will use the domain of the CRITs email address to do best-effort parsing of the HELO.
Use CRITsConfig instead of Settings
Remove contexts from service land.

Contexts existed from a time before we were using mongoengine and made
things easier at the time. Now that we use objects everywhere, just pass
them into services. This eliminates the need for contexts entirely.

This means things like run_triage() and run_service() need to be changed
everywhere.

Move is_pe() and is_pdf() into the Sample class.

Remove LocalAnalysisSource and LocalAnalysisDestination classes, they were
never used and never fully implemented.

Remove _delete_all_analysis_results(), it was never used anywhere.
There is an issue where bulk uploading a "file" object type causes details pages to error on a url lookup for a file md5 in the object_listing_row_widget.html template. This is because objects bulk upload only takes in a string for the "Value" while the normal object upload form takes in a local file path. Would need a click event for file browsing in handsontable, then ajax upload both json and file data which seems like a pain.

For now disable the "file" object uploads and add a note saying that object file uploads are not supported and that users can use the normal object upload form if they want to upload files.
First stab at creating a screenshot feature.

Currently done:

- Ability to upload a screenshot for a top-level object.
    - Can provide a description, tags, and source info.
- Ability to view thumbnails in the UI for a top-level object.
    - Screenshots that have been assigned to that top-level object *as
      well as* any screenshots with tags that match the bucket list tags
      for that top-level object will be shown.
    - Screenshots are limited via source access.
- Ability to look at full-size images in gallery in the UI for a
  top-level object.
- Ability to add an existing screenshot to another top-level object by
  using its ObjectId
    - Currently there's no way to expose the ObjectId other than opening
      the image in a new tab and sniping it from the URL.

Things not working:

- When uploading a screenshot you get no feedback in the modal.
- When uploading a screenshot the thumbnail gallery is not updated.

Code for both of the above exists but it doesn't seem to be working or
isn't being triggered right.

Things to do:

- Expose the ObjectId of the screenshots for easy copying.
- Create a search feature that will go to its own page with a thumbnail
  gallery view.
- Make the API do things.
- A way to remove a screenshot from a top-level object.
- When adding a screenshot through ObjectId include the source
  information if it is filled out and append that source instead of
  ignoring it.

This does add a new dependency: pillow 2.4.0.
Updating UPDATING, DEPENDENCIES, and stuff.

Removed most of the contents of the 'api.py' file since it was copied
over from somewhere else and I didn't get to it tonight. Added the
dependency information, indexing, and UPDATING information to go along
with it.
Track image MD5 for duplicate images.

Allows us to track the same image being uploaded and not dupe documents
in the DB.
Merge branch 'master' into distributed_services
Uploading now works properly.

When you upload a screenshot you'll now get a proper message and the
screenshot will be added to the gallery if it isn't already there.
Fix triage.

Need to pass username to run_service now.
Remove _fetch_meta().

There is no need for this now that we pass the object into services.
Switch from data to filedata.

This is only used as a default, can be overridden by services.
Fix write_to_file().
Add UPDATING entry.
Removal of screenshots and storing screenshot ids.

You can now remove screenshots from a top-level object. When you mouse
over a thumbnail you'll get two icons:

- trash: remove the icon from the top-level object.
- ring/dot: store the screenshot id to a cookie for use in the upload
  screenshot form. you can store multiple ids. if the icon is a ring it
  means you can store it. if it stays permanently visible and is a dot,
  it means it's in your cookie ready to be used.

There is now a trash icon at the top of the Screenshots section. If it
is black it means there are not stored Screenshot IDs in your cookie. If
it is blue it means there are. If you click it, it will clear out all of
the stored Screenshot IDs in your cookie.