Warning: session_start(): Session cannot be started after headers have already been sent in /home/tvrreohg/public_html/manga.php on line 13
§
Ìß]jÉ" ã óÀ — d Z ddlZddlmZmZmZmZmZmZ ddl Z ddl m
Z
mZmZm
Z
mZmZ ddlZddlZddlZddlmZ ddlmZmZmZmZmZmZmZmZ G d„ d¦ « ZdS ) zG
======================
GeoIP2 Database Reader
======================
é N)ÚAnyÚcastÚListÚOptionalÚTypeÚUnion)Ú MODE_AUTOÚ MODE_MMAPÚ
MODE_MMAP_EXTÚ MODE_FILEÚMODE_MEMORYÚMODE_FD)Ú IPAddress)ÚASNÚAnonymousIPÚCityÚConnectionTypeÚCountryÚDomainÚ
EnterpriseÚISPc
óô — e Zd ZdZdefdedeee deddfd„Z dd„Z
dd„Zd
ede
fd„Zd
edefd„Zd
edefd„Zd
edefd„Zd
edefd„Zd
edefd„Zd
edefd„Zd
edefd„Zded
edefd„Zdee e
e e e e f ded
edee
eef fd„Z!dee e e e e e e e e e f ded
edeeeeeef fd„Z"de#j$ j% fd„Z&d d„Z'dS )!ÚReadera
GeoIP2 database Reader object.
Instances of this class provide a reader for the GeoIP2 database format.
IP addresses can be looked up using the ``country`` and ``city`` methods.
The basic API for this class is the same for every database. First, you
create a reader object, specifying a file name or file descriptor.
You then call the method corresponding to the specific database, passing
it the IP address you want to look up.
If the request succeeds, the method call will return a model class for the
method you called. This model in turn contains multiple record classes,
each of which represents part of the data returned by the database. If the
database does not contain the requested information, the attributes on the
record class will have a ``None`` value.
If the address is not in the database, an
``geoip2.errors.AddressNotFoundError`` exception will be thrown. If the
database is corrupt or invalid, a ``maxminddb.InvalidDatabaseError`` will
be thrown.
NÚfileishÚlocalesÚmodeÚreturnc ó˜ — |€dg}t j ||¦ « | _ | j ¦ « j | _ || _ dS )ag Create GeoIP2 Reader.
:param fileish: The string path to the GeoIP2 database, or an existing
file descriptor pointing to the database. Note that this latter
usage is only valid when mode is MODE_FD.
:param locales: This is list of locale codes. This argument will be
passed on to record classes to use when their name properties are
called. The default value is ['en'].
The order of the locales is significant. When a record class has
multiple names (country, city, etc.), its name property will return
the name in the first locale that has one.
Note that the only locale which is always present in the GeoIP2
data is "en". If you do not include this locale, the name property
may end up returning None even when the record has an English name.
Currently, the valid locale codes are:
* de -- German
* en -- English names may still include accented characters if that
is the accepted spelling in English. In other words, English does
not mean ASCII.
* es -- Spanish
* fr -- French
* ja -- Japanese
* pt-BR -- Brazilian Portuguese
* ru -- Russian
* zh-CN -- Simplified Chinese.
:param mode: The mode to open the database with. Valid mode are:
* MODE_MMAP_EXT - use the C extension with memory map.
* MODE_MMAP - read from memory map. Pure Python.
* MODE_FILE - read database as standard file. Pure Python.
* MODE_MEMORY - load database into memory. Pure Python.
* MODE_FD - the param passed via fileish is a file descriptor, not a
path. This mode implies MODE_MEMORY. Pure Python.
* MODE_AUTO - try MODE_MMAP_EXT, MODE_MMAP, MODE_FILE in that order.
Default.
NÚen)Ú maxminddbÚ
open_databaseÚ
_db_readerÚmetadataÚ
database_typeÚ_db_typeÚ_locales)Úselfr r r s úF/opt/imunify360/venv/lib64/python3.11/site-packages/geoip2/database.pyÚ__init__zReader.__init__= sH € ðV ˆ?Ø�fˆGÝ#Ô1°'¸4Ñ@Ô@ˆŒØœ×0Ò0Ñ2Ô2Ô@ˆŒ
؈Œ
ˆ
ˆ
ó c ó — | S ©N© ©r' s r( Ú __enter__zReader.__enter__n s € ؈r* Úexc_typeÚ exc_valueÚ tracebackc ó. — | ¦ « d S r, )Úclose)r' r0 r1 r2 s r( Ú__exit__zReader.__exit__q s € Ø�
Š
‰Œˆˆˆr* Ú
ip_addressc ót — t t | t j j d|¦ « ¦ « S )z®Get the Country object for the IP address.
:param ip_address: IPv4 or IPv6 address as a string.
:returns: :py:class:`geoip2.models.Country` object
r )r r Ú
_model_forÚgeoip2Úmodels©r' r6 s r( ÚcountryzReader.countryt s0 € õ Ý�T—_’_¥V¤]Ô%:¸IÀzÑRÔRñ
ô
ð
r* c ót — t t | t j j d|¦ « ¦ « S )z¨Get the City object for the IP address.
:param ip_address: IPv4 or IPv6 address as a string.
:returns: :py:class:`geoip2.models.City` object
r )r r r8 r9 r: r; s r( ÚcityzReader.city� s) € õ •D˜$Ÿ/š/&¬-Ô*<¸fÀjÑQÔQÑRÔRÐRr* c ót — t t | t j j d|¦ « ¦ « S )z¶Get the AnonymousIP object for the IP address.
:param ip_address: IPv4 or IPv6 address as a string.
:returns: :py:class:`geoip2.models.AnonymousIP` object
zGeoIP2-Anonymous-IP)r r Ú_flat_model_forr9 r: r; s r( Úanonymous_ipzReader.anonymous_ip‹ s9 € õ ÝØ× Ò Ý”
Ô)Ð+@À*ñ
ô
ñ
ô
ð
r* c ót — t t | t j j d|¦ « ¦ « S )z¦Get the ASN object for the IP address.
:param ip_address: IPv4 or IPv6 address as a string.
:returns: :py:class:`geoip2.models.ASN` object
zGeoLite2-ASN)r r r@ r9 r: r; s r( Úasnz
Reader.asnš s2 € õ Ý�×%Ò%¥f¤mÔ&7¸ÈÑTÔTñ
ô
ð
r* c ót — t t | t j j d|¦ « ¦ « S )z¼Get the ConnectionType object for the IP address.
:param ip_address: IPv4 or IPv6 address as a string.
:returns: :py:class:`geoip2.models.ConnectionType` object
zGeoIP2-Connection-Type)r r r@ r9 r: r; s r( Úconnection_typezReader.connection_type¦ s9 € õ ÝØ× Ò Ý”
Ô,Ð.FÈ
ñ
ô
ñ
ô
ð
r* c ót — t t | t j j d|¦ « ¦ « S )z¬Get the Domain object for the IP address.
:param ip_address: IPv4 or IPv6 address as a string.
:returns: :py:class:`geoip2.models.Domain` object
z
GeoIP2-Domain)r r r@ r9 r: r; s r( Údomainz
Reader.domainµ s3 € õ ÝØ× Ò ¥¤Ô!5°È
ÑSÔSñ
ô
ð
r* c ót — t t | t j j d|¦ « ¦ « S )z´Get the Enterprise object for the IP address.
:param ip_address: IPv4 or IPv6 address as a string.
:returns: :py:class:`geoip2.models.Enterprise` object
r )r r r8 r9 r: r; s r( Ú
enterprisezReader.enterprise s1 € õ ÝØ�OŠO�FœMÔ4°lÀJÑOÔOñ
ô
ð
r* c ót — t t | t j j d|¦ « ¦ « S )z¦Get the ISP object for the IP address.
:param ip_address: IPv4 or IPv6 address as a string.
:returns: :py:class:`geoip2.models.ISP` object
z
GeoIP2-ISP)r r r@ r9 r: r; s r( Úispz
Reader.ispÏ s2 € õ Ý�×%Ò%¥f¤mÔ&7¸ÀzÑRÔRñ
ô
ð
r* r$ c ó — || j vr:t j ¦ « d d }t d|› d| j › d�¦ « ‚| j |¦ « \ }}|€#t j d|› d�¦ « ‚||fS )Né é zThe z method cannot be used with the z databasezThe address z is not in the database.) r% ÚinspectÚstackÚ TypeErrorr" Úget_with_prefix_lenr9 ÚerrorsÚAddressNotFoundError)r' r$ r6 ÚcallerÚrecordÚ
prefix_lens r( Ú_getzReader._getÛ s¤ € Ø ¤
Ð-Ð-Ý”]‘_”_ QÔ'¨Ô*ˆFÝØW�vÐWÐW¸t¼}ÐWÐWÐWñô ð
ð $œ×BÒBÀ:ÑNÔNш�؈>Ý”-×4Ò4ØC˜zÐCÐCÐCñô ð
ð �zÐ!Ð!r* Úmodel_classÚtypesc ó˜ — | ||¦ « \ }}| di ¦ « }||d<