Skip to content
This repository has been archived by the owner on Dec 4, 2024. It is now read-only.

Commit

Permalink
Merge pull request #29 from xabiugarte/dev
Browse files Browse the repository at this point in the history
Updates to documentation
  • Loading branch information
xabiugarte authored Mar 13, 2019
2 parents 345286d + 66d90e3 commit 360dd5c
Show file tree
Hide file tree
Showing 4 changed files with 115 additions and 16 deletions.
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import types
sys.path.insert(0, os.path.join(os.path.abspath('..'), 'server'))

import sphinx.ext.autodoc
import sphinx.ext.autodoc.importer

# -- General configuration ------------------------------------------------

Expand All @@ -44,7 +44,7 @@
autodoc_mock_imports = ['httplib2', 'oauth2client', 'apiclient',
'django', 'capstone']

class _MyMockModule(sphinx.ext.autodoc._MockModule):
class _MyMockModule(sphinx.ext.autodoc.importer._MockModule):
'''Class created to get around autodoc issues with server's dependencies.'''
@classmethod
def __getattr__(self, name):
Expand Down
36 changes: 35 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,41 @@ Installing your own FIRST server can be quick and easy with an Ubuntu machine an
http://localhost:8888/oauth/google
http://first.talosintelligence.com/oauth/google
Once created you will have the option to down the JSON file containing the generated secret. Optionally, you can add install/ssl/apache.crt and apache.key file if you have an SSL certificate you would prefer to use.
Once created you will have the option to download the JSON file containing the generated secret. Optionally, you can add install/ssl/apache.crt and apache.key file if you have an SSL certificate you would prefer to use. (Note that docker will generate one for you when the docker image is built.)

.. important::

**Server configuration (first_config.json)**

Before building the docker image of FIRST-server you will need to create a configuration file under the path ``server/first_config.json``. You have an example configuration file that you can copy, under the following path: ``server/example_config.json``. This configuration file has the following contents:

.. code::
{
"secret_key" : "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"db_engine" : "django.db.backends.mysql",
"db_dbname" : "first_db",
"db_user" : "root",
"db_password" : "password12345",
"db_host" : "mysql",
"db_port" : 3306,
"debug" : true,
"allowed_hosts" : ["localhost", "testserver"],
"oauth_path" : "/usr/local/etc/google_secret.json"
}
This configuration values should just work correctly on a default local docker set up. For a production enviroment:

* ``secret_key`` should be a random and unique value
* ``db_user``, ``db_password``, ``db_host``, ``db_port`` should be updated to match your MySQL production database.
* ``debug`` should be set to false
* ``allowed_hosts`` should match the host name where you configured your server (e.g.: first.talosintelligence.com)
* ``oauth_path`` should match the path where you have your ``google_secret.json`` file.

Once you have created and downloaded your ``google_secret.json`` file, and created the ``first_config.json`` configuration file, you can proceed to build and start your FIRST-server docker image:

.. code::
Expand Down
10 changes: 5 additions & 5 deletions server/example_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
"secret_key" : "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",

"db_engine" : "django.db.backends.mysql",
"db_dbname" : "first",
"db_user" : "user",
"db_password" : "pass",
"db_host" : "localhost",
"db_dbname" : "first_db",
"db_user" : "root",
"db_password" : "password12345",
"db_host" : "mysql",
"db_port" : 3306,

"debug" : true,
"allowed_hosts" : ["localhost", "testserver"],

"oauth_path" : "/path/to/your/google_secret.json",
"oauth_path" : "/usr/local/etc/google_secret.json"
}
81 changes: 73 additions & 8 deletions server/first_core/disassembly/__init__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,77 @@
# Third Party Modules
from capstone import *
from capstone.ppc import *
from capstone.systemz import *
from capstone.arm import *
from capstone.arm64 import *
from capstone.x86 import *
from capstone.sparc import *
from capstone.mips import *

from capstone import CS_MODE_32
from capstone import CS_MODE_64
from capstone import CS_MODE_16
from capstone import CS_ARCH_PPC
from capstone import CS_ARCH_X86
from capstone import CS_ARCH_SYSZ
from capstone import CS_ARCH_ARM
from capstone import CS_MODE_ARM
from capstone import CS_ARCH_ARM64
from capstone import CS_ARCH_SPARC
from capstone import CS_ARCH_MIPS

from capstone.ppc import PPC_OP_REG
from capstone.ppc import PPC_OP_IMM
from capstone.ppc import PPC_OP_MEM
from capstone.ppc import PPC_OP_INVALID

from capstone.x86 import X86_OP_REG
from capstone.x86 import X86_OP_IMM
from capstone.x86 import X86_OP_MEM
from capstone.x86 import X86_OP_INVALID
from capstone.x86 import X86_INS_CALL
from capstone.x86 import X86_INS_JA
from capstone.x86 import X86_INS_JAE
from capstone.x86 import X86_INS_JB
from capstone.x86 import X86_INS_JBE
from capstone.x86 import X86_INS_JCXZ
from capstone.x86 import X86_INS_JE
from capstone.x86 import X86_INS_JECXZ
from capstone.x86 import X86_INS_JG
from capstone.x86 import X86_INS_JGE
from capstone.x86 import X86_INS_JL
from capstone.x86 import X86_INS_JLE
from capstone.x86 import X86_INS_JMP
from capstone.x86 import X86_INS_JNE
from capstone.x86 import X86_INS_JNO
from capstone.x86 import X86_INS_JNP
from capstone.x86 import X86_INS_JNS
from capstone.x86 import X86_INS_JO
from capstone.x86 import X86_INS_JP
from capstone.x86 import X86_INS_JRCXZ
from capstone.x86 import X86_INS_JS
from capstone.x86 import X86_INS_LJMP
from capstone.x86 import X86_REG_SP
from capstone.x86 import X86_REG_EBP
from capstone.x86 import X86_REG_ESP
from capstone.x86 import X86_REG_RSP

from capstone.systemz import SYSZ_OP_REG
from capstone.systemz import SYSZ_OP_IMM
from capstone.systemz import SYSZ_OP_MEM
from capstone.systemz import SYSZ_OP_INVALID

from capstone.arm import ARM_OP_REG
from capstone.arm import ARM_OP_IMM
from capstone.arm import ARM_OP_MEM
from capstone.arm import ARM_OP_INVALID
from capstone.arm64 import ARM64_OP_REG
from capstone.arm64 import ARM64_OP_IMM
from capstone.arm64 import ARM64_OP_MEM
from capstone.arm64 import ARM64_OP_INVALID

from capstone.sparc import SPARC_OP_IMM
from capstone.sparc import SPARC_OP_REG
from capstone.sparc import SPARC_OP_MEM
from capstone.sparc import SPARC_OP_INVALID

from capstone.mips import MIPS_OP_REG
from capstone.mips import MIPS_OP_IMM
from capstone.mips import MIPS_OP_MEM
from capstone.mips import MIPS_OP_INVALID


arch_mapping = {
'ppc' : (CS_ARCH_PPC, CS_MODE_32),
Expand Down

0 comments on commit 360dd5c

Please sign in to comment.