Nhoya / gOSINT

OSINT Swiss Army Knife
GNU General Public License v3.0
613 stars 80 forks source link

New Module: server mode #18

Open Nhoya opened 5 years ago

Nhoya commented 5 years ago

I would add a module that let run gOSINT as a web service exposing REST API

jkomyno commented 5 years ago

Hi, I'm interested in this. I haven't used gOSINT before, how would you like to structure the REST API? Do you have any specification in mind?

Nhoya commented 5 years ago

Hi, thanks for the interest in this project.

I would like to serve one endpoint to trigger scans specifying the type of scan with a special parameter (something like module="whatever") and the target, answering with the scan result, and save it in a database.

Another endpoint will answer the scan result stored in the database for a single target (if they exists) and, passing the timestamp of the scan the target as parameters will answer with the scan result.

The output will be JSON-encoded.

Nothing really complex after all, if you are familiar with [GraphQL}(https://graphql.org/) we could just use it instead of REST.

Other suggestions are well accepted :)

jkomyno commented 5 years ago

Thanks for the highlight. I have read and experimented with GraphQL in the past but for the moment I'd be more confident using REST. Do you have any preference for the Database?

Nhoya commented 5 years ago

MySQL would be good but I would like to have an interface for others DBMS leaving freedom to the users

jkomyno commented 5 years ago

I've started developing it here: https://github.com/jkomyno/gOSINT/tree/feature/18-server-mode-module

jkomyno commented 5 years ago

In order to expose a server, I will need to refactor how the modules function are exported. That means taking them away from the main package. Is that ok?

Nhoya commented 5 years ago

There is a big issue here, you started working on a fork of the master branch, note that you should always start from the dev branch (A LOT of stuff have changed, including modules logic)

jkomyno commented 5 years ago

My bad, sorry for not noticing earlier. Thanks for pointing it out