This commit is contained in:
crusader 2018-10-13 01:45:35 +09:00
parent a9f2de065e
commit cb1265d4e6
2 changed files with 16 additions and 3 deletions

View File

@ -24,9 +24,13 @@ var (
"urn:schemas-upnp-org:device:InternetGatewayDevice:2": omm.MetaHostTypeEnumRouter,
"urn:schemas-upnp-org:device:WLANAccessPointDevice:1": omm.MetaHostTypeEnumWLANAccessPoint,
"urn:schemas-upnp-org:device:MediaServer:1": omm.MetaHostTypeEnumMediaServer,
"urn:schemas-upnp-org:device:MediaRenderer:1": omm.MetaHostTypeEnumMediaServer,
"urn:schemas-upnp-org:device:MediaServer:2": omm.MetaHostTypeEnumMediaServer,
"urn:schemas-upnp-org:device:MediaRenderer:2": omm.MetaHostTypeEnumMediaServer,
"urn:schemas-upnp-org:device:MediaServer:3": omm.MetaHostTypeEnumMediaServer,
"urn:schemas-upnp-org:device:MediaRenderer:3": omm.MetaHostTypeEnumMediaServer,
"urn:schemas-upnp-org:device:MediaServer:4": omm.MetaHostTypeEnumMediaServer,
"urn:schemas-upnp-org:device:MediaRenderer:4": omm.MetaHostTypeEnumMediaServer,
}
)

View File

@ -19,6 +19,10 @@ import (
"git.loafle.net/overflow_scanner/probe/internal/pcap"
)
const (
MetaSeperator = "|||"
)
type DiscoverySession interface {
InitWithRequest(request types.DiscoveryRequest) error
@ -869,10 +873,15 @@ LOOP:
modified = true
continue LOOP
}
if v == _v {
continue LOOP
_metas := strings.Split(_v, MetaSeperator)
for _, _meta := range _metas {
if _meta == v {
continue LOOP
}
}
oriMeta[k] = fmt.Sprintf("%s|||%s", _v, v)
oriMeta[k] = fmt.Sprintf("%s%s%s", _v, MetaSeperator, v)
modified = true
}