-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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
Implement query operation for Event on DBManager and Remote Data Service #11163
Implement query operation for Event on DBManager and Remote Data Service #11163
Conversation
Allows API documentation to display the event model example correctly.
I'm seeing weird behavior when setting the Background: I have 58 events in my DB, with id starting at 1 and going up to 58. With this command: Outputs:
As you can see, it looks like it starts the data at An interesting note is that if I switch the ordering to Command: Output:
|
The The
In the second example, ascending order is specified so your events would start with your first record ID 1 and end with the max ID of 58. An |
Release NotesAdd a |
Implements a query (read) operation for
Event
on both the DBManager and Remote Data Service. The existingMsf::DBManager::Event#events
method on both master (MSF5) and 4.x branches fails to execute without issue.Ticket: MS-2818
Changes
events
method for querying Event database records from both the local and remote data services:order
- The eventcreated_at
sort order. Valid values::asc
,:desc
,asc
ordesc
. Default::desc
:limit
- The maximum number of events that will be retrieved from the query. Default: 100:offset
- The number of events the query will begin reading from the start of the set. Default: 0Verification
msfdb restart
, andinit
/reinit
if necessary.msfconsole
and connect to the data service started above if you didn't select the option to connect automatically during initialization. See Metasploit Web Service for more information.db_status
reportsConnection type: http. Connected to remote_data_service: (https://localhost:8080)
https://localhost:8080/api/v1/api-docs
msfconsole
mv ~/.msf4/config ~/.msf4/config.disabled
msfconsole
db_status
reportsConnected to msf. Connection type: postgresql.
msfconsole
mv ~/.msf4/config.disabled ~/.msf4/config