1
0
Fork 0

Parse config

This commit is contained in:
Alex Kotov 2020-04-17 19:53:10 +05:00
parent 9340c2681f
commit 67b698f982
Signed by: kotovalexarian
GPG Key ID: 553C0EBBEB5D5F08
1 changed files with 7 additions and 0 deletions

View File

@ -1,8 +1,10 @@
#!/usr/bin/env python3
import sys
import pytun
import struct
import ipaddress
import json
class IpHeader:
def __init__(self, raw):
@ -24,6 +26,11 @@ class IpHeader:
self.dst = ipaddress.IPv4Address(dst)
def main():
config_filename = sys.argv[1]
with open(config_filename) as config_file:
config = json.load(config_file)
tun_iface = pytun.TunTapDevice()
print(tun_iface.name)