1. User Guide

This section of the documentation provides user focused information such as installing and quickly using this package.

logo travis-ci for master branch Documentation Status Project Status: Active - The project has reached a stable, usable state and is being actively developed.

1.1. rastrea2r-server

Flask based Restful Server to handle requests from rastrea2r

1.2. Quickstart

1.2.1. Requirements

  • Python 3.4+
  • VirtualEnv

1.2.2. Features

  • Sample Rest Client
  • Strong Password Hashing (stored in sqlite DB)
  • Rate limiting for safety
  • JSONified error handling
  • Extensive logging to both stdout and log files

1.2.3. Install Guide


It is best practice to install run Python projects in a virtual environment, which can be created and activated as follows using Python 3.6+.

  • Make sure you have virtualenv and Python3 installed on your system (pip3 install virtualenv)
  • Clone the repo: `https://github.com/rastrea2r/rastrea2r-server.git`
  • Install the virtualenv and activate it
$ cd rastrea2r-server
$ make venv
$ source ./.venv/rastrea2r_server/bin/activate
(rastrea2r_server) $

* You must activate the virtualenv before starting the server
* Initialize DB and Add a user
(rastrea2r_server) $./manage_server.py --init
(rastrea2r_server) $./manage_server.py --add testuser
  • Start the server:
(rastrea2r_server) $./start_server.py

1.2.4. Testing

  • Test the info request with a browser:
  • Or you could use curl
(rastrea2r_server) $curl -d '{"key1":"value1", "key2":"value2"}' -H "Content-Type: application/json" -H "Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3N3ZA==" -X POST http://localhost:5000/rastrea2r/api/v1.0/results

(rastrea2r_server) $curl -H "Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3N3ZA=="  http://localhost:5000/rastrea2r/api/v1.0/rule?rulename=example.yara

Note: Basic auth uses the base64 encoded string corresponding to username:password (in this case the username:password combo used was testuser:testpasswd)

1.3. API Reference

The API Reference provides API-level documentation.

1.4. Report Bugs

Report bugs at the issue tracker.

New feautrue requests can be made using the following template in the bug tracker.