Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retrieve data by task id on web-server side #107

Open
makstakeda opened this issue Jun 23, 2020 · 1 comment
Open

Retrieve data by task id on web-server side #107

makstakeda opened this issue Jun 23, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@makstakeda
Copy link

makstakeda commented Jun 23, 2020

This one is about web-server implementation. Current implementation is writing data into the tables and as response gives only how many rows is added and how many rows are new but it would be very useful if /tasks/{id} endpoint (or something similar) will respond with actual data retrieved by specific task.

Also would be nice to have a module identifier for each task in a queue to know which module is running.

Do you have any plans on implementing this?

@lanmaster53
Copy link
Owner

lanmaster53 commented Jun 24, 2020

Not at this time.

Recon-ng doesn't maintain state when running a module. Meaning, it doesn't aggregate data then add it at one time. It adds data to the database as it goes. That way, it's less memory intensive because it doesn't have to store all the results in memory, and it won't lose data if something were to fail before the module finishes. It only knows the summary information because it maintains counters internally.

The API responds with only the task ID so the task queue can be queried for task progress. Once again, there's no maintained state between data gained and module ran (task) other than the "module" column in each table which says which module added that data. But subsequent runs will not be distinct.

Because these tasks are running in an asynchronous worker in the background, there is significant re-engineering required to figure out a way to maintain state of data harvested between the main app, Recon-ng, and the task worker. Tracking which module is associated with a task is something that can be handled by the API client. It would also be pretty easy to add to the task result as well. I'd need to take a closer look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants