WEBVTT

00:00:00.040 --> 00:00:03.690
So now that we have a module installed, let's actually look at the

00:00:03.690 --> 00:00:05.380
modules command and see what we can do with it.

00:00:08.640 --> 00:00:10.020
So here we have a couple of subcommands.

00:00:10.020 --> 00:00:14.060
We can load a module, we can reload a module, and we can search our modules.

00:00:14.400 --> 00:00:16.070
The reload command is a development command,

00:00:16.070 --> 00:00:18.890
so I won't go into it now, but loading is obviously going to load that

00:00:18.890 --> 00:00:22.750
module and will take us to that module's context. Search will obviously

00:00:22.760 --> 00:00:24.690
search the installed modules that we have.

00:00:25.320 --> 00:00:28.270
Searching modules behaves just like searching the marketplace does.

00:00:28.270 --> 00:00:31.650
You still have the smart searching, you still have the smart matching,

00:00:31.660 --> 00:00:33.650
all of that good stuff, so treat it very,

00:00:33.650 --> 00:00:38.230
very similar there. If we're on, just do a quick list, do module

00:00:38.230 --> 00:00:40.830
search, it'll show us all the modules we have installed.

00:00:41.130 --> 00:00:41.880
This is expected.

00:00:41.890 --> 00:00:45.450
We've only installed one, so a very simple setup we have going right now.

00:00:46.380 --> 00:00:53.220
So let's go ahead and load this module. And I'm going to

00:00:53.220 --> 00:00:54.650
use this smart loading feature here.

00:00:55.140 --> 00:00:57.420
And so I do, I just give it the word miner, it finds it, we're

00:00:57.420 --> 00:01:00.280
good to go, and now we're in the module context.

00:01:00.470 --> 00:01:01.730
So If you use the help command,

00:01:02.940 --> 00:01:04.550
we'll see that we've got some different things here.

00:01:04.550 --> 00:01:06.090
There's definitely some overlap.

00:01:06.490 --> 00:01:09.700
There's the db command still exists here, the keys command, the modules

00:01:09.700 --> 00:01:12.420
command, there's a lot of overlap between the two contexts,

00:01:12.420 --> 00:01:16.080
but there's also some new stuff, such as the options command,

00:01:16.080 --> 00:01:20.050
which gives us access to the global context options in the module context.

00:01:20.430 --> 00:01:22.650
There's the info command, the input command.

00:01:22.940 --> 00:01:24.670
Some of these we'll go over here in just a moment,

00:01:24.670 --> 00:01:27.740
but there are a different subset of commands here that

00:01:27.740 --> 00:01:29.870
are unique to the module context.

00:01:31.230 --> 00:01:36.000
Now let's look at the options for modules, or for this module in particular.

00:01:38.740 --> 00:01:40.510
So if you list our options, we see one.

00:01:40.860 --> 00:01:41.250
Obviously,

00:01:41.250 --> 00:01:44.340
this is a big difference from the global context where we had many, and the

00:01:44.340 --> 00:01:48.080
global context options apply to the framework as a whole, whereas this

00:01:48.080 --> 00:01:52.150
particular list of options would only impact this one module.

00:01:52.740 --> 00:01:57.370
Now, every module in the framework does some sort of transformation,

00:01:57.560 --> 00:02:00.660
and so this source option will always exist,

00:02:00.670 --> 00:02:03.910
and it will always have a default configuration when a developer

00:02:03.910 --> 00:02:08.039
creates a module to have to give us some sort of default source of

00:02:08.039 --> 00:02:11.050
data, and that typically comes from the database.

00:02:11.380 --> 00:02:11.580
And so,

00:02:11.580 --> 00:02:14.420
if you want a little bit more info on what default

00:02:14.420 --> 00:02:16.310
means for this particular module,

00:02:16.610 --> 00:02:19.060
let's use the info command in the module context,

00:02:19.940 --> 00:02:23.050
and you'll see a lot more information now about this module,

00:02:23.190 --> 00:02:26.650
including some additional data about that source option.

00:02:28.000 --> 00:02:28.890
And if you look here,

00:02:28.890 --> 00:02:32.520
it says the default option is SELECT DISTINCT company FROM

00:02:32.520 --> 00:02:33.660
companies WHERE company IS NOT NULL.

00:02:34.070 --> 00:02:36.950
So it's a database query that's going to pull information from

00:02:36.950 --> 00:02:41.150
the database, company names specifically, and then transform

00:02:41.150 --> 00:02:42.790
that data into something else.

00:02:42.920 --> 00:02:44.550
But look at these other options you have.

00:02:44.760 --> 00:02:48.500
You can provide it an individual string, you can provide it a path,

00:02:49.030 --> 00:02:54.140
which is a path to a list of inputs, or you could create a custom query

00:02:54.140 --> 00:02:56.780
to pull data from some other part of the database.

00:02:56.860 --> 00:03:00.550
So it's very flexible in terms of what information it could take in.

00:03:00.680 --> 00:03:05.150
And this SOURCE option is the default option that is there

00:03:05.240 --> 00:03:07.120
for every single module in the framework.

00:03:07.270 --> 00:03:10.640
So it's not something that has to be manually built, it's not something that

00:03:10.640 --> 00:03:14.300
has to be manually configured. A lot of times you just install a module and run

00:03:14.300 --> 00:03:16.940
it, and it'll behave exactly as you would expect.

00:03:17.330 --> 00:03:20.410
Now let's go ahead and run this module and see what it finds for us.

00:03:27.040 --> 00:03:29.700
(Typing) So we ran the module, and we saw it go through a couple of

00:03:29.700 --> 00:03:32.090
different company names, and here at the bottom after it runs,

00:03:32.090 --> 00:03:34.950
we get a nice summary of things that it found.

00:03:35.520 --> 00:03:36.600
So in this particular case,

00:03:36.600 --> 00:03:40.220
the whois_miner module found four different kinds of information.

00:03:40.530 --> 00:03:41.820
It found some companies,

00:03:41.920 --> 00:03:44.940
but 0 new, so we didn't identify any new companies

00:03:44.940 --> 00:03:47.830
that we didn't already know about, but it would have told us if we did.

00:03:48.110 --> 00:03:50.460
It did discover several new locations.

00:03:50.570 --> 00:03:53.830
It discovered several net blocks and several contacts,

00:03:53.840 --> 00:03:57.750
all associated with the single Pluralsight company name that we gave it.

00:03:58.090 --> 00:04:00.150
And once again, if we wanted to see this information,

00:04:00.740 --> 00:04:14.680
we could do show locations to see them, show netblocks, and show contacts.
