All language subtitles for 004 Writing an NSE Script.en

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
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
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranรฎ)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
fa Persian
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu

Original subtitles

1

Writing an NSC script to unwrap offers script support on many topics since it is open source the scripts

2

are constantly increasing by the day or even the existing scripts are improved therefore that means

3

that you can write your own and map script.

4

Now of course it may indeed be necessary if you can't find a script that is more relevant to a crawl

5

that you want to do so all information about and map scripting engine or NSC can be found here and map

6

that word on map scripts are written in the lua programming language if you're not necessarily familiar.

7

I'll tell you that some rules must be followed when writing script.

8

There are certain parts it must be included in the script and this is because then map runs each script

9

in a certain sequence starting from the first line of the script.

10

It'll run step by step according to the rules so a script that is not written correctly will fail.

11

So when writing scripts will then map we don't have to write everything ourselves.

12

There is an map API support which means that many processes that we will be using are already defined

13

in map and we need to do is call the relevant process with the help of the map API.

14

So you can access the map API libraries at this site.

15

Now the NSC script consists of the following main paints the head description categories dependencies

16

author license description field description field tells the subject of this script and what it does.

17

Depending on the length and complexity of the script the description can be several lines think a brief

18

summary would often be more understandable.

19

Categories so the fields that the script is included in are specified so one or more fields can be included.

20

There is no case sensitivity when specifying names for domains.

21

You can go to and map dawg at this address.

22

For example categories equals default discovery safe etc..

23

Author feel information about the person who wrote the script.

24

Using an email address is not recommended.

25

License for license information is required to use a script and all scripts use and map licenses because

26

then map is open source software so it's efficient to specify the following in the script license equals.

27

Same as in map we can look at this page to get that

28

dependency fields so if there is another script in this field that will be used beforehand before the

29

execution of the script.

30

Gonna be specify here when writing scripts you should list the scripts that should work in advance according

31

to the scenario that we have determined.

32

For example dependencies equals SMB boot the rule the rules that will be executed in the script.

33

Here are specified rules are lua commands that run in sequence and return true or false.

34

So script must contain one or more of the following functions that determine when to run the script.

35

3 rule a host rule that most words rule host work and post rule a so pre rule scripts are executed 1

36

before any host is scanned in the script pre scan phase so after each host is scanned the hosts rule

37

import rules scripts are executed most rule scripts run ones.

38

After all the hosts your scan and a script can run in multiple stages if it has several rules.

39

Three rule and post rule do not accept arguments post rule accepts a host table and can for example

40

test the IP address or hostname of the destination port rule.

41

Open open accepts a support table for any port and filtered or unfiltered port states port rules often

42

test factors such as port number port status or listening service name when deciding a port and have

43

example rules are shown in the section entitled rule the standard to choose between a pre rule or a

44

post rule is if the script is doing computer discovery or other network operation then the pre rule

45

should be used.

46

Post rule is reserved for reporting data and statistics collected during scanning

47

the action action is the heart of an NSC script the script preparation includes all instructions that

48

must be executed in the port rule.

49

Host rule or post rule triggers a lua function that accepts the same arguments as a rule the value returned

50

by the action value can be a table of name value pairs a string or zero environment variables.

51

So each script has its own set of environment variables script part obviously the script path script

52

name is the name and this variable can be used in a debug output.

53

Script Type 2 so since a script can have more than one rule function this environment variable indicates

54

which rule has enabled the script which is very useful if the script wants to share some code between

55

different script scanning phases.

56

So how about some examples script writing now let's write an examples script and then scan with a script.

57

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

directory in order to be used by the end map program so open v M's open Kelly log any county user.

59

Root password tour open terminal now write in leaf pad.

60

User share and map scripts test that NFC course you can use it in another text editor will will speed

61

up by using the notes I've prepared before so versus right.

62

Head description equals.

63

So this is a simple script example that determines if it DNS port is open or not.

64

Right.

65

Author equals non byte.

66

Now let's write rule.

67

So here our script will scan and list ESPN UDP ports on the target system.

68

Rule what rule equals function most port return port dot protocol equals equals DCP and port dot state.

69

Equals equals open return port dot protocol equals equals UDP and port dot state equals equals open

70

and an action will list the results action equals function.

71

Most port return this port is open

72

bicyclists record what we do now.

73

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

Enter okay.

75

So as you can see our script works and the results were listed so the subject of scripts is completely

76

dependent on your programming knowledge and your imagination so if you define what you want to do you

77

will have completed really the most important stage the Internet's gonna help you with the rest well

78

and help you with this anyway.

79

So remember you can always contribute to end map by sharing your scripts.

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