Okay,
so now that we have a general idea of how the framework works
now we want to actually start getting data.
Now,
Recon‑ng operates on this idea of transforming data into other kinds of data.
So it may try to take a contact and transform it into a credential or take
a domain and try to transform it into a list of hosts.
But basically,
what that requires is the implicit task here is that we
need to have some data to start with.
And so we have to provide the database with some seed data that it
can then use as the starting point for some of these
transformations that we're going to ask it to make.
So what I think we'll do is we'll just start with a company.
Let's just start with a company.
And so the way that we add seed data is we're going to use a database command.
And the database command has some options here.
We can do a direct delete, a direct insert,
we can add some notes to a particular row in the database,
we can do a raw general query, or we can list out the schema.
Now the schema command here will help us see what the database looks
like so that we can better create raw queries.
But the whole reason why the delete and insert commands exist here
is to give you shortcuts for entering and removing data so you
don't have to create raw SQL queries.
So here, obviously,
we're going to create data, so db insert. And it requires us to give it a table.
And, by the way,
there is also command completion here and the ability to do
command history using the up arrow and down arrow.
So those are nice features.
And you may have noticed me doing some of that already.
So we want a db insert and we're going to insert into companies table.
And then it goes down line by line and will ask us what we want to
put in each row in that particular database.
So in this particular case I'm just going to put in the company text
Pluralsight. Don't necessarily need a description.
Don't necessarily need any notes at this point in time.
And now we have a row of data.
And if we want to see our data in the database we can use the show
command to show us all of the companies. Now the show command is also a
shortcut that gives us easy access to all of the different tables of
data stored within Recon‑ng's database.
So basically,
it's just another macro that runs a select
statement for all data within a table, and you just give it the table name.
It does some other things as well,
but that's beyond the scope of what we're talking about here.