programme:dhcpdnsadmin:dda_module
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen der Seite angezeigt.
Beide Seiten, vorherige ÜberarbeitungVorherige ÜberarbeitungNächste Überarbeitung | Vorherige Überarbeitung | ||
wiki:skripte:dda_module [2018/06/10 10:53] – pulsar | programme:dhcpdnsadmin:dda_module [2020/11/13 13:54] (aktuell) – ↷ Seite von programme:dda:dda_module nach programme:dhcpdnsadmin:dda_module verschoben pulsar | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
+ | |||
+ | ====== Python Standard Module ====== | ||
+ | |||
+ | |||
+ | ===== ipaddress Modul ===== | ||
Das '' | Das '' | ||
+ | |||
+ | |||
+ | |||
+ | ==== Genearate IPs ==== | ||
+ | |||
+ | <code python> | ||
+ | |||
+ | >>> | ||
+ | >>> | ||
+ | [IPv4Address(' | ||
+ | </ | ||
+ | |||
+ | |||
+ | Network objects can be iterated to list all the addresses belonging to the network. For iteration, all hosts are returned, including unusable hosts (for usable hosts, use the hosts() method). An example: | ||
+ | |||
+ | <code python> | ||
+ | >>> | ||
+ | >>> | ||
+ | ... addr | ||
+ | ... | ||
+ | IPv4Address(' | ||
+ | IPv4Address(' | ||
+ | IPv4Address(' | ||
+ | IPv4Address(' | ||
+ | IPv4Address(' | ||
+ | IPv4Address(' | ||
+ | IPv4Address(' | ||
+ | IPv4Address(' | ||
+ | IPv4Address(' | ||
+ | IPv4Address(' | ||
+ | IPv4Address(' | ||
+ | IPv4Address(' | ||
+ | </ | ||
+ | |||
+ | |||
+ | === Die Lösung zum Generieren === | ||
+ | |||
+ | Nur die reinen IP-Adressen aufgelistet und nur nutzbare Adressen, also keine 172.16.2.0 usw: | ||
+ | |||
+ | <code python> | ||
+ | >>> | ||
+ | >>> | ||
+ | ... | ||
+ | ... | ||
+ | 172.16.2.1 | ||
+ | 172.16.2.2 | ||
+ | 172.16.2.3 | ||
+ | 172.16.2.4 | ||
+ | 172.16.2.5 | ||
+ | 172.16.2.6 | ||
+ | 172.16.2.7 | ||
+ | 172.16.2.8 | ||
+ | 172.16.2.9 | ||
+ | 172.16.2.10 | ||
+ | 172.16.2.11 | ||
+ | 172.16.2.12 | ||
+ | 172.16.2.13 | ||
+ | 172.16.2.14 | ||
+ | </ | ||
+ | |||
+ | ==== Reverse IP mit ipaddress Modul ==== | ||
+ | |||
+ | folgender Code läuft auf Raspbian 9 mit python 3.5 | ||
+ | <code python> | ||
+ | >>> | ||
+ | >>> | ||
+ | >>> | ||
+ | ' | ||
+ | </ | ||
+ | |||
+ | |||
Alle folgenden Module lassen sich per '' | Alle folgenden Module lassen sich per '' | ||
Zeile 13: | Zeile 89: | ||
blockstack-zones (0.14.3) | blockstack-zones (0.14.3) | ||
- | Aktueller und größer als namedparser. Die Aufgabe ist das schreiben von Zone-Files | + | Aktueller und größer als namedparser. Die Aufgabe ist das schreiben von Zone-Files. |
+ | |||
+ | |||
+ | zonecreate | ||
+ | Die gleiche Aufgabe von zonecreate, wie bei blockstack-zones, | ||
cloudflaredns-backup (1.8) - CloudFlare DNS backup to BIND files | cloudflaredns-backup (1.8) - CloudFlare DNS backup to BIND files |
programme/dhcpdnsadmin/dda_module.1528620834.txt.gz · Zuletzt geändert: 2018/06/10 10:53 von pulsar