3
ܓi! @ s( d dl Z d dlmZ G dd deZdS ) N)SoSMapc
s e Zd ZdZdddgZddgZd#ZdZdZdZ dZ
i Zi Z fddZ
dd Zdd Z fddZdd Zdd Zdd Zd!d" Z ZS )$SoSHostnameMapaL Mapping store for hostnames and domain names
Hostnames are obfuscated using an incrementing counter based on the total
number of hosts matched regardless of domain name.
Domain names are obfuscated based on the host's hostname, plus any user
defined domains passed in by the `--domains` options.
Domains are obfuscated as whole units, meaning the domains 'example.com'
and 'host.foo.example.com' will be separately obfuscated with no relation
for example as 'obfuscatedomdain1.com' and 'obfuscatedomain2.com'.
Top-level domains are left untouched.
Z localhostz.*localdomain.*z^com..*ZwwwZapi.yaml.yml.crt.key.pem.log.repo.rules.conf.cfgTr c s d|kr|j dd}t j|S )zOverride the base get_regex_result() to provide a regex that, if
this is an FQDN or a straight domain, will include an underscore
formatted regex as well.
.z(\.|_))replacesuperget_regex_result)selfitem) __class__ "/usr/lib/python3.6/hostname_map.pyr 5 s zSoSHostnameMap.get_regex_resultc C s y2t | jj ddd jdd }t|d | _W n tk
rF Y nX y