交接文件同步

This commit is contained in:
韩丁康
2024-05-27 10:39:10 +08:00
parent 9a4b30ce7c
commit 04ad1df10e
32 changed files with 527201 additions and 1385 deletions

4
.gitignore vendored
View File

@@ -1 +1,5 @@
*.awdb
__pycache__
*.pdf
*.json
*.csv

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View File

@@ -1,6 +1,16 @@
# ohmybs
# bs_fig
毕设图绘制代码
## 目录说明
## Getting started
毕设各种绘图代码合集
| 文件夹 | 说明 |
| :------: | :----------------------------------------------------------: |
| figcode | 实验结果统计图绘制使用python代码注意需要在data文件夹放入埃文数据库的awdb文件可找小组内同学老师要相关文件 |
| 文章图 | 引言、背景介绍相关的图使用draw.io绘制 |
| 研究点一 | 《基于动态域名水印的DNS服务发现方法》方法内容图的绘制使用draw.io绘制 |
| 研究点二 | 《基于别名地址解析的双栈DNS服务识别方法》方法内容图的绘制使用draw.io绘制 |
## awdb文件
![image-20240527102807883](D:\EXP\bs_fig\figcode\README.assets\image-20240527102807883.png)

View File

@@ -1,245 +0,0 @@
# !coding=utf-8
import datetime
import logging
import time
from concurrent import futures
import grpc
import pytz
from neomodel import db, StringProperty, DateTimeFormatProperty, RelationshipTo, StructuredRel, IntegerProperty, \
StructuredNode, config, BooleanProperty
import analyze_pb2
import analyze_pb2_grpc
import analyzedutil as aul
logging.basicConfig(level=logging.DEBUG,filename="./log/pythonrun.log",filemode="w",
format='%(asctime)s - %(filename)s[line:%(lineno)d] - %(levelname)s: %(message)s')
class node:
ip = ""
AS = ""
next = ""
isp = ""
cou = ""
couCode = ""
prov = ""
lat = ""
lng = ""
FindTime = ""
dataOK = ""
owner = ""
def __init__(self, ip):
self.ip = ip
record = aul.getrecord(ip)
if record == 1:
self.dataOK = False
return
self.dataOK = True
self.isp = aul.filterNull(record.get('isp', b'').decode("utf-8"))
self.lat = aul.filterNull(record.get('latwgs', b'').decode("utf-8"))
self.lng = aul.filterNull(record.get('lngwgs', b'').decode("utf-8"))
self.prov = aul.filterNull(record.get('province', b'').decode("utf-8"))
self.AS = aul.filterNull(record.get('asnumber', b'').decode("utf-8"))
self.couCode = aul.filterNull(record.get('areacode', b'').decode("utf-8"))
self.cou = aul.filterNull(record.get('country', b'').decode("utf-8"))
self.FindTime = datetime.datetime.now(pytz.UTC)
self.owner = aul.filterNull(record.get('owner', b'').decode("utf-8"))
# 与go之间的通信
class RequestServe(analyze_pb2_grpc.GrpcServiceServicer):
graph_conn = ""
def AnalyzeService(self, request, context):
'''
具体实现AnalyzeService服务方法
:param request:
:param context:
:return:
'''
r = request
if r.gtype == "neo4j":
if self.graph_conn == "":
url = str(r.guri).split("//")[0] + "//" + r.guser + ":" + r.gpass + "@" + str(r.guri).split("//")[1]
self.graph_conn = neo4j_connector(url)
logging.info("已连接到图数据库Neo4j:" + r.guri)
result = self.graph_conn.work_with_neoj_53(r.data)
return analyze_pb2.result(res=result)
return analyze_pb2.result(res="not support")
working_addr = "127.0.0.1"
working_port = "56789"
def serve():
# 启动 rpc 服务,这里可定义最大接收和发送大小(单位M)默认只有4M
server = grpc.server(futures.ThreadPoolExecutor(max_workers=10), options=[
('grpc.max_send_message_length', 100 * 1024 * 1024),
('grpc.max_receive_message_length', 100 * 1024 * 1024)])
analyze_pb2_grpc.add_GrpcServiceServicer_to_server(RequestServe(), server)
server.add_insecure_port(working_addr + ":" + working_port)
server.start()
logging.info("Python分析模块启动工作在 " + working_addr + ":" + working_port)
try:
while True:
time.sleep(60 * 60 * 24) # one day in seconds
except KeyboardInterrupt:
server.stop(0)
class RelResolver53(StructuredRel):
W = IntegerProperty()
LTIME = DateTimeFormatProperty(default_now=True, format="%Y-%m-%d %H:%M:%S")
# 查询记录定义
class NodeResolverQuery(StructuredNode):
QNAME=StringProperty(required=True)
QTYPE=StringProperty()
# 解析器和查询记录的关系
class RelResolverQuery(StructuredRel):
W = IntegerProperty()
class NodeResolver53(StructuredNode):
IP = StringProperty(required=True, unique_index=True)
AS = StringProperty()
ISP = StringProperty()
COU = StringProperty()
CCODE = StringProperty()
PROV = StringProperty()
LAT = StringProperty()
LNG = StringProperty()
IPType = StringProperty()
FTIME = DateTimeFormatProperty(format="%Y-%m-%d %H:%M:%S")
LTIME = DateTimeFormatProperty(default_now=True, format="%Y-%m-%d %H:%M:%S")
W = IntegerProperty()
ISPUBLIC = BooleanProperty(default=False)
LINK = RelationshipTo("NodeResolver53", "IP_LINK", model=RelResolver53)
QLINK=RelationshipTo("NodeResolverQuery","Q_LINK",model=RelResolverQuery)
class neo4j_connector:
graph = ""
# nodematcher = ""
# relatmatcher = ""
def __init__(self, url):
# 连接neo4j
#config.ENCRYPTED = True
config.DATABASE_URL =url
db.set_connection(url)
# data=[ip1,ip2,ispublic,qname,qtype]
def work_with_neoj_53(self, data):
datastr=""
for d in data:
datastr=datastr+str(d)+" , "
logging.debug("处理数据:"+datastr+"")
############################################### 对解析器节点进行处理#####################################################
for d in range(len(data) - 3):
n = node(data[d])
if not n.dataOK:
return "node err because ip"
# 查询是否存在节点
nd, exist = self.checknode_neo4j(ip=n.ip)
# 不存在则新建
if not exist:
nd = NodeResolver53(AS=n.AS, COU=n.cou,
CCODE=n.couCode, LAT=n.lat, LNG=n.lng,
ISP=n.isp, IPType=aul.IP46(n.ip), PROV=n.prov, FTIME=n.FindTime,
LTIME=n.FindTime, IP=n.ip, W=1)
# IP1是开放解析器
if data[2] == "0" and d == 0:
nd.ISPUBLIC = True
nd.save()
# 存在则只修改时间
else:
# nd.LTIME = time.strftime('%Y-%m-%d %H:%M:%S', time.localtime())
nd.LTIME = datetime.datetime.now(pytz.UTC)
if nd.W is not None:
nd.W += 1
else:
nd.W = 1
nd.save()
################################################ 对查询记录节点进行处理################################################
# 查询是否存在节点
# q,exist=self.checknode_neo4j(q=data[3],qtype=data[4])
# # 不存在则新建
# if not exist:
# q = NodeResolverQuery(QNAME=data[3],QTYPE=data[4])
# q.save()
# 存在则不做处理
############################################ 查询解析器是否存在关系#############################################
L, lexist = self.checklink_neo4j(data[0], data[1])
# 数据存在问题则退出
if L == "Err":
return "node err when link"
# 不存在则建立关联
if not lexist:
L[0].LINK.connect(L[1], {'W': 1, 'LTIME': datetime.datetime.now(pytz.UTC)}).save()
# 存在则修改权重
else:
L.W += 1
L.LTIME = datetime.datetime.now(pytz.UTC)
L.save()
# 提交链接
############################################查询解析器和记录间的关系#########################################
# QL, lexist = self.checkquerylink(data[1], data[3],data[4])
# # 数据存在问题则退出
# if QL == "Err":
# return "node err when link"
# # 不存在则建立关联
# if not lexist:
# QL[0].QLINK.connect(QL[1], {'W': 1}).save()
# # 存在则修改权重
# else:
# QL.W += 1
# QL.save()
# 完成处理,返回
logging.debug("完成处理数据:{"+datastr+"}")
return "success"
def checknode_neo4j(self, ip=None,q=None,qtype=None):
# 查询IP
if ip!=None:
a = NodeResolver53.nodes.get_or_none(IP=ip)
# 查询记录
else:
a=NodeResolverQuery.nodes.get_or_none(QNAME=q,QTYPE=qtype)
if a is not None:
return a, True
return None, False
def checklink_neo4j(self, ip_from, ip_to):
f = NodeResolver53.nodes.get_or_none(IP=ip_from)
t = NodeResolver53.nodes.get_or_none(IP=ip_to)
if f is None or t is None:
return "Err", False
rel = f.LINK.relationship(t)
if rel is not None:
return rel, True
return [f, t], False
def checkquerylink(self,ip,qname,qtype):
r=NodeResolver53.nodes.get_or_none(IP=ip)
q=NodeResolverQuery.nodes.get_or_none(QNAME=qname,QTYPE=qtype)
if r is None or q is None:
return "Err", False
rel=r.QLINK.relationship(q)
if rel is not None:
return rel, True
return [r, q], False
if __name__ == '__main__':
serve()

1114
fig.ipynb

File diff suppressed because one or more lines are too long

273633
figcode/53openIPv6.txt Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -5,7 +5,6 @@ from analyzer import node
data = []
with Progress() as p:
# inputdata = "./openIPv6dns.txt"
inputdata="./recurisivev6dns.txt"
print(len(open(inputdata).readlines()))
task = p.add_task("[blue]Working...", total=sum(1 for _ in open(inputdata)))
@@ -61,7 +60,6 @@ cc = d['isp'].value_counts().to_dict()
# 柱状图
bar_chart = pygal.Bar(print_values=True, print_values_position='top')
# bar_chart.title = '国内各服务商开放IPv6 DNS解析器数量'
i=0
x=[]
for k,v in cc.items():

View File

@@ -19,38 +19,31 @@ def IP46(IP: str):
path_ip4app = "./data/IP_scene_all_cn.awdb"
path_ip6 = "./data/IP_city_single_BD09_WGS84_ipv6.awdb"
path_ip6_en = "./data/IP_city_single_BD09_WGS84_ipv6_en.awdb"
path_ip4qvxian = "./data/IP_basic_single_WGS84.awdb"
path_ip4qvxian_en = "./data/IP_basic_single_WGS84_en.awdb"
# 实例化数据读取器
def makereader(arg=0):
# 默认加载所有离线数据
dloader_ip4app = awdb.open_database(path_ip4app)
dloader_ip6 = awdb.open_database(path_ip6)
dloader_ip6en = awdb.open_database(path_ip6_en)
dloader_ip4qx = awdb.open_database(path_ip4qvxian)
return dloader_ip4app, dloader_ip4qx, dloader_ip6
dloader_ip4qxen = awdb.open_database(path_ip4qvxian)
return dloader_ip4app, dloader_ip4qx, dloader_ip6,dloader_ip4qxen,dloader_ip6en
reader_ip4app, reader_ip4qx, reader_ip6 = makereader()
reader_ip4app, reader_ip4qx, reader_ip6,reader_ip4qxen,reader_ip6en = makereader()
# # 传入一个ip地址根据对象中的数据进行IP关联分析
# def make_IPinfo(ip):
# record=getrecord(ip)
# cou = record.get('areacode', b'').decode("utf-8")
# multiarea = record.get('multiAreas', {})
# if multiarea:
# print("有多组记录")
# else:
# pass
# return record
# 返回IP离线库中与ip相关的记录记录中不包含应用场景
def getrecord(ip):
def getrecord(ip,lang="ch"):
if (IP46(ip) == "v4"):
return IP4_info(ip)
return IP4_info(ip,lang)
elif (IP46(ip) == "v6"):
return IP6_info(ip)
return IP6_info(ip,lang)
else:
print("地址存在问题")
print(ip)
@@ -58,12 +51,18 @@ def getrecord(ip):
# 返回IPv4记录
def IP4_info(ip):
(record, prefix_len) = reader_ip4qx.get_with_prefix_len(ip)
def IP4_info(ip,lang="ch"):
if lang=="ch":
(record, prefix_len) = reader_ip4qx.get_with_prefix_len(ip)
else:
(record, prefix_len) = reader_ip4qxen.get_with_prefix_len(ip)
return record
# 返回IPv6记录
def IP6_info(ip):
(record, prefix_len) = reader_ip6.get_with_prefix_len(ip)
def IP6_info(ip,lang="ch"):
if lang=="ch":
(record, prefix_len) = reader_ip6.get_with_prefix_len(ip)
else:
(record, prefix_len) = reader_ip6en.get_with_prefix_len(ip)
return record

34
figcode/analyzer.py Normal file
View File

@@ -0,0 +1,34 @@
# !coding=utf-8
import datetime
import pytz
import analyzedutil as aul
class node:
ip = ""
AS = ""
next = ""
isp = ""
cou = ""
couCode = ""
prov = ""
lat = ""
lng = ""
FindTime = ""
dataOK = ""
owner = ""
def __init__(self, ip,lang="ch"):
self.ip = ip
record = aul.getrecord(ip,lang)
if record == 1:
self.dataOK = False
return
self.dataOK = True
self.isp = aul.filterNull(record.get('isp', b'').decode("utf-8"))
self.lat = aul.filterNull(record.get('latwgs', b'').decode("utf-8"))
self.lng = aul.filterNull(record.get('lngwgs', b'').decode("utf-8"))
self.prov = aul.filterNull(record.get('province', b'').decode("utf-8"))
self.AS = "ASN"+str(aul.filterNull(record.get('asnumber', b'').decode("utf-8")))
self.couCode = aul.filterNull(record.get('areacode', b'').decode("utf-8"))
self.cou = aul.filterNull(record.get('country', b'').decode("utf-8"))
self.FindTime = datetime.datetime.now(pytz.UTC)
self.owner = aul.filterNull(record.get('owner', b'').decode("utf-8"))

34
figcode/awdb/__init__.py Normal file
View File

@@ -0,0 +1,34 @@
import awdb.reader
try:
import awdb.extension
except ImportError:
awdb.extension = None
from awdb.const import (MODE_AUTO, MODE_MMAP, MODE_MMAP_EXT, MODE_FILE,
MODE_MEMORY, MODE_FD)
def open_database(database, mode=MODE_AUTO):
has_extension = awdb.extension and hasattr(awdb.extension,
'Reader')
if (mode == MODE_AUTO and has_extension) or mode == MODE_MMAP_EXT:
if not has_extension:
raise ValueError(
"MODE_MMAP_EXT requires the awdb.extension module to be available"
)
return awdb.extension.Reader(database)
if mode in (MODE_AUTO, MODE_MMAP, MODE_FILE, MODE_MEMORY, MODE_FD):
return awdb.reader.Reader(database, mode)
raise ValueError('Unsupported open mode: {0}'.format(mode))
def Reader(database):
return open_database(database)
__title__ = 'awdb'
__version__ = '1.5.2'
__author__ = ''
__license__ = 'Apache License, Version 2.0'
__copyright__ = 'Copyright 2013-2020 AW, Inc.'

39
figcode/awdb/compat.py Normal file
View File

@@ -0,0 +1,39 @@
import sys
import ipaddress
if sys.version_info[0] == 2:
def compat_ip_address(address):
if isinstance(address, bytes):
address = address.decode()
return ipaddress.ip_address(address)
int_from_byte = ord
FileNotFoundError = IOError
def int_from_bytes(b):
if b:
return int(b.encode("hex"), 16)
return 0
byte_from_int = chr
string_type = basestring
else:
def compat_ip_address(address):
return ipaddress.ip_address(address)
int_from_byte = lambda x: x
FileNotFoundError = FileNotFoundError
int_from_bytes = lambda x: int.from_bytes(x, 'big')
byte_from_int = lambda x: bytes([x])
string_type = str

6
figcode/awdb/const.py Normal file
View File

@@ -0,0 +1,6 @@
MODE_AUTO = 0
MODE_MMAP_EXT = 1
MODE_MMAP = 2
MODE_FILE = 4
MODE_MEMORY = 8
MODE_FD = 16

168
figcode/awdb/decoder.py Normal file
View File

@@ -0,0 +1,168 @@
from __future__ import unicode_literals
import struct
from awdb.compat import byte_from_int, int_from_byte, int_from_bytes
from awdb.errors import InvalidDatabaseError
class Decoder(object):
def __init__(self, database_buffer, pointer_base=0, pointer_test=False):
self._pointer_test = pointer_test
self._buffer = database_buffer
self._pointer_base = pointer_base
def _decode_array(self, size, offset):
array = []
for _ in range(size):
(value, offset) = self.decode(offset)
array.append(value)
return array, offset
def _decode_boolean(self, size, offset):
return size != 0, offset
def _decode_bytes(self, size, offset):
new_offset = offset + size
return self._buffer[offset:new_offset], new_offset
def _decode_double(self, size, offset):
self._verify_size(size, 8)
new_offset = offset + size
packed_bytes = self._buffer[offset:new_offset]
(value, ) = struct.unpack(b'!d', packed_bytes)
return value, new_offset
def _decode_float(self, size, offset):
self._verify_size(size, 4)
new_offset = offset + size
packed_bytes = self._buffer[offset:new_offset]
(value, ) = struct.unpack(b'!f', packed_bytes)
return value, new_offset
def _decode_int32(self, size, offset):
if size == 0:
return 0, offset
new_offset = offset + size
packed_bytes = self._buffer[offset:new_offset]
if size != 4:
packed_bytes = packed_bytes.rjust(4, b'\x00')
(value, ) = struct.unpack(b'!i', packed_bytes)
return value, new_offset
def _decode_map(self, size, offset):
container = {}
for _ in range(size):
(key, offset) = self.decode(offset)
(value, offset) = self.decode(offset)
if key == value:
container[key] = bytes(value, 'utf-8')
else:
container[key] = value
# print("###")
# print(container)
# print("###")
return container, offset
def _decode_pointer(self, size, offset):
pointer_size = (size >> 3) + 1
buf = self._buffer[offset:offset + pointer_size]
new_offset = offset + pointer_size
if pointer_size == 1:
buf = byte_from_int(size & 0x7) + buf
pointer = struct.unpack(b'!H', buf)[0] + self._pointer_base
elif pointer_size == 2:
buf = b'\x00' + byte_from_int(size & 0x7) + buf
pointer = struct.unpack(b'!I', buf)[0] + 2048 + self._pointer_base
elif pointer_size == 3:
buf = byte_from_int(size & 0x7) + buf
pointer = struct.unpack(b'!I',
buf)[0] + 526336 + self._pointer_base
else:
pointer = struct.unpack(b'!I', buf)[0] + self._pointer_base
if self._pointer_test:
return pointer, new_offset
(value, _) = self.decode(pointer)
return value, new_offset
def _decode_uint(self, size, offset):
new_offset = offset + size
uint_bytes = self._buffer[offset:new_offset]
return int_from_bytes(uint_bytes), new_offset
def _decode_utf8_string(self, size, offset):
new_offset = offset + size
return self._buffer[offset:new_offset].decode('utf-8'), new_offset
_type_decoder = {
1: _decode_pointer,
2: _decode_utf8_string,
3: _decode_double,
4: _decode_bytes,
5: _decode_uint,
6: _decode_uint,
7: _decode_map,
8: _decode_int32,
9: _decode_uint,
10: _decode_uint,
11: _decode_array,
14: _decode_boolean,
15: _decode_float,
}
def decode(self, offset):
new_offset = offset + 1
ctrl_byte = int_from_byte(self._buffer[offset])
type_num = ctrl_byte >> 5
if not type_num:
(type_num, new_offset) = self._read_extended(new_offset)
try:
decoder = self._type_decoder[type_num]
except KeyError:
raise InvalidDatabaseError('Unexpected type number ({type}) '
'encountered'.format(type=type_num))
(size, new_offset) = self._size_from_ctrl_byte(ctrl_byte, new_offset,
type_num)
return decoder(self, size, new_offset)
def _read_extended(self, offset):
next_byte = int_from_byte(self._buffer[offset])
type_num = next_byte + 7
if type_num < 7:
raise InvalidDatabaseError(
'Something went horribly wrong in the decoder. An '
'extended type resolved to a type number < 8 '
'({type})'.format(type=type_num))
return type_num, offset + 1
def _verify_size(self, expected, actual):
if expected != actual:
raise InvalidDatabaseError(
'The AW DB file\'s data section contains bad data '
'(unknown data type or corrupt data)')
def _size_from_ctrl_byte(self, ctrl_byte, offset, type_num):
size = ctrl_byte & 0x1f
if type_num == 1 or size < 29:
return size, offset
if size == 29:
size = 29 + int_from_byte(self._buffer[offset])
return size, offset + 1
if size == 30:
new_offset = offset + 2
size_bytes = self._buffer[offset:new_offset]
size = 285 + struct.unpack(b'!H', size_bytes)[0]
return size, new_offset
new_offset = offset + 3
size_bytes = self._buffer[offset:new_offset]
size = struct.unpack(b'!I', b'\x00' + size_bytes)[0] + 65821
return size, new_offset

2
figcode/awdb/errors.py Normal file
View File

@@ -0,0 +1,2 @@
class InvalidDatabaseError(RuntimeError):
pass

45
figcode/awdb/file.py Normal file
View File

@@ -0,0 +1,45 @@
import os
try:
from multiprocessing import Lock
except ImportError:
from threading import Lock
class FileBuffer(object):
def __init__(self, database):
self._handle = open(database, 'rb')
self._size = os.fstat(self._handle.fileno()).st_size
if not hasattr(os, 'pread'):
self._lock = Lock()
def __getitem__(self, key):
if isinstance(key, slice):
return self._read(key.stop - key.start, key.start)
if isinstance(key, int):
return self._read(1, key)[0]
raise TypeError("Invalid argument type.")
def rfind(self, needle, start):
pos = self._read(self._size - start - 1, start).rfind(needle)
if pos == -1:
return pos
return start + pos
def size(self):
return self._size
def close(self):
self._handle.close()
if hasattr(os, 'pread'):
def _read(self, buffersize, offset):
return os.pread(self._handle.fileno(), buffersize, offset)
else:
def _read(self, buffersize, offset):
with self._lock:
self._handle.seek(offset)
return self._handle.read(buffersize)

208
figcode/awdb/reader.py Normal file
View File

@@ -0,0 +1,208 @@
from __future__ import unicode_literals
try:
import mmap
except ImportError:
mmap = None
import struct
from awdb.compat import compat_ip_address, string_type
from awdb.const import MODE_AUTO, MODE_MMAP, MODE_FILE, MODE_MEMORY, MODE_FD
from awdb.decoder import Decoder
from awdb.errors import InvalidDatabaseError
from awdb.file import FileBuffer
class Reader(object):
_DATA_SECTION_SEPARATOR_SIZE = 16
_METADATA_START_MARKER = b"\xAB\xCD\xEFipplus360.com"
_ipv4_start = None
def __init__(self, database, mode=MODE_AUTO):
if (mode == MODE_AUTO and mmap) or mode == MODE_MMAP:
with open(database, 'rb') as db_file:
self._buffer = mmap.mmap(db_file.fileno(),
0,
access=mmap.ACCESS_READ)
self._buffer_size = self._buffer.size()
filename = database
elif mode in (MODE_AUTO, MODE_FILE):
self._buffer = FileBuffer(database)
self._buffer_size = self._buffer.size()
filename = database
elif mode == MODE_MEMORY:
with open(database, 'rb') as db_file:
self._buffer = db_file.read()
self._buffer_size = len(self._buffer)
filename = database
elif mode == MODE_FD:
self._buffer = database.read()
self._buffer_size = len(self._buffer)
filename = database.name
else:
raise ValueError(
'Unsupported open mode ({0}). Only MODE_AUTO, MODE_FILE, '
'MODE_MEMORY and MODE_FD are supported by the pure Python '
'Reader'.format(mode))
metadata_start = self._buffer.rfind(
self._METADATA_START_MARKER, max(0,
self._buffer_size - 128 * 1024))
if metadata_start == -1:
self.close()
raise InvalidDatabaseError('Error opening database file ({0}). '
'Is this a valid AW DB file?'
''.format(filename))
metadata_start += len(self._METADATA_START_MARKER)
metadata_decoder = Decoder(self._buffer, metadata_start)
(metadata, _) = metadata_decoder.decode(metadata_start)
self._metadata = Metadata(**metadata)
self._decoder = Decoder(
self._buffer, self._metadata.search_tree_size +
self._DATA_SECTION_SEPARATOR_SIZE)
self.closed = False
def metadata(self):
return self._metadata
def get(self, ip_address):
(record, _) = self.get_with_prefix_len(ip_address)
return record
def get_with_prefix_len(self, ip_address):
if isinstance(ip_address, string_type):
address = compat_ip_address(ip_address)
else:
address = ip_address
try:
packed_address = bytearray(address.packed)
except AttributeError:
raise TypeError('argument 1 must be a string or ipaddress object')
if address.version == 6 and self._metadata.ip_version == 4:
raise ValueError(
'Error looking up {0}. You attempted to look up '
'an IPv6 address in an IPv4-only database.'.format(ip_address))
(pointer, prefix_len) = self._find_address_in_tree(packed_address)
if pointer:
return self._resolve_data_pointer(pointer), prefix_len
return None, prefix_len
def _find_address_in_tree(self, packed):
bit_count = len(packed) * 8
node = self._start_node(bit_count)
node_count = self._metadata.node_count
i = 0
while i < bit_count and node < node_count:
bit = 1 & (packed[i >> 3] >> 7 - (i % 8))
node = self._read_node(node, bit)
i = i + 1
if node == node_count:
return 0, i
if node > node_count:
return node, i
raise InvalidDatabaseError('Invalid node in search tree')
def _start_node(self, length):
if self._metadata.ip_version != 6 or length == 128:
return 0
if self._ipv4_start:
return self._ipv4_start
node = 0
for _ in range(96):
if node >= self._metadata.node_count:
break
node = self._read_node(node, 0)
self._ipv4_start = node
return node
def _read_node(self, node_number, index):
base_offset = node_number * self._metadata.node_byte_size
record_size = self._metadata.record_size
if record_size == 24:
offset = base_offset + index * 3
node_bytes = b'\x00' + self._buffer[offset:offset + 3]
elif record_size == 28:
offset = base_offset + 3 * index
node_bytes = bytearray(self._buffer[offset:offset + 4])
if index:
node_bytes[0] = 0x0F & node_bytes[0]
else:
middle = (0xF0 & node_bytes.pop()) >> 4
node_bytes.insert(0, middle)
elif record_size == 32:
offset = base_offset + index * 4
node_bytes = self._buffer[offset:offset + 4]
else:
raise InvalidDatabaseError(
'Unknown record size: {0}'.format(record_size))
return struct.unpack(b'!I', node_bytes)[0]
def _resolve_data_pointer(self, pointer):
resolved = pointer - self._metadata.node_count + \
self._metadata.search_tree_size
if resolved >= self._buffer_size:
raise InvalidDatabaseError(
"The AW DB file's search tree is corrupt")
(data, _) = self._decoder.decode(resolved)
return data
def close(self):
if type(self._buffer) not in (str, bytes):
self._buffer.close()
self.closed = True
def __exit__(self, *args):
self.close()
def __enter__(self):
if self.closed:
raise ValueError('Attempt to reopen a closed AW DB')
return self
class Metadata(object):
def __init__(self, **kwargs):
self.node_count = kwargs['node_count']
self.record_size = kwargs['record_size']
self.ip_version = kwargs['ip_version']
self.database_type = kwargs['database_type']
self.languages = kwargs['languages']
self.binary_format_major_version = kwargs[
'binary_format_major_version']
self.binary_format_minor_version = kwargs[
'binary_format_minor_version']
self.build_epoch = kwargs['build_epoch']
self.description = kwargs['description']
@property
def node_byte_size(self):
return self.record_size // 4
@property
def search_tree_size(self):
return self.node_count * self.node_byte_size
def __repr__(self):
args = ', '.join('%s=%r' % x for x in self.__dict__.items())
return '{module}.{class_name}({data})'.format(
module=self.__module__,
class_name=self.__class__.__name__,
data=args)

213418
figcode/fig.ipynb Normal file

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

34721
figcode/openIPv6dns.txt Normal file

File diff suppressed because it is too large Load Diff

BIN
文章图/DNS结构.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 454 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 240 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 451 KiB

1753
文章图/毕设图.drawio Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1049
研究点1/DNS探测.drawio Normal file

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 275 KiB

308
研究点2/dual.drawio Normal file
View File

@@ -0,0 +1,308 @@
<mxfile host="Electron" modified="2024-05-16T02:34:29.833Z" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/21.6.5 Chrome/114.0.5735.243 Electron/25.3.1 Safari/537.36" etag="TVLKaD1b_IzmBYK2nDS2" version="21.6.5" type="device" pages="3">
<diagram name="第 1 页" id="79VnWnzBmNqVXuTCOZLr">
<mxGraphModel dx="2375" dy="942" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="SEGNyzsOQHVvEINl8T7H-41" value="" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="222.5" y="590" width="75" height="70" as="geometry" />
</mxCell>
<mxCell id="SEGNyzsOQHVvEINl8T7H-40" value="" style="rounded=1;whiteSpace=wrap;html=1;dashed=1;" parent="1" vertex="1">
<mxGeometry x="-35" y="665" width="75" height="70" as="geometry" />
</mxCell>
<mxCell id="SEGNyzsOQHVvEINl8T7H-1" value="&lt;b&gt;地址关联簇筛选&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;/b&gt;" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="105" y="660" width="110" height="80" as="geometry" />
</mxCell>
<mxCell id="SEGNyzsOQHVvEINl8T7H-2" value="&lt;b&gt;主机关联生成&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;/b&gt;" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="310" y="660" width="120" height="80" as="geometry" />
</mxCell>
<mxCell id="SEGNyzsOQHVvEINl8T7H-3" value="&lt;b&gt;双栈服务识别&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;/b&gt;" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="520" y="660" width="120" height="80" as="geometry" />
</mxCell>
<mxCell id="SEGNyzsOQHVvEINl8T7H-4" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;" parent="1" vertex="1">
<mxGeometry x="22.5" y="670" width="10" height="10" as="geometry" />
</mxCell>
<mxCell id="SEGNyzsOQHVvEINl8T7H-11" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;endArrow=open;endFill=0;" parent="1" source="SEGNyzsOQHVvEINl8T7H-5" target="SEGNyzsOQHVvEINl8T7H-6" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="SEGNyzsOQHVvEINl8T7H-5" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;" parent="1" vertex="1">
<mxGeometry x="22.5" y="720" width="10" height="10" as="geometry" />
</mxCell>
<mxCell id="SEGNyzsOQHVvEINl8T7H-6" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;" parent="1" vertex="1">
<mxGeometry x="-27.5" y="720" width="10" height="10" as="geometry" />
</mxCell>
<mxCell id="SEGNyzsOQHVvEINl8T7H-8" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;endArrow=open;endFill=0;" parent="1" source="SEGNyzsOQHVvEINl8T7H-7" target="SEGNyzsOQHVvEINl8T7H-4" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="SEGNyzsOQHVvEINl8T7H-9" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;endArrow=open;endFill=0;" parent="1" source="SEGNyzsOQHVvEINl8T7H-7" target="SEGNyzsOQHVvEINl8T7H-6" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="SEGNyzsOQHVvEINl8T7H-10" style="rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0;entryDx=0;entryDy=0;endArrow=open;endFill=0;" parent="1" source="SEGNyzsOQHVvEINl8T7H-7" target="SEGNyzsOQHVvEINl8T7H-5" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="SEGNyzsOQHVvEINl8T7H-7" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;" parent="1" vertex="1">
<mxGeometry x="-27.5" y="670" width="10" height="10" as="geometry" />
</mxCell>
<mxCell id="SEGNyzsOQHVvEINl8T7H-12" value="地址关联簇" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
<mxGeometry x="-35" y="730" width="70" height="30" as="geometry" />
</mxCell>
<mxCell id="SEGNyzsOQHVvEINl8T7H-13" value="" style="shape=flexArrow;endArrow=classic;html=1;rounded=0;width=11.11111111111111;endSize=5.091666666666666;endWidth=9.722222222222221;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="50" y="700" as="sourcePoint" />
<mxPoint x="95" y="700" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="SEGNyzsOQHVvEINl8T7H-14" value="同地理位置&lt;br style=&quot;border-color: var(--border-color);&quot;&gt;&amp;amp;&lt;br style=&quot;border-color: var(--border-color);&quot;&gt;同运营商" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="120" y="680" width="80" height="50" as="geometry" />
</mxCell>
<mxCell id="SEGNyzsOQHVvEINl8T7H-15" value="别名地址解析" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="330" y="685" width="80" height="40" as="geometry" />
</mxCell>
<mxCell id="SEGNyzsOQHVvEINl8T7H-16" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;" parent="1" vertex="1">
<mxGeometry x="280" y="595" width="10" height="10" as="geometry" />
</mxCell>
<mxCell id="SEGNyzsOQHVvEINl8T7H-17" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;endArrow=open;endFill=0;" parent="1" source="SEGNyzsOQHVvEINl8T7H-18" target="SEGNyzsOQHVvEINl8T7H-19" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="SEGNyzsOQHVvEINl8T7H-18" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;" parent="1" vertex="1">
<mxGeometry x="280" y="645" width="10" height="10" as="geometry" />
</mxCell>
<mxCell id="SEGNyzsOQHVvEINl8T7H-19" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;" parent="1" vertex="1">
<mxGeometry x="230" y="645" width="10" height="10" as="geometry" />
</mxCell>
<mxCell id="SEGNyzsOQHVvEINl8T7H-20" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;endArrow=open;endFill=0;" parent="1" source="SEGNyzsOQHVvEINl8T7H-23" target="SEGNyzsOQHVvEINl8T7H-16" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="SEGNyzsOQHVvEINl8T7H-21" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;endArrow=open;endFill=0;" parent="1" source="SEGNyzsOQHVvEINl8T7H-23" target="SEGNyzsOQHVvEINl8T7H-19" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="SEGNyzsOQHVvEINl8T7H-22" style="rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0;entryDx=0;entryDy=0;endArrow=open;endFill=0;" parent="1" source="SEGNyzsOQHVvEINl8T7H-23" target="SEGNyzsOQHVvEINl8T7H-18" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="SEGNyzsOQHVvEINl8T7H-23" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;" parent="1" vertex="1">
<mxGeometry x="230" y="595" width="10" height="10" as="geometry" />
</mxCell>
<mxCell id="SEGNyzsOQHVvEINl8T7H-24" value="" style="shape=flexArrow;endArrow=classic;html=1;rounded=0;width=10;endSize=9.580555555555556;endWidth=9.722222222222221;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="230" y="700" as="sourcePoint" />
<mxPoint x="300" y="700" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="SEGNyzsOQHVvEINl8T7H-25" value="潜在双栈服务" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
<mxGeometry x="220" y="655" width="80" height="30" as="geometry" />
</mxCell>
<mxCell id="SEGNyzsOQHVvEINl8T7H-26" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#000000;" parent="1" vertex="1">
<mxGeometry x="490" y="600" width="10" height="10" as="geometry" />
</mxCell>
<mxCell id="SEGNyzsOQHVvEINl8T7H-27" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;endArrow=open;endFill=0;dashed=1;" parent="1" source="SEGNyzsOQHVvEINl8T7H-28" target="SEGNyzsOQHVvEINl8T7H-29" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="SEGNyzsOQHVvEINl8T7H-28" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#000000;" parent="1" vertex="1">
<mxGeometry x="490" y="650" width="10" height="10" as="geometry" />
</mxCell>
<mxCell id="SEGNyzsOQHVvEINl8T7H-29" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#000000;" parent="1" vertex="1">
<mxGeometry x="440" y="650" width="10" height="10" as="geometry" />
</mxCell>
<mxCell id="SEGNyzsOQHVvEINl8T7H-30" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;endArrow=open;endFill=0;dashed=1;" parent="1" source="SEGNyzsOQHVvEINl8T7H-33" target="SEGNyzsOQHVvEINl8T7H-26" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="SEGNyzsOQHVvEINl8T7H-31" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;endArrow=open;endFill=0;dashed=1;" parent="1" source="SEGNyzsOQHVvEINl8T7H-33" target="SEGNyzsOQHVvEINl8T7H-29" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="SEGNyzsOQHVvEINl8T7H-32" style="rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0;entryDx=0;entryDy=0;endArrow=open;endFill=0;dashed=1;" parent="1" source="SEGNyzsOQHVvEINl8T7H-33" target="SEGNyzsOQHVvEINl8T7H-28" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="SEGNyzsOQHVvEINl8T7H-33" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillStyle=auto;fillColor=#000000;gradientColor=none;gradientDirection=north;shadow=0;" parent="1" vertex="1">
<mxGeometry x="440" y="600" width="10" height="10" as="geometry" />
</mxCell>
<mxCell id="SEGNyzsOQHVvEINl8T7H-34" value="主机关联" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
<mxGeometry x="430" y="655" width="80" height="30" as="geometry" />
</mxCell>
<mxCell id="SEGNyzsOQHVvEINl8T7H-35" value="" style="shape=flexArrow;endArrow=classic;html=1;rounded=0;width=10;endSize=9.580555555555556;endWidth=9.722222222222221;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="440" y="699.83" as="sourcePoint" />
<mxPoint x="510" y="700" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="SEGNyzsOQHVvEINl8T7H-36" value="1-1主机关联" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="540" y="690" width="80" height="40" as="geometry" />
</mxCell>
<mxCell id="SEGNyzsOQHVvEINl8T7H-37" value="" style="verticalLabelPosition=bottom;sketch=0;html=1;verticalAlign=top;align=center;points=[[0.145,0.145,0],[0.5,0,0],[0.855,0.145,0],[1,0.5,0],[0.855,0.855,0],[0.5,1,0],[0.145,0.855,0],[0,0.5,0]];pointerEvents=1;shape=mxgraph.cisco_safe.compositeIcon;bgIcon=ellipse;resIcon=mxgraph.cisco_safe.capability.dns;" parent="1" vertex="1">
<mxGeometry x="695" y="660" width="53" height="53" as="geometry" />
</mxCell>
<mxCell id="SEGNyzsOQHVvEINl8T7H-38" value="" style="shape=flexArrow;endArrow=classic;html=1;rounded=0;width=26;endSize=4.863333333333333;endWidth=25.333333333333332;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="650" y="699.83" as="sourcePoint" />
<mxPoint x="690" y="700" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="SEGNyzsOQHVvEINl8T7H-39" value="双栈DNS&lt;br&gt;服务" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
<mxGeometry x="681.5" y="710" width="80" height="30" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
<diagram id="io-51XE6F3rs1Dmqrp3f" name="第 2 页">
<mxGraphModel dx="430" dy="262" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="S_UGSUIXUAaXYCu1qnb8-52" value="" style="shape=flexArrow;endArrow=classic;html=1;rounded=0;width=65.27777777777777;endSize=5.908333333333333;fontSize=10;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="310" y="590" as="sourcePoint" />
<mxPoint x="480" y="590" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="S_UGSUIXUAaXYCu1qnb8-1" value="" style="rounded=1;whiteSpace=wrap;html=1;arcSize=14;" parent="1" vertex="1">
<mxGeometry x="225" y="680" width="340" height="30" as="geometry" />
</mxCell>
<mxCell id="S_UGSUIXUAaXYCu1qnb8-2" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#dae8fc;strokeColor=#6c8ebf;dashed=1;" parent="1" vertex="1">
<mxGeometry x="242" y="685" width="20" height="20" as="geometry" />
</mxCell>
<mxCell id="S_UGSUIXUAaXYCu1qnb8-3" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#e1d5e7;strokeColor=#9673a6;" parent="1" vertex="1">
<mxGeometry x="407" y="685" width="20" height="20" as="geometry" />
</mxCell>
<mxCell id="S_UGSUIXUAaXYCu1qnb8-5" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;" parent="1" vertex="1">
<mxGeometry x="490" y="685" width="20" height="20" as="geometry" />
</mxCell>
<mxCell id="S_UGSUIXUAaXYCu1qnb8-6" value="&lt;font style=&quot;font-size: 10px;&quot;&gt;IPv4地址&lt;/font&gt;" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;" parent="1" vertex="1">
<mxGeometry x="256" y="680" width="60" height="30" as="geometry" />
</mxCell>
<mxCell id="S_UGSUIXUAaXYCu1qnb8-7" value="&lt;font style=&quot;font-size: 10px;&quot;&gt;IPv6地址&lt;/font&gt;" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;" parent="1" vertex="1">
<mxGeometry x="421" y="680" width="60" height="30" as="geometry" />
</mxCell>
<mxCell id="S_UGSUIXUAaXYCu1qnb8-8" value="&lt;font style=&quot;font-size: 10px;&quot;&gt;IPv6主机&lt;/font&gt;" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;" parent="1" vertex="1">
<mxGeometry x="505" y="680" width="60" height="30" as="geometry" />
</mxCell>
<mxCell id="S_UGSUIXUAaXYCu1qnb8-10" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;dashed=1;" parent="1" vertex="1">
<mxGeometry x="325" y="685" width="20" height="20" as="geometry" />
</mxCell>
<mxCell id="S_UGSUIXUAaXYCu1qnb8-11" value="&lt;font style=&quot;font-size: 10px;&quot;&gt;IPv4主机&lt;/font&gt;" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;" parent="1" vertex="1">
<mxGeometry x="339" y="680" width="60" height="30" as="geometry" />
</mxCell>
<mxCell id="S_UGSUIXUAaXYCu1qnb8-18" style="rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0;entryDx=0;entryDy=0;exitX=1;exitY=1;exitDx=0;exitDy=0;endArrow=classic;endFill=1;startArrow=none;startFill=0;fontSize=10;" parent="1" source="S_UGSUIXUAaXYCu1qnb8-12" target="S_UGSUIXUAaXYCu1qnb8-15" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="S_UGSUIXUAaXYCu1qnb8-12" value="&lt;font style=&quot;font-size: 10px;&quot;&gt;1&lt;/font&gt;" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=10;dashed=1;" parent="1" vertex="1">
<mxGeometry x="191" y="535" width="22" height="22" as="geometry" />
</mxCell>
<mxCell id="S_UGSUIXUAaXYCu1qnb8-20" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;startArrow=classic;startFill=1;endArrow=classic;endFill=1;fontSize=10;" parent="1" source="S_UGSUIXUAaXYCu1qnb8-13" target="S_UGSUIXUAaXYCu1qnb8-12" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="S_UGSUIXUAaXYCu1qnb8-13" value="&lt;font style=&quot;font-size: 10px;&quot;&gt;2&lt;/font&gt;" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#e1d5e7;strokeColor=#9673a6;fontSize=10;" parent="1" vertex="1">
<mxGeometry x="281" y="535" width="22" height="22" as="geometry" />
</mxCell>
<mxCell id="S_UGSUIXUAaXYCu1qnb8-19" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;startArrow=none;startFill=0;fontSize=10;" parent="1" source="S_UGSUIXUAaXYCu1qnb8-14" target="S_UGSUIXUAaXYCu1qnb8-15" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="S_UGSUIXUAaXYCu1qnb8-14" value="&lt;font style=&quot;font-size: 10px;&quot;&gt;3&lt;/font&gt;" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=10;dashed=1;" parent="1" vertex="1">
<mxGeometry x="191" y="587" width="22" height="22" as="geometry" />
</mxCell>
<mxCell id="S_UGSUIXUAaXYCu1qnb8-15" value="&lt;font style=&quot;font-size: 10px;&quot;&gt;4&lt;/font&gt;" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#e1d5e7;strokeColor=#9673a6;fontSize=10;" parent="1" vertex="1">
<mxGeometry x="281" y="587" width="22" height="22" as="geometry" />
</mxCell>
<mxCell id="S_UGSUIXUAaXYCu1qnb8-22" value="" style="rounded=1;whiteSpace=wrap;html=1;arcSize=7;dashed=1;fontSize=10;" parent="1" vertex="1">
<mxGeometry x="340" y="510" width="110" height="160" as="geometry" />
</mxCell>
<mxCell id="S_UGSUIXUAaXYCu1qnb8-27" style="rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0;entryDx=0;entryDy=0;endArrow=classic;endFill=1;exitX=1;exitY=1;exitDx=0;exitDy=0;startArrow=none;startFill=0;fontSize=10;" parent="1" source="S_UGSUIXUAaXYCu1qnb8-23" target="S_UGSUIXUAaXYCu1qnb8-26" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="S_UGSUIXUAaXYCu1qnb8-23" value="&lt;font style=&quot;font-size: 10px;&quot;&gt;1&amp;amp;3&lt;/font&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=10;dashed=1;" parent="1" vertex="1">
<mxGeometry x="485" y="535" width="22" height="22" as="geometry" />
</mxCell>
<mxCell id="S_UGSUIXUAaXYCu1qnb8-25" value="&lt;font style=&quot;font-size: 10px;&quot;&gt;2&lt;/font&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;fontSize=10;aspect=fixed;" parent="1" vertex="1">
<mxGeometry x="575" y="535" width="22" height="22" as="geometry" />
</mxCell>
<mxCell id="S_UGSUIXUAaXYCu1qnb8-26" value="&lt;font style=&quot;font-size: 10px;&quot;&gt;4&lt;/font&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;fontSize=10;" parent="1" vertex="1">
<mxGeometry x="575" y="605" width="22" height="22" as="geometry" />
</mxCell>
<mxCell id="S_UGSUIXUAaXYCu1qnb8-28" style="rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;endArrow=classic;endFill=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;startArrow=classic;startFill=1;fontSize=10;" parent="1" source="S_UGSUIXUAaXYCu1qnb8-23" target="S_UGSUIXUAaXYCu1qnb8-25" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="525" y="590" as="sourcePoint" />
<mxPoint x="585" y="630" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="S_UGSUIXUAaXYCu1qnb8-30" style="rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=1;entryDx=0;entryDy=0;endArrow=classic;endFill=1;startArrow=classic;startFill=1;fontSize=10;" parent="1" source="S_UGSUIXUAaXYCu1qnb8-29" target="S_UGSUIXUAaXYCu1qnb8-15" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="S_UGSUIXUAaXYCu1qnb8-29" value="&lt;span style=&quot;font-size: 10px;&quot;&gt;5&lt;/span&gt;" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=10;dashed=1;" parent="1" vertex="1">
<mxGeometry x="191" y="637" width="22" height="22" as="geometry" />
</mxCell>
<mxCell id="S_UGSUIXUAaXYCu1qnb8-32" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;startArrow=classic;startFill=1;fontSize=10;" parent="1" source="S_UGSUIXUAaXYCu1qnb8-31" target="S_UGSUIXUAaXYCu1qnb8-26" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="S_UGSUIXUAaXYCu1qnb8-31" value="&lt;font style=&quot;font-size: 10px;&quot;&gt;5&lt;/font&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=10;dashed=1;" parent="1" vertex="1">
<mxGeometry x="485" y="605" width="22" height="22" as="geometry" />
</mxCell>
<mxCell id="S_UGSUIXUAaXYCu1qnb8-33" value="&lt;font style=&quot;font-size: 10px;&quot;&gt;1&lt;/font&gt;" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=10;dashed=1;" parent="1" vertex="1">
<mxGeometry x="350" y="520" width="20" height="20" as="geometry" />
</mxCell>
<mxCell id="S_UGSUIXUAaXYCu1qnb8-36" value="&lt;font style=&quot;font-size: 10px;&quot;&gt;3&lt;/font&gt;" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=10;dashed=1;" parent="1" vertex="1">
<mxGeometry x="350" y="540" width="20" height="20" as="geometry" />
</mxCell>
<mxCell id="S_UGSUIXUAaXYCu1qnb8-37" value="&lt;font style=&quot;font-size: 10px;&quot;&gt;5&lt;/font&gt;" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=10;dashed=1;" parent="1" vertex="1">
<mxGeometry x="350" y="570" width="20" height="20" as="geometry" />
</mxCell>
<mxCell id="S_UGSUIXUAaXYCu1qnb8-41" value="" style="shape=flexArrow;endArrow=classic;html=1;rounded=0;endWidth=5.483870967741935;endSize=4.279032258064516;width=3.8709677419354835;fontSize=10;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="380" y="539.87" as="sourcePoint" />
<mxPoint x="410" y="539.87" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="S_UGSUIXUAaXYCu1qnb8-42" value="" style="shape=flexArrow;endArrow=classic;html=1;rounded=0;endWidth=5.483870967741935;endSize=4.279032258064516;width=3.8709677419354835;fontSize=10;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="380" y="579.9300000000001" as="sourcePoint" />
<mxPoint x="410" y="579.9300000000001" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="S_UGSUIXUAaXYCu1qnb8-43" value="&lt;font style=&quot;font-size: 10px;&quot;&gt;5&lt;/font&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=10;dashed=1;" parent="1" vertex="1">
<mxGeometry x="417" y="570" width="20" height="20" as="geometry" />
</mxCell>
<mxCell id="S_UGSUIXUAaXYCu1qnb8-45" value="&lt;font style=&quot;font-size: 10px;&quot;&gt;2&lt;/font&gt;" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#e1d5e7;strokeColor=#9673a6;fontSize=10;" parent="1" vertex="1">
<mxGeometry x="350" y="605" width="20" height="20" as="geometry" />
</mxCell>
<mxCell id="S_UGSUIXUAaXYCu1qnb8-47" value="" style="shape=flexArrow;endArrow=classic;html=1;rounded=0;endWidth=5.483870967741935;endSize=4.279032258064516;width=3.8709677419354835;fontSize=10;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="380" y="614.9300000000001" as="sourcePoint" />
<mxPoint x="410" y="614.9300000000001" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="S_UGSUIXUAaXYCu1qnb8-49" value="4" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#e1d5e7;strokeColor=#9673a6;fontSize=10;" parent="1" vertex="1">
<mxGeometry x="350" y="635" width="20" height="20" as="geometry" />
</mxCell>
<mxCell id="S_UGSUIXUAaXYCu1qnb8-51" value="" style="shape=flexArrow;endArrow=classic;html=1;rounded=0;endWidth=5.483870967741935;endSize=4.279032258064516;width=3.8709677419354835;fontSize=10;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="380" y="644.86" as="sourcePoint" />
<mxPoint x="410" y="644.86" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="S_UGSUIXUAaXYCu1qnb8-53" value="&lt;font style=&quot;font-size: 10px;&quot;&gt;&lt;b style=&quot;font-size: 10px;&quot;&gt;地址关联&lt;/b&gt;&lt;/font&gt;" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;" parent="1" vertex="1">
<mxGeometry x="217" y="475" width="60" height="30" as="geometry" />
</mxCell>
<mxCell id="S_UGSUIXUAaXYCu1qnb8-54" value="&lt;font style=&quot;font-size: 10px;&quot;&gt;&lt;b style=&quot;font-size: 10px;&quot;&gt;别名地址解析结果&lt;/b&gt;&lt;/font&gt;" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;" parent="1" vertex="1">
<mxGeometry x="367.5" y="475" width="55" height="30" as="geometry" />
</mxCell>
<mxCell id="S_UGSUIXUAaXYCu1qnb8-55" value="&lt;font style=&quot;font-size: 10px;&quot;&gt;&lt;b style=&quot;font-size: 10px;&quot;&gt;主机关联&lt;/b&gt;&lt;/font&gt;" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;" parent="1" vertex="1">
<mxGeometry x="515" y="480" width="60" height="20" as="geometry" />
</mxCell>
<mxCell id="S_UGSUIXUAaXYCu1qnb8-56" value="2" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;fontSize=10;" parent="1" vertex="1">
<mxGeometry x="417" y="605" width="20" height="20" as="geometry" />
</mxCell>
<mxCell id="S_UGSUIXUAaXYCu1qnb8-57" value="4" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;fontSize=10;" parent="1" vertex="1">
<mxGeometry x="417" y="635" width="20" height="20" as="geometry" />
</mxCell>
<mxCell id="S_UGSUIXUAaXYCu1qnb8-58" value="&lt;font style=&quot;font-size: 10px;&quot;&gt;1&amp;amp;3&lt;/font&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=10;dashed=1;" parent="1" vertex="1">
<mxGeometry x="417" y="530" width="20" height="20" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
<diagram id="3W0xG-xiLtR6q8z4Qn7Y" name="第 3 页">
<mxGraphModel dx="1548" dy="942" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
</root>
</mxGraphModel>
</diagram>
</mxfile>