Submit
Path:
~
/
/
proc
/
self
/
root
/
lib
/
python3.6
/
site-packages
/
dns
/
__pycache__
/
File Content:
e164.cpython-36.opt-1.pyc
3 �b�WK � @ s\ d Z ddlZddlZddlZddlmZ ejjd�Z e fdd�Z e dfd d �Zd dd�ZdS )z�DNS E.164 helpers @var public_enum_domain: The DNS public ENUM domain, e164.arpa. @type public_enum_domain: dns.name.Name object � N� )�string_typesz e164.arpa.c C s, dd� | D �}|j � tjjdj|�|d�S )au Convert an E.164 number in textual form into a Name object whose value is the ENUM domain name for that number. @param text: an E.164 number in textual form. @type text: str @param origin: The domain in which the number should be constructed. The default is e164.arpa. @type origin: dns.name.Name object or None @rtype: dns.name.Name object c S s g | ]}|j � r|�qS � )�isdigit)�.0�dr r �/usr/lib/python3.6/e164.py� <listcomp>) s zfrom_e164.<locals>.<listcomp>�.)�origin)�reverse�dns�name� from_text�join)�textr �partsr r r � from_e164 s r Tc C sb |dk r| j |�} dd� | jD �}t|�t| j�kr@tjjd��|j� dj|�}|r^d| }|S )a� Convert an ENUM domain name into an E.164 number. @param name: the ENUM domain name. @type name: dns.name.Name object. @param origin: A domain containing the ENUM domain name. The name is relativized to this domain before being converted to text. @type origin: dns.name.Name object or None @param want_plus_prefix: if True, add a '+' to the beginning of the returned number. @rtype: str Nc S s$ g | ]}|j � rt|�d kr|�qS )r )r �len)r r r r r r ; s zto_e164.<locals>.<listcomp>z$non-digit labels in ENUM domain name� � +)Z relativizeZlabelsr r Z exception�SyntaxErrorr r )r r Zwant_plus_prefixZdlabelsr r r r �to_e164. s r c C s� |dkrt jj� }t jj� }xl|D ]d}t|t�r<t jj|�}t jj | |�}y|j |d�S t jjk r� } z||7 }W Y dd}~X q"X q"W |�dS )z�Look for NAPTR RRs for the specified number in the specified domains. e.g. lookup('16505551212', ['e164.dnspython.org.', 'e164.arpa.']) NZNAPTR)r �resolverZget_default_resolverZNXDOMAIN� isinstancer r r Ze164r �query)ZnumberZdomainsr Ze_nxZdomainZqname�er r r r E s r )N) �__doc__Z dns.exceptionr Zdns.nameZdns.resolverZ_compatr r r Zpublic_enum_domainr r r r r r r �<module> s
Edit
Rename
Chmod
Delete
FILE
FOLDER
Name
Size
Permission
Action
__init__.cpython-36.opt-1.pyc
585 bytes
0644
__init__.cpython-36.pyc
585 bytes
0644
_compat.cpython-36.opt-1.pyc
1299 bytes
0644
_compat.cpython-36.pyc
1299 bytes
0644
dnssec.cpython-36.opt-1.pyc
10844 bytes
0644
dnssec.cpython-36.pyc
10915 bytes
0644
e164.cpython-36.opt-1.pyc
2663 bytes
0644
e164.cpython-36.pyc
2663 bytes
0644
edns.cpython-36.opt-1.pyc
4407 bytes
0644
edns.cpython-36.pyc
4407 bytes
0644
entropy.cpython-36.opt-1.pyc
3283 bytes
0644
entropy.cpython-36.pyc
3283 bytes
0644
exception.cpython-36.opt-1.pyc
3697 bytes
0644
exception.cpython-36.pyc
3908 bytes
0644
flags.cpython-36.opt-1.pyc
2170 bytes
0644
flags.cpython-36.pyc
2170 bytes
0644
grange.cpython-36.opt-1.pyc
904 bytes
0644
grange.cpython-36.pyc
962 bytes
0644
hash.cpython-36.opt-1.pyc
475 bytes
0644
hash.cpython-36.pyc
475 bytes
0644
inet.cpython-36.opt-1.pyc
2316 bytes
0644
inet.cpython-36.pyc
2316 bytes
0644
ipv4.cpython-36.opt-1.pyc
1358 bytes
0644
ipv4.cpython-36.pyc
1358 bytes
0644
ipv6.cpython-36.opt-1.pyc
2988 bytes
0644
ipv6.cpython-36.pyc
2988 bytes
0644
message.cpython-36.opt-1.pyc
32622 bytes
0644
message.cpython-36.pyc
32622 bytes
0644
name.cpython-36.opt-1.pyc
27126 bytes
0644
name.cpython-36.pyc
27126 bytes
0644
namedict.cpython-36.opt-1.pyc
2855 bytes
0644
namedict.cpython-36.pyc
2855 bytes
0644
node.cpython-36.opt-1.pyc
5534 bytes
0644
node.cpython-36.pyc
5534 bytes
0644
opcode.cpython-36.opt-1.pyc
2050 bytes
0644
opcode.cpython-36.pyc
2050 bytes
0644
query.cpython-36.opt-1.pyc
13748 bytes
0644
query.cpython-36.pyc
13748 bytes
0644
rcode.cpython-36.opt-1.pyc
2487 bytes
0644
rcode.cpython-36.pyc
2487 bytes
0644
rdata.cpython-36.opt-1.pyc
14355 bytes
0644
rdata.cpython-36.pyc
14355 bytes
0644
rdataclass.cpython-36.opt-1.pyc
2508 bytes
0644
rdataclass.cpython-36.pyc
2508 bytes
0644
rdataset.cpython-36.opt-1.pyc
9511 bytes
0644
rdataset.cpython-36.pyc
9550 bytes
0644
rdatatype.cpython-36.opt-1.pyc
4501 bytes
0644
rdatatype.cpython-36.pyc
4501 bytes
0644
renderer.cpython-36.opt-1.pyc
9740 bytes
0644
renderer.cpython-36.pyc
9827 bytes
0644
resolver.cpython-36.opt-1.pyc
35776 bytes
0644
resolver.cpython-36.pyc
35776 bytes
0644
reversename.cpython-36.opt-1.pyc
2593 bytes
0644
reversename.cpython-36.pyc
2593 bytes
0644
rrset.cpython-36.opt-1.pyc
5239 bytes
0644
rrset.cpython-36.pyc
5239 bytes
0644
set.cpython-36.opt-1.pyc
7903 bytes
0644
set.cpython-36.pyc
7903 bytes
0644
tokenizer.cpython-36.opt-1.pyc
14507 bytes
0644
tokenizer.cpython-36.pyc
14507 bytes
0644
tsig.cpython-36.opt-1.pyc
6209 bytes
0644
tsig.cpython-36.pyc
6209 bytes
0644
tsigkeyring.cpython-36.opt-1.pyc
1055 bytes
0644
tsigkeyring.cpython-36.pyc
1055 bytes
0644
ttl.cpython-36.opt-1.pyc
1320 bytes
0644
ttl.cpython-36.pyc
1320 bytes
0644
update.cpython-36.opt-1.pyc
7094 bytes
0644
update.cpython-36.pyc
7094 bytes
0644
version.cpython-36.opt-1.pyc
450 bytes
0644
version.cpython-36.pyc
450 bytes
0644
wiredata.cpython-36.opt-1.pyc
2321 bytes
0644
wiredata.cpython-36.pyc
2321 bytes
0644
zone.cpython-36.opt-1.pyc
30137 bytes
0644
zone.cpython-36.pyc
30137 bytes
0644
N4ST4R_ID | Naxtarrr