aa37dd5e7e89f8b83911ff69c29cf3dace0a82d6,networkml/featurizers/funcs/host.py,Host,_priv_ip_proto_ports,#Host#Any#Any#,169
Before Change
def _priv_ip_proto_ports(self, rows, ip_proto):
lowest_ports = self._lowest_ip_proto_ports(rows, ip_proto)
return {port for port in lowest_ports if port < 1024}
def _nonpriv_ip_proto_ports(self, rows, ip_proto):
lowest_ports = self._lowest_ip_proto_ports(rows, ip_proto)
After Change
def _priv_ip_proto_ports(self, rows, ip_proto):
// https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xml
wk_ref_priv_proto_ports = frozenset(
[22, 23, 25, 53, 67, 68, 80, 123, 137, 138, 139, 143, 161, 443, 631])
lowest_ports = {port for port in self._lowest_ip_proto_ports(rows, ip_proto) if port < 1024}
priv_ports = {port: int(port in lowest_ports) for port in wk_ref_priv_proto_ports}
priv_ports.update({"other": int(not lowest_ports.issubset(wk_ref_priv_proto_ports))})
return priv_ports
def _nonpriv_ip_proto_ports(self, rows, ip_proto):
lowest_ports = self._lowest_ip_proto_ports(rows, ip_proto)
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 3
Instances
Project Name: CyberReboot/NetworkML
Commit Name: aa37dd5e7e89f8b83911ff69c29cf3dace0a82d6
Time: 2020-02-28
Author: josh@vandervecken.com
File Name: networkml/featurizers/funcs/host.py
Class Name: Host
Method Name: _priv_ip_proto_ports
Project Name: pantsbuild/pants
Commit Name: 6e73f455c181e545922b293747a64ebf8f6e87bf
Time: 2020-05-31
Author: john.sirois@gmail.com
File Name: src/python/pants/build_graph/build_file_aliases.py
Class Name: BuildFileAliases
Method Name: target_types_by_alias
Project Name: miso-belica/sumy
Commit Name: c0a5504ce6ff8a850eabd5a33488ccf535a55b4f
Time: 2013-05-21
Author: miso.belica@gmail.com
File Name: sumy/summarizers/edmundson_key.py
Class Name: EdmundsonKeyMethod
Method Name: _compute_significant_words
Project Name: PyThaiNLP/pythainlp
Commit Name: 362eb2d4028bb6427ccc9cf317c5b225282a51fb
Time: 2020-07-22
Author: wannaphong@yahoo.com
File Name: pythainlp/corpus/common.py
Class Name:
Method Name: provinces