Skip to content

4. Local Database

Heitor Gouvêa edited this page Jun 29, 2021 · 1 revision

Introduction

To make things simpler and easier, the spellbook doesn't use any database itself, but some .JSON files with a document structure, currently being:

# Responsible for storing all module information: name, category, id, description
.config/modules.json       

# Responsible for storing API Keys for platforms like Shodan, Hunter.io and others
.config/credentials.json   

Working with these files, we managed to avoid some lines of code, unnecessary consumption of resources and setup is simpler.

For the current context of Spellbook this works well, but perhaps in the future it will be necessary to adopt another solution.

Managing credentials

Credentials management can be done through the module: Core::Credentials, it is only necessary to inform the platform that is to query information, or the platform followed by its value in case of writing/updating:

$ perl spellbook.pl -m Core::Credentials --help           

Core::Credentials
==============
-h, --help       See this menu
-p, --platform   Read some credentials filtering by platform
-v, --value      Define a value of a platform
$ perl spellbook.pl -m Core::Credentials -p shodan -v "YourAPIKeyHere"

Value updated
$ perl spellbook.pl -m Core::Credentials -p shodan

YourAPIKeyHere

Managing modules


Clone this wiki locally