-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHACKING
More file actions
51 lines (35 loc) · 2.06 KB
/
Copy pathHACKING
File metadata and controls
51 lines (35 loc) · 2.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
Poznamky k modulum programu
---------------------------
vars - globalni asociativni pole var, kde klic je nazev promenne (!var) z
sablon. Promenne se ukladaji samostatne pro kazdou zonu. Neexistujici
promenna vrati prazdny retezec.
cmds - globalni asociativni pole cmd, kde klic je nazev prikazu a hodnota je
callback delegat, ktery se vola z parseru.
eparser - parser, vstup a vystup pomoci struktury Element. Pred pouzitim
nutno mit nastavene pole cmd a take nastavit onSet, onVar a onCmd delegaty.
ipaddr - ip adresa vcetne masky a konverze z/do retezce
hosts - interni databaze hostu a ip adres hostdb. Pouziva se hlavne pro generovani
reverznich zon. Udrzuje seznam pripojenych IP adres k danemu hostname a
obracene. U kazdeho zaznamu je i polozka changed, oznacujici, jestli se dany
zaznam zmenil. Do databaze uklada modul scanzone.
scanzone - nacte z vygenerovaneho zonoveho souboru zaznamy do databaze. Je
to nutne, aby se nacetly i data nezpracovana parserem. Zatim nacita pouze A
zaznamy.
zones - trida k ukladani pomocnych informaci k zone (nazvy souboru, S/N, apod).
Source modules notes
--------------------
vars - global associative array "var" where key is a variable name (!var)
from templates. Variables are unique for each zone. Nonexistent variable
returns empty string.
cmds - global associative array "cmd" where key is a command name and a
value is a callback delegate, which is then called from eparser.
eparser - simple parser, it uses struct Element for input and output. It's
necessary to set array "cmd" and inSet, onVar onCmd delegates before usage.
ipaddr - ip address including netmask and string conversion
hosts - internal database of hosts and ip addresses "hostdb". Used mainly
for reverse zone generation. It keeps a list of IP addresses associated with
a given hostname and conversely. Each record has a changed flag. Module
scanzone writes to hostdb.
scanzone - it reads a generated zone file into hostdb. It's necessary to
read even nongenerated records. At the moment it reads A records only.
zones - class with additional zone data (filenames, S/N, etc)