本文整理汇总了Python中ztag.transform.ZMapTransformOutput.transformed['banner']方法的典型用法代码示例。如果您正苦于以下问题:Python ZMapTransformOutput.transformed['banner']方法的具体用法?Python ZMapTransformOutput.transformed['banner']怎么用?Python ZMapTransformOutput.transformed['banner']使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ztag.transform.ZMapTransformOutput
的用法示例。
在下文中一共展示了ZMapTransformOutput.transformed['banner']方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _transform_object
# 需要导入模块: from ztag.transform import ZMapTransformOutput [as 别名]
# 或者: from ztag.transform.ZMapTransformOutput import transformed['banner'] [as 别名]
def _transform_object(self, obj):
wrapped = Transformable(obj)
error_component = wrapped['error_component'].resolve()
if error_component is not None and error_component == 'connect':
raise errors.IgnoreObject("Error connecting")
banner = wrapped['data']['banner'].resolve()
ehlo = wrapped['data']['ehlo'].resolve()
starttls = wrapped['data']['starttls'].resolve()
zout = ZMapTransformOutput()
try:
tls_handshake = obj['data']['tls']
out, certificates = https.HTTPSTransform.make_tls_obj(tls_handshake)
zout.transformed['tls'] = out
zout.certificates = certificates
except (KeyError, TypeError, IndexError):
pass
if banner is not None:
zout.transformed['banner'] = self.clean_banner(banner)
if ehlo is not None:
zout.transformed['ehlo'] = self.clean_banner(ehlo)
if starttls is not None:
zout.transformed['starttls'] = self.clean_banner(starttls)
if len(zout.transformed) == 0:
raise errors.IgnoreObject("Empty output dict")
return zout