1 00:00:00,930 --> 00:00:04,770 Let's continue with our penetration testing, a Central Command line skills. 2 00:00:06,190 --> 00:00:10,390 The first to tell is that we will talk about today is OK and cut. 3 00:00:11,820 --> 00:00:17,910 They all can cut or commonly use when filtering outputs from your comments or sometimes from files. 4 00:00:19,580 --> 00:00:24,320 Let's take an example on the cut, come in and see how we filter the output that we will get from a 5 00:00:24,320 --> 00:00:24,800 file. 6 00:00:26,210 --> 00:00:28,850 Let's take a look at our IP is that text file. 7 00:00:36,050 --> 00:00:42,890 As we can see, this file has two parts separated by a space, the first part is the user name and the 8 00:00:42,890 --> 00:00:44,180 second part is the IP. 9 00:00:45,690 --> 00:00:51,330 We want to use the cut, come in, just put each line into two parts, the username part and the IP 10 00:00:51,330 --> 00:00:56,000 part, we can use the best argument which specifies that the limiter. 11 00:00:56,640 --> 00:01:02,910 So if you want to put the lines into two parts with this piece as a delimiter, we can use a Dashty 12 00:01:03,240 --> 00:01:05,700 and then double quotes and then space between them. 13 00:01:06,840 --> 00:01:14,520 Let's try we will cap the IP is that text and use its output as input to the cut command. 14 00:01:25,350 --> 00:01:27,750 Notice that I didn't like our command. 15 00:01:27,780 --> 00:01:30,120 It mandates us to specify a field. 16 00:01:30,840 --> 00:01:35,270 We can use that by adding the dash F and the number of the field we want to print. 17 00:01:37,290 --> 00:01:42,810 The first part of the line on the left side will be field number one, and the second part on the right 18 00:01:42,840 --> 00:01:44,100 will be field number two. 19 00:01:44,820 --> 00:01:45,540 Let's write 20 00:01:50,550 --> 00:01:50,970 nice. 21 00:01:52,050 --> 00:01:57,540 Now, what if we want to further filter the output to show only the names without the user name part? 22 00:01:58,530 --> 00:02:05,130 We still can pass this output to another cut command, but this time we will use the colon as our delimiter 23 00:02:05,130 --> 00:02:06,390 and prenda second field. 24 00:02:16,900 --> 00:02:17,360 Nice. 25 00:02:18,190 --> 00:02:25,300 Now, let's see if we can accomplish the same thing using the ARC utility, the ARC utility is a little 26 00:02:25,300 --> 00:02:26,850 different than the cut command. 27 00:02:27,610 --> 00:02:30,060 It has a default delimiter, which is the space. 28 00:02:30,610 --> 00:02:36,070 So we don't have to specify that if we know that our delimiter is a space. 29 00:02:36,820 --> 00:02:42,790 But in order for us to manually specify the limiter, we use the Desh Uppercase F. 30 00:02:43,240 --> 00:02:50,210 After we specify our delimiter, we need to specify which field to print using the print statement and 31 00:02:50,210 --> 00:02:52,610 the dollar sign followed by the field number. 32 00:02:53,350 --> 00:02:54,040 Let's try. 33 00:03:12,750 --> 00:03:13,200 Nice. 34 00:03:13,740 --> 00:03:17,490 Now, let's further filter the output to show only the name part. 35 00:03:33,450 --> 00:03:38,070 Now we are done with the all clear cut comments, let's switch to something else. 36 00:03:39,630 --> 00:03:43,590 We will now talk about how to manage our processes and Kawi leanings. 37 00:03:44,640 --> 00:03:46,320 Let's first start the process. 38 00:03:46,320 --> 00:03:47,580 Simple Pinkham and. 39 00:03:54,670 --> 00:04:01,510 In order to run this command in the background, we can first redirect its output to a file and add 40 00:04:01,510 --> 00:04:03,340 ampersand to the end of the command. 41 00:04:04,660 --> 00:04:05,320 Let's try. 42 00:04:10,020 --> 00:04:16,530 Now, let's check the output file and see if the process is really running in the background and writing 43 00:04:16,530 --> 00:04:17,970 its output to our file, 44 00:04:24,510 --> 00:04:26,320 it looks like our process is running. 45 00:04:27,540 --> 00:04:33,850 Now, let's bring our process to the foreground and stop it using the control policy in our keyboard. 46 00:04:34,800 --> 00:04:40,020 But first, let's see what's our process number by typing jobs in the command line. 47 00:04:44,100 --> 00:04:48,050 As we can see, we have only one job and it has a number one. 48 00:04:49,080 --> 00:04:55,170 Let's bring it to the foreground by typing f g space percent, followed by the job number. 49 00:05:02,160 --> 00:05:05,430 Now, let's start the process with the control policy. 50 00:05:09,260 --> 00:05:09,530 Nice. 51 00:05:10,430 --> 00:05:16,970 We can also use the control plus Z to suspend the process and put it in the background, hilarious. 52 00:05:18,500 --> 00:05:19,430 Let's try that. 53 00:05:37,410 --> 00:05:44,790 Now, let's start with the man with the control policy, the process running in the background with 54 00:05:44,790 --> 00:05:51,310 the kill command, but first let's run the process and examine its ID using the command. 55 00:05:59,510 --> 00:06:05,540 There are a lot of processes running in the background, let's filter them using the crêpe told me and 56 00:06:05,540 --> 00:06:06,830 look for our Pinkham and. 57 00:06:20,490 --> 00:06:27,390 Notice, the second column is for our society, let's copy that I.D. number so we can use it with our 58 00:06:27,630 --> 00:06:28,110 comment. 59 00:06:37,640 --> 00:06:42,590 Now, let's say she came in again and see if the process is still running. 60 00:06:49,130 --> 00:06:52,460 As you can see from the output, the process has been terminated. 61 00:06:54,560 --> 00:06:56,350 We have reached the end of this lesson. 62 00:06:56,840 --> 00:06:58,490 Thank you and see you in the next one.