0:11
hello everyone welcome to my nasac
0:13
YouTube channel in this video I'm going
0:16
to show you a interesting but very
0:19
powerful share command tool share GPT or
0:23
you can call it as GPT I found this tool
0:27
from GitHub Project Share on the
0:30
GPT and uh this is a command line
0:34
productivity tool you can use it from
0:38
your shell such as Powers shell CMD bash
0:42
Dash directly and uh you can talk to
0:47
those AI large language model such open
0:53
GPT there's a lots of tasks you can
0:57
directly tell chat gbt to generate a
1:01
code that execute for you from the shell
1:05
directly that will save you lots of time
1:09
to Google it to search it or using a web
1:13
page to talk to CH gbt land tuming the
1:17
command copy paste from web page to the
1:22
sh if you know how you can chat with
1:26
chat gbt how to generate in a code how
1:29
to use sgpt that will easily save you
1:34
tons of time for certain tedious work
1:38
you have to do in command line so now
1:46
it this already have a section of
1:50
installation in GitHub repository but
1:54
it's not clear what's the pre
1:57
requirement how you can install it
2:00
that's why I decided to make this video
2:03
and I'm going to use Cali as an example
2:08
to show you how you can get it running
2:11
in the can Inus I already have a video
2:14
to show you how to deploy Cali into VM
2:18
real workstation that I'm going to use
2:21
this VM as an example to do this lab
2:25
which show you how to install sgpt shell
2:30
GPT and how to use it with some basic
2:35
usage but if you need more definitely
2:37
you can come back here to see there's
2:40
some interesting usage
2:43
here the another requirement for this
2:47
installation is open AI you need to have
2:50
open AI API to embed into your
2:54
installation so that's something I'm
2:57
going to touch in this lab as as well
3:06
installation let's assume you already
3:08
have k n installed in your environment
3:13
especially VM workstation as I showed
3:16
you in my previous lab here if you want
3:20
to watch it again please find out
3:23
insiration video link in my this videos
3:27
description default username can C
3:30
password C login then we need to go into
3:34
command line so this is a new Flash
3:37
installation you may want to run AP
3:41
update for this command of course you
3:44
need to get into sudu
3:46
mode password is carry if you don't want
3:49
to get into sudu mode you can using sudu
3:52
command sudu mode then you can
3:55
directly do installation and updating
3:58
your repository and up upgrade to it
4:00
latest version as I mentioned there's
4:03
requirement which I put into my blog
4:07
post uh you need to python you need to
4:10
open AI API key then there's a lot of
4:14
steps already been showing here you can
4:16
follow that go through them step by step
4:19
uh in this video I'm going to just
4:22
quickly show you here as well the first
4:25
SC of course you need to have python so
4:29
let's start install Python
4:37
3 after install the Python 3 you also
4:41
need to install pip package installer
4:45
python package installer so same
4:51
thing that should be very easy and
4:54
simple to install if you go back to the
5:01
project reposit they will ask you to do
5:04
this installation unfortunately there's
5:07
some small problem here if you try that
5:10
you probably will get an error message I
5:13
just want to show you here there some
5:16
notes and some error message yeah
5:18
doesn't work properly so in this case I
5:26
command just you just want to put the
5:28
break system pack packages at the end of
5:31
this command then you should get it
5:43
perfect so we have sgbt ready to use now
5:48
we get to next step we need to open AI
5:50
API key here so how we get it let's go
5:59
to get the open AI API key of course you
6:03
need to go to open AI website definitely
6:08
first this uh chat GPT API and solar
6:12
click on API then it will direct you to
6:17
open.com assuming you have account with
6:20
your email you can easily register one
6:22
for free once you are in the API
6:25
platform you go to your icon go to your
6:31
here you will see the API keys so I
6:34
already have my API key created so I'm
6:37
going to create another one for demo
6:40
purpose we call it as
6:44
gbt2 um you may have a project so select
6:48
project then you will create your key
6:52
that paste into your notepad for future
6:56
to use you can easily put this key
7:00
into here pleas enter your open a API
7:16
board well it will say you can find your
7:20
key here something wrong here maybe
7:23
because of my paste it didn't show it
7:25
properly but we should be able to check
7:27
it we should be able to se
7:35
GPT list all file then you should be
7:38
able to see this configuration
7:41
file you can see open AI key let's
7:43
change that I paste tce so that's a way
7:48
how you can change your API key if you
7:50
decide to change it so I just want to
7:53
demonstrate that part
7:59
let's delete it then add our new key in
8:05
equal p scrip board that's our API
8:10
key don't forget to save
8:17
it to verify your result after this part
8:25
sgpt now you can freely chat with your
8:29
chat GPT and then use command line tool
8:34
sgpt to run certain tasks directly from
8:38
your command line Next Step we're going
8:41
to show you some usage
8:47
examples sgpt usage is very simple it
8:52
support you to use native language to
8:55
talk to those large language model such
8:58
as CH GPT directly so what we can do
9:02
here we can check the version that's
9:05
something you can do immediately it's
9:09
1.4.4 which is latest
9:17
well the next thing you probably want to
9:20
do is want to get help you want to see
9:24
what command you can use it here you can
9:27
choose little model editor Etc you can
9:32
use the shell options to generate an
9:36
execute shell command that mostly we
9:38
would like to do of course you can use
9:41
interaction mode also you can Chate in a
9:44
code only you can use chat option as
9:47
well simple usage type sgpt and put the
9:52
question here what you want to chat with
9:54
ch such as what is my network
10:02
so it were telling you those command
10:05
maybe you want to be more specify using
10:07
the Shell command to tell you to show
10:09
you some information let me demon
10:13
that which is going to talk to chat GPT
10:17
to get the command and then execute to
10:21
it directly from the command line so I
10:24
will say what is my DNS server
10:32
it cannot telling you cat Etc result.com
10:36
do you want to execute it yes so then
10:39
you will directly see your name server 1
10:43
81242 so that's how easy you can get the
10:46
information directly through command
10:49
line we can ask more using sgpt just to
10:56
sh asking chat gbt to find out the code
11:00
to find out all active
11:04
machines in my network in my local
11:10
network so that may gave us something
11:14
such an map command and since we didn't
11:18
specify local network they using just 19
11:22
61.0 which is not exactly what we are
11:26
looking for so we just it let be TR
11:30
to say yeah my network is21
11:33
16820 24 can you please find out all
11:40
again and unfortunately this command
11:44
doesn't give us right
11:46
result you will see they found the 256
11:50
IP address and the 256 H up which is
11:54
wrong I don't have that much machines in
11:57
my network so so we have to tune this
12:02
question so what I'm going to do is I'm
12:05
going to okay and now
12:10
fpin then please using that to find out
12:14
all active machines in my no network so
12:18
but I of course I can remember all tools
12:21
parameters or grammar how to use it but
12:24
in this way chat gbt help me find out
12:27
right command and theying a listing all
12:31
active IPS in my network there's more
12:35
interesting thing we can do here let's
12:38
say you want to use in specific tool
12:40
find out the subdomain for your own
12:43
company's domain so that's the command I
12:46
will put in here sgpt D chat footprint D
12:50
show using certain tool to gaing a list
12:54
subdomain so it will
12:56
generate a command for you and then put
13:00
into uh subd domains. txt file of course
13:04
you can execute it but the problem is we
13:07
didn't have L sub Lister installed it so
13:12
the dash command show telling us that in
13:15
this case if you find the L then we have
13:18
to install it first just one command
13:23
then we can try to run this again
13:30
you have to uh know the basic concept
13:33
behind those command and then how they
13:36
run into it what kind of other message
13:38
you will get if that the case then you
13:42
have to fix that first as you can see
13:46
all subdomains has been listing here for
13:49
you to look at it one more thing we can
13:52
test it is using another tool called the
13:56
Harvester to together in host so let's
13:59
see how this command looks
14:02
like it's very simple command and that's
14:06
just a tool so they will show you the
14:10
host they found it from microsoft.com
14:13
and the source is D Duck Go the web
14:16
searching engine companies so yeah very
14:19
easy we found those host online maybe
14:24
subdomains we can call it
14:28
whatever they didn't find any emails
14:31
they didn't find uh IPS probably hide it
14:35
that's another tool which you can
14:36
collect in more information you don't
14:39
have to know what's the parameter what's
14:42
the option you can put into this tool
14:44
you can directly ask chat GPT generate
14:48
the command and then you can run it
14:51
directly from the command line so that's
14:53
all for this video I hope you get some
14:56
useful information and enjoy it if yes
15:00
give me a thumb up and subscribe to my
15:02
channel if you haven't see you in my