All language subtitles for 004 Writing an NSE Script.en

af Afrikaans
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bn Bengali
bs Bosnian
bg Bulgarian
ca Catalan
ceb Cebuano
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
tl Filipino
fi Finnish
fr French Download
fy Frisian
gl Galician
ka Georgian
de German
el Greek
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
km Khmer
ko Korean
ku Kurdish (Kurmanji)
ky Kyrgyz
lo Lao
la Latin
lv Latvian
lt Lithuanian
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mn Mongolian
my Myanmar (Burmese)
ne Nepali
no Norwegian
ps Pashto
fa Persian
pl Polish
pt Portuguese
pa Punjabi
ro Romanian
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
st Sesotho
sn Shona
sd Sindhi
si Sinhala
sk Slovak
sl Slovenian
so Somali
es Spanish
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
te Telugu
th Thai
tr Turkish
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu
or Odia (Oriya)
rw Kinyarwanda
tk Turkmen
tt Tatar
ug Uyghur
Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated: 1 00:00:00,360 --> 00:00:10,390 Writing an NSC script to unwrap offers script support on many topics since it is open source the scripts 2 00:00:10,390 --> 00:00:20,250 are constantly increasing by the day or even the existing scripts are improved therefore that means 3 00:00:20,250 --> 00:00:23,130 that you can write your own and map script. 4 00:00:23,160 --> 00:00:28,040 Now of course it may indeed be necessary if you can't find a script that is more relevant to a crawl 5 00:00:28,040 --> 00:00:36,930 that you want to do so all information about and map scripting engine or NSC can be found here and map 6 00:00:36,960 --> 00:00:48,080 that word on map scripts are written in the lua programming language if you're not necessarily familiar. 7 00:00:48,080 --> 00:00:53,530 I'll tell you that some rules must be followed when writing script. 8 00:00:53,680 --> 00:01:00,600 There are certain parts it must be included in the script and this is because then map runs each script 9 00:01:01,200 --> 00:01:05,070 in a certain sequence starting from the first line of the script. 10 00:01:06,050 --> 00:01:13,020 It'll run step by step according to the rules so a script that is not written correctly will fail. 11 00:01:14,600 --> 00:01:20,000 So when writing scripts will then map we don't have to write everything ourselves. 12 00:01:20,000 --> 00:01:27,920 There is an map API support which means that many processes that we will be using are already defined 13 00:01:27,930 --> 00:01:34,500 in map and we need to do is call the relevant process with the help of the map API. 14 00:01:37,790 --> 00:01:46,330 So you can access the map API libraries at this site. 15 00:01:46,370 --> 00:01:54,680 Now the NSC script consists of the following main paints the head description categories dependencies 16 00:01:54,860 --> 00:02:03,400 author license description field description field tells the subject of this script and what it does. 17 00:02:05,130 --> 00:02:12,100 Depending on the length and complexity of the script the description can be several lines think a brief 18 00:02:12,100 --> 00:02:14,260 summary would often be more understandable. 19 00:02:16,320 --> 00:02:26,090 Categories so the fields that the script is included in are specified so one or more fields can be included. 20 00:02:26,090 --> 00:02:31,880 There is no case sensitivity when specifying names for domains. 21 00:02:32,160 --> 00:02:35,070 You can go to and map dawg at this address. 22 00:02:37,280 --> 00:02:41,980 For example categories equals default discovery safe etc.. 23 00:02:44,690 --> 00:02:49,670 Author feel information about the person who wrote the script. 24 00:02:49,670 --> 00:02:53,240 Using an email address is not recommended. 25 00:02:55,380 --> 00:03:03,660 License for license information is required to use a script and all scripts use and map licenses because 26 00:03:04,000 --> 00:03:13,500 then map is open source software so it's efficient to specify the following in the script license equals. 27 00:03:13,500 --> 00:03:19,910 Same as in map we can look at this page to get that 28 00:03:24,450 --> 00:03:32,680 dependency fields so if there is another script in this field that will be used beforehand before the 29 00:03:32,680 --> 00:03:34,410 execution of the script. 30 00:03:34,450 --> 00:03:42,700 Gonna be specify here when writing scripts you should list the scripts that should work in advance according 31 00:03:42,700 --> 00:03:45,180 to the scenario that we have determined. 32 00:03:45,490 --> 00:03:55,390 For example dependencies equals SMB boot the rule the rules that will be executed in the script. 33 00:03:55,400 --> 00:04:03,840 Here are specified rules are lua commands that run in sequence and return true or false. 34 00:04:04,950 --> 00:04:10,260 So script must contain one or more of the following functions that determine when to run the script. 35 00:04:11,780 --> 00:04:28,150 3 rule a host rule that most words rule host work and post rule a so pre rule scripts are executed 1 36 00:04:28,640 --> 00:04:36,520 before any host is scanned in the script pre scan phase so after each host is scanned the hosts rule 37 00:04:36,520 --> 00:04:42,730 import rules scripts are executed most rule scripts run ones. 38 00:04:42,750 --> 00:04:49,550 After all the hosts your scan and a script can run in multiple stages if it has several rules. 39 00:04:51,440 --> 00:05:00,780 Three rule and post rule do not accept arguments post rule accepts a host table and can for example 40 00:05:00,840 --> 00:05:05,630 test the IP address or hostname of the destination port rule. 41 00:05:05,630 --> 00:05:16,270 Open open accepts a support table for any port and filtered or unfiltered port states port rules often 42 00:05:16,270 --> 00:05:24,960 test factors such as port number port status or listening service name when deciding a port and have 43 00:05:24,960 --> 00:05:34,030 example rules are shown in the section entitled rule the standard to choose between a pre rule or a 44 00:05:34,030 --> 00:05:42,960 post rule is if the script is doing computer discovery or other network operation then the pre rule 45 00:05:43,200 --> 00:05:44,430 should be used. 46 00:05:45,610 --> 00:05:50,680 Post rule is reserved for reporting data and statistics collected during scanning 47 00:05:55,710 --> 00:06:05,240 the action action is the heart of an NSC script the script preparation includes all instructions that 48 00:06:05,240 --> 00:06:07,610 must be executed in the port rule. 49 00:06:07,820 --> 00:06:19,280 Host rule or post rule triggers a lua function that accepts the same arguments as a rule the value returned 50 00:06:19,310 --> 00:06:28,360 by the action value can be a table of name value pairs a string or zero environment variables. 51 00:06:28,550 --> 00:06:37,010 So each script has its own set of environment variables script part obviously the script path script 52 00:06:37,040 --> 00:06:42,190 name is the name and this variable can be used in a debug output. 53 00:06:43,330 --> 00:06:53,880 Script Type 2 so since a script can have more than one rule function this environment variable indicates 54 00:06:53,940 --> 00:07:00,360 which rule has enabled the script which is very useful if the script wants to share some code between 55 00:07:00,360 --> 00:07:06,290 different script scanning phases. 56 00:07:06,340 --> 00:07:13,740 So how about some examples script writing now let's write an examples script and then scan with a script. 57 00:07:15,510 --> 00:07:26,960 So let's write a script to show if the DNS Board is on a raw so the script must be registered in this 58 00:07:26,960 --> 00:07:38,130 directory in order to be used by the end map program so open v M's open Kelly log any county user. 59 00:07:38,160 --> 00:07:44,440 Root password tour open terminal now write in leaf pad. 60 00:07:44,450 --> 00:07:57,660 User share and map scripts test that NFC course you can use it in another text editor will will speed 61 00:07:57,660 --> 00:08:03,060 up by using the notes I've prepared before so versus right. 62 00:08:03,050 --> 00:08:06,930 Head description equals. 63 00:08:07,060 --> 00:08:12,270 So this is a simple script example that determines if it DNS port is open or not. 64 00:08:12,280 --> 00:08:13,150 Right. 65 00:08:13,160 --> 00:08:18,040 Author equals non byte. 66 00:08:18,080 --> 00:08:19,500 Now let's write rule. 67 00:08:20,390 --> 00:08:25,670 So here our script will scan and list ESPN UDP ports on the target system. 68 00:08:25,670 --> 00:08:39,430 Rule what rule equals function most port return port dot protocol equals equals DCP and port dot state. 69 00:08:39,430 --> 00:08:49,300 Equals equals open return port dot protocol equals equals UDP and port dot state equals equals open 70 00:08:49,900 --> 00:08:58,740 and an action will list the results action equals function. 71 00:08:58,790 --> 00:09:02,840 Most port return this port is open 72 00:09:05,860 --> 00:09:08,290 bicyclists record what we do now. 73 00:09:08,340 --> 00:09:19,210 So on the command line and map script test then dot 0 dot to dot for P fifty three U.S. u s t press 74 00:09:19,210 --> 00:09:21,980 Enter okay. 75 00:09:22,010 --> 00:09:30,880 So as you can see our script works and the results were listed so the subject of scripts is completely 76 00:09:30,880 --> 00:09:38,500 dependent on your programming knowledge and your imagination so if you define what you want to do you 77 00:09:38,500 --> 00:09:44,760 will have completed really the most important stage the Internet's gonna help you with the rest well 78 00:09:44,800 --> 00:09:46,110 and help you with this anyway. 79 00:09:47,140 --> 00:09:51,150 So remember you can always contribute to end map by sharing your scripts. 9472

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.