1
00:00:01,580 --> 00:00:02,630
So we're still inside.

2
00:00:02,640 --> 00:00:08,210
We've lived in this lecture we're going to see how we can upload and download files from the target

3
00:00:08,210 --> 00:00:08,810
system.

4
00:00:11,080 --> 00:00:15,790
At the moment I'll be running some shell commands and I'm going to look for a file that's interesting

5
00:00:15,790 --> 00:00:16,250
for me.

6
00:00:16,270 --> 00:00:21,940
So first thing we're going to do is download the file and I'm going to do it every day any can see that

7
00:00:21,960 --> 00:00:31,650
I'm in var w w w DVD will do a good do on LS to see all the files right here and we can see that there

8
00:00:31,650 --> 00:00:36,310
is a directory called config and the config directories are.

9
00:00:36,450 --> 00:00:42,510
Or if you see a file called config or directory called config then chances are it contains important

10
00:00:42,510 --> 00:00:43,410
information.

11
00:00:43,440 --> 00:00:48,120
Most of the time it contains information about connecting to the database.

12
00:00:48,490 --> 00:00:54,470
So I'm going to navigate to that directory using the cd command and then I'm going to this to see what

13
00:00:54,470 --> 00:01:02,500
I have and you can see that we have a file called config got into it BHB.

14
00:01:02,550 --> 00:01:07,260
Now we can try to read this using the cat command and we can try to read it using the functions that

15
00:01:07,260 --> 00:01:12,540
come with weekly but this is not what we're and trusted in this lecture.

16
00:01:12,540 --> 00:01:17,280
Let's see how we can download this file so we can read it on our local machine.

17
00:01:17,280 --> 00:01:20,000
Now remember you can't actually browse through this file.

18
00:01:20,000 --> 00:01:25,790
So if we go here to the server and if we go to DVD w a

19
00:01:28,620 --> 00:01:29,220
config

20
00:01:31,990 --> 00:01:37,510
and you see that there is a config file but if we click it you'll see that you can't actually read it

21
00:01:37,780 --> 00:01:42,880
because it's written in Ph D and ph files cannot be read remotely.

22
00:01:42,910 --> 00:01:48,560
So even if you view the source you see that it's empty it has no lines whatsoever.

23
00:01:50,010 --> 00:01:58,540
So let's go back and we're going to use the download so the download is called file download and then

24
00:01:58,540 --> 00:02:02,600
I'm going to put my A.H. to see how to use it because I don't know how to use it.

25
00:02:02,710 --> 00:02:08,410
So just I want you to see the idea of how you use all of these functions you put the function name minus

26
00:02:08,410 --> 00:02:14,350
page to see how to use it and you can see that the way to use it is you literally just specify a file

27
00:02:14,350 --> 00:02:15,380
download.

28
00:02:15,550 --> 00:02:17,160
You can specify the vector.

29
00:02:17,260 --> 00:02:23,200
So this is similar to when we were doing when we were reading the FTC password or executing the shell

30
00:02:23,210 --> 00:02:25,450
SH executing shell commands.

31
00:02:25,540 --> 00:02:32,080
So you can specify the method of reason of downloading the file because sometimes maybe the basic download

32
00:02:32,080 --> 00:02:38,110
method will not work for you so you can just do mynahs vector and you specify the vector that you want.

33
00:02:38,560 --> 00:02:42,990
So in this example I'm just going to use the default one I'm not going to specify a vector.

34
00:02:43,000 --> 00:02:49,360
So again we're going to do file download or path which is the remote path so the file on the server

35
00:02:49,390 --> 00:02:56,400
that you want to download followed by the location that you want to download to on your local machine.

36
00:02:56,440 --> 00:03:05,410
So the command is going to be file download the remote path is going to be config though and that page.

37
00:03:05,800 --> 00:03:07,570
And I want to store it in my room.

38
00:03:07,570 --> 00:03:13,360
So this is on my actual local machine that's going to be stored and rude and I'm going to call it config

39
00:03:13,780 --> 00:03:21,220
downloaded and I'm going to make it at 60 so you can actually put it a PH If you want but I'm going

40
00:03:21,220 --> 00:03:23,090
to make it at 60 in my case.

41
00:03:23,450 --> 00:03:24,850
So the command is very simple.

42
00:03:24,860 --> 00:03:27,620
It's file download followed by the file.

43
00:03:27,650 --> 00:03:33,470
The full path or the location where the file is located and the file for me is located in the current

44
00:03:33,470 --> 00:03:36,950
working directory and it's called config Inc.

45
00:03:37,080 --> 00:03:43,430
BHP and I want to download it to my root config download a dirty XTi so I'm going to call that config.

46
00:03:43,430 --> 00:03:45,350
Downloaded that.

47
00:03:45,770 --> 00:03:51,740
And if I want it if this command didn't work for me then I can just do the vector by doing minus vector

48
00:03:53,590 --> 00:03:59,170
and specify the way that I'm going to download it so I could just specify all the methods that we have

49
00:03:59,170 --> 00:04:04,050
here so we have file we have a free file get and base 64.

50
00:04:04,060 --> 00:04:10,250
So I'm just going to use the file and that's it the file should be downloaded.

51
00:04:10,260 --> 00:04:12,540
So let's go to our file manager.

52
00:04:15,980 --> 00:04:17,570
And we're already in the root.

53
00:04:17,780 --> 00:04:22,010
And you can see that there is a file called config downloaded that the XTi.

54
00:04:22,310 --> 00:04:27,320
If we double click it you'll see the information that was saved in the file.

55
00:04:27,320 --> 00:04:29,140
I remember when we went on the browser.

56
00:04:29,300 --> 00:04:30,700
Nothing was displayed.

57
00:04:30,800 --> 00:04:36,350
When you go here you'll see that you can see everything because we actually downloaded the source code

58
00:04:36,350 --> 00:04:37,030
for the file.
