-
Notifications
You must be signed in to change notification settings - Fork 21
/
main.py
executable file
·27 lines (20 loc) · 769 Bytes
/
main.py
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
from network import WLAN
from microDNSSrv import MicroDNSSrv
# ----------------------------------------------------------------------------
print()
print("=======================================================================")
print()
WLAN().init(mode=WLAN.AP, ssid='Test MicroDNSSrv', auth=(WLAN.WPA2, 'azerty123'))
if MicroDNSSrv.Create( {
"test.com" : "1.1.1.1",
"*test2.com" : "2.2.2.2",
"*google*" : "192.168.4.1",
"*.toto.com" : "192.168.4.1",
"www.site.*" : "192.168.4.1" } ) :
print("MicroDNSSrv started.")
else :
print("Error to starts MicroDNSSrv...")
print()
print("=======================================================================")
print()
# ----------------------------------------------------------------------------