updated python docs

This commit is contained in:
Brian Carrier 2014-09-15 17:37:58 -04:00
parent 499fdb26fd
commit 1b0c59e1db
5 changed files with 55 additions and 15 deletions

View File

@ -666,6 +666,7 @@ INPUT = main.dox \
services.dox \
modContent.dox \
modDev.dox \
modDevPython.dox \
modIngest.dox \
modReport.dox \
modResult.dox \

View File

@ -1,14 +1,18 @@
/*! \mainpage Autopsy Forensic Browser Developer's Guide and API Reference
<h3>Overview</h3>
Autopsy has been designed as a platform for open source tools besides just The Sleuth Kit. This document is for developers who want to add functionality into Autopsy. This could be in the form of enhancing the existing functionality or by making a module that plugs into it and you may distribute from your own site or push it back into the base distribution.
Autopsy has been designed as a platform for open source tools besides just The Sleuth Kit. This document is for developers who want to add functionality into Autopsy. This could be in the form of enhancing the existing functionality or by making a plug-in module. Plug-in modules can be distributed from your own website (or contributed back).
If you are looking for documentation on using Autopsy, refer to http://sleuthkit.org/autopsy/docs/user-docs/.
If these pages don't answer your question, then send the question to The Sleuth Kit Developer's List (https://lists.sourceforge.net/lists/listinfo/sleuthkit-developers).
If you want to write modules, then these pages are for you:
- \subpage platform_page
- \subpage mod_dev_page
- \subpage services_page
- Setup
-- \subpage mod_dev_page
-- \subpage mod_dev_python_page
- The following are based on specific types of modules:
- \subpage mod_ingest_page
- \subpage mod_report_page

View File

@ -1,10 +1,10 @@
/*! \page mod_dev_page Development Setup
/*! \page mod_dev_page Java Development Setup
<!-- NOTE: This doc contains the concepts that apply when developing
any type of module. Information about specific types of modules should
go into the page for that module type. -->
This page describes the basic concepts and setup that are needed regardless of the module type that you are building.
This page describes the basic concepts and setup that are needed for all types of Java modules. It is not needed for Python module development.
\section mod_dev_setup Basic Setup

View File

@ -0,0 +1,45 @@
/*! \page mod_dev_py_page Python Development Setup
<!-- NOTE: This doc contains the concepts that apply when developing
any type of module. Information about specific types of modules should
go into the page for that module type. -->
This page describes the basic concepts and setup that are needed for all types of Python modules. It is not needed for Java module development.
Autopsy uses Jython (http://www.jython.org) to enable Python scripting. Jython looks like Python and gets converted into Java byte code and run on the JVM. Its biggest limitations are:
- Limited to Python 2.7
- Can't use Python libraries that have native code
Using it is very easy though in Autopsy and it allows you to access all of the Java services and classes that you need.
To develop a module, you should follow this section to get your environment setup and then read the later sections on the different types of modules.
\section mod_dev_py_setup Basic Setup
You don't really need anything to develop a python Autopsy module except for the standard Autopsy and your favorite text editor.
\section mod_dev_py_create Creating a Basic Python Module
\subsection mod_dev_py_create_dir Structure
Autopsy requires that you have a self-contained folder for each Python module. This prevents naming collisions with other modules. You can name the folder what ever you want. You'll need to put all of the libraries that you depend on in there too.
You will need to copy this folder into Autopsy's Python script folder. It will scan this folder each time it looks for modules. You can find the location of this folder from the "Tools -> Python Scripts" menu item.
\subsection mod_dev_py_create_create Module Creation
# Create a folder
# Add a .py file to it (see later sections for details on its contents)
# Copy the folder to the previously mentioned folder to make updates during development.
While it may be tempting to use the Python Scripts folder as a development folder, be warned that if you do a 'Clean' from the Java development environment (NetBeans), you could lose your script. If do not have NetBeans installed for Autopsy development, then you could be fine.
That's it. Autopsy will find the module each time it needs it and you can make updates without having to resetart Autopsy each time.
\section mod_dev_py_distribute Distribution
To distribute and share your Python module, ZIP up the folder and send it around. Other users of the module should expand the ZIP file and drop the folder into their Autopsy Python folder.
*/

View File

@ -4,18 +4,8 @@
\section ingest_modules_getting_started Getting Started
This page describes how to develop ingest modules using either Java or Python (Jython). It assumes you have
already set up your Java development environment as described in \ref mod_dev_page. Note that the Jython JAR file
has been added to the Autopsy-Core NetBeans project as a wrapped JAR.
already set up your development environment as described in \ref mod_dev_page or \ref mod_dev_python_page.
Ingest modules developed using Java can be added directly to your private copy of the source code, but if you
want to share your module with others, it should be developed as a NetBeans module. You can then distribute the module
and users can install it in Autopsy using the NetBeans Plugin Manager accessed through Autopsy's Tools -> Plugins menu item.
The user will go to the Downloaded tab, push the Add Plugins... button to navigate to and select your NetBeans Module file,
and then push the Install button to complete the installation.
Ingest modules developed using Jython are installed in Autopsy by placing them in their own subdirectory of the python_modules
directory. A window into the python_modules directory can be opened through the Autopsy's Tools -> Python Plugins menu item.
Create a folder in this directory and create or place your Python scripts in this folder.
\section ingest_module_types Ingest Module Types