Linux server.edchosting.com 4.18.0-553.79.1.lve.el7h.x86_64 #1 SMP Wed Oct 15 16:34:46 UTC 2025 x86_64
LiteSpeed
Server IP : 75.98.162.185 & Your IP : 216.73.216.163
Domains :
Cant Read [ /etc/named.conf ]
User : goons4good
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
lib /
python2.7 /
site-packages /
ipaclient /
plugins /
Delete
Unzip
Name
Size
Permission
Date
Action
__init__.py
123
B
-rw-r--r--
2020-04-02 03:45
__init__.pyc
216
B
-rw-r--r--
2023-06-13 03:24
__init__.pyo
216
B
-rw-r--r--
2023-06-13 03:24
automember.py
1.15
KB
-rw-r--r--
2020-04-02 03:45
automember.pyc
840
B
-rw-r--r--
2023-06-13 03:24
automember.pyo
840
B
-rw-r--r--
2023-06-13 03:24
automount.py
10.39
KB
-rw-r--r--
2020-04-02 03:45
automount.pyc
8.2
KB
-rw-r--r--
2023-06-13 03:24
automount.pyo
8.2
KB
-rw-r--r--
2023-06-13 03:24
ca.py
2.04
KB
-rw-r--r--
2020-04-02 03:45
ca.pyc
2.34
KB
-rw-r--r--
2023-06-13 03:24
ca.pyo
2.34
KB
-rw-r--r--
2023-06-13 03:24
cert.py
4.39
KB
-rw-r--r--
2023-06-13 03:19
cert.pyc
4.62
KB
-rw-r--r--
2023-06-13 03:24
cert.pyo
4.62
KB
-rw-r--r--
2023-06-13 03:24
certmap.py
1.56
KB
-rw-r--r--
2020-04-02 03:45
certmap.pyc
2.17
KB
-rw-r--r--
2023-06-13 03:24
certmap.pyo
2.17
KB
-rw-r--r--
2023-06-13 03:24
certprofile.py
1.46
KB
-rw-r--r--
2020-04-02 03:45
certprofile.pyc
2.32
KB
-rw-r--r--
2023-06-13 03:24
certprofile.pyo
2.32
KB
-rw-r--r--
2023-06-13 03:24
csrgen.py
3.54
KB
-rw-r--r--
2020-04-02 03:45
csrgen.pyc
3.47
KB
-rw-r--r--
2023-06-13 03:24
csrgen.pyo
3.47
KB
-rw-r--r--
2023-06-13 03:24
dns.py
18.05
KB
-rw-r--r--
2020-04-02 03:45
dns.pyc
16.48
KB
-rw-r--r--
2023-06-13 03:24
dns.pyo
16.48
KB
-rw-r--r--
2023-06-13 03:24
hbacrule.py
1.47
KB
-rw-r--r--
2020-04-02 03:45
hbacrule.pyc
1.36
KB
-rw-r--r--
2023-06-13 03:24
hbacrule.pyo
1.36
KB
-rw-r--r--
2023-06-13 03:24
hbactest.py
2.12
KB
-rw-r--r--
2020-04-02 03:45
hbactest.pyc
1.46
KB
-rw-r--r--
2023-06-13 03:24
hbactest.pyo
1.46
KB
-rw-r--r--
2023-06-13 03:24
host.py
1.83
KB
-rw-r--r--
2020-04-02 03:45
host.pyc
1.55
KB
-rw-r--r--
2023-06-13 03:24
host.pyo
1.55
KB
-rw-r--r--
2023-06-13 03:24
idrange.py
3.32
KB
-rw-r--r--
2020-04-02 03:45
idrange.pyc
2.24
KB
-rw-r--r--
2023-06-13 03:24
idrange.pyo
2.24
KB
-rw-r--r--
2023-06-13 03:24
internal.py
1.41
KB
-rw-r--r--
2020-04-02 03:45
internal.pyc
1.42
KB
-rw-r--r--
2023-06-13 03:24
internal.pyo
1.42
KB
-rw-r--r--
2023-06-13 03:24
location.py
1.03
KB
-rw-r--r--
2020-04-02 03:45
location.pyc
1.37
KB
-rw-r--r--
2023-06-13 03:24
location.pyo
1.37
KB
-rw-r--r--
2023-06-13 03:24
migration.py
2.97
KB
-rw-r--r--
2020-04-02 03:45
migration.pyc
2.59
KB
-rw-r--r--
2023-06-13 03:24
migration.pyo
2.59
KB
-rw-r--r--
2023-06-13 03:24
misc.py
886
B
-rw-r--r--
2020-04-02 03:45
misc.pyc
1.38
KB
-rw-r--r--
2023-06-13 03:24
misc.pyo
1.38
KB
-rw-r--r--
2023-06-13 03:24
otptoken.py
6.39
KB
-rw-r--r--
2023-06-13 03:19
otptoken.pyc
6.63
KB
-rw-r--r--
2023-06-13 03:24
otptoken.pyo
6.58
KB
-rw-r--r--
2023-06-13 03:24
otptoken_yubikey.py
6.22
KB
-rw-r--r--
2020-04-02 03:45
otptoken_yubikey.pyc
6.33
KB
-rw-r--r--
2023-06-13 03:24
otptoken_yubikey.pyo
6.25
KB
-rw-r--r--
2023-06-13 03:24
passwd.py
441
B
-rw-r--r--
2020-04-02 03:45
passwd.pyc
897
B
-rw-r--r--
2023-06-13 03:24
passwd.pyo
897
B
-rw-r--r--
2023-06-13 03:24
permission.py
774
B
-rw-r--r--
2020-04-02 03:45
permission.pyc
1.56
KB
-rw-r--r--
2023-06-13 03:24
permission.pyo
1.56
KB
-rw-r--r--
2023-06-13 03:24
rpcclient.py
1.61
KB
-rw-r--r--
2020-04-02 03:45
rpcclient.pyc
1.12
KB
-rw-r--r--
2023-06-13 03:24
rpcclient.pyo
1.12
KB
-rw-r--r--
2023-06-13 03:24
server.py
626
B
-rw-r--r--
2020-04-02 03:45
server.pyc
1.11
KB
-rw-r--r--
2023-06-13 03:24
server.pyo
1.11
KB
-rw-r--r--
2023-06-13 03:24
service.py
1.9
KB
-rw-r--r--
2020-04-02 03:45
service.pyc
1.58
KB
-rw-r--r--
2023-06-13 03:24
service.pyo
1.58
KB
-rw-r--r--
2023-06-13 03:24
sudorule.py
2.17
KB
-rw-r--r--
2020-04-02 03:45
sudorule.pyc
2.5
KB
-rw-r--r--
2023-06-13 03:24
sudorule.pyo
2.5
KB
-rw-r--r--
2023-06-13 03:24
topology.py
1.89
KB
-rw-r--r--
2020-04-02 03:45
topology.pyc
2
KB
-rw-r--r--
2023-06-13 03:24
topology.pyo
2
KB
-rw-r--r--
2023-06-13 03:24
trust.py
1.85
KB
-rw-r--r--
2020-04-02 03:45
trust.pyc
1.42
KB
-rw-r--r--
2023-06-13 03:24
trust.pyo
1.42
KB
-rw-r--r--
2023-06-13 03:24
user.py
2.9
KB
-rw-r--r--
2020-04-02 03:45
user.pyc
2.78
KB
-rw-r--r--
2023-06-13 03:24
user.pyo
2.78
KB
-rw-r--r--
2023-06-13 03:24
vault.py
35.83
KB
-rw-r--r--
2020-04-02 03:45
vault.pyc
29.19
KB
-rw-r--r--
2023-06-13 03:24
vault.pyo
29.19
KB
-rw-r--r--
2023-06-13 03:24
Save
Rename
# Authors: # Nathaniel McCallum <npmccallum@redhat.com> # # Copyright (C) 2014 Red Hat # see file 'COPYING' for use and warranty information # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. import os import six from ipalib import _, api, IntEnum from ipalib.errors import NotFound, SkipPluginModule from ipalib.frontend import Command, Method, Object from ipalib.plugable import Registry from ipalib.util import classproperty try: import usb.core import yubico except ImportError: # python-yubico depends on pyusb raise SkipPluginModule(reason=_("python-yubico is not installed.")) if six.PY3: unicode = str __doc__ = _(""" YubiKey Tokens """) + _(""" Manage YubiKey tokens. """) + _(""" This code is an extension to the otptoken plugin and provides support for reading/writing YubiKey tokens directly. """) + _(""" EXAMPLES: """) + _(""" Add a new token: ipa otptoken-add-yubikey --owner=jdoe --desc="My YubiKey" """) register = Registry() topic = 'otp' @register(no_fail=True) class _fake_otptoken(Object): name = 'otptoken' @register(no_fail=True) class _fake_otptoken_add(Method): name = 'otptoken_add' NO_CLI = True @register() class otptoken_add_yubikey(Command): __doc__ = _('Add a new YubiKey OTP token.') takes_options = ( IntEnum('slot?', cli_name='slot', label=_('YubiKey slot'), values=(1, 2), ), ) has_output_params = takes_options @classmethod def __NO_CLI_getter(cls): return api.Command.get_plugin('otptoken_add') is _fake_otptoken_add NO_CLI = classproperty(__NO_CLI_getter) @property def api_version(self): return self.api.Command.otptoken_add.api_version def get_args(self): for arg in self.api.Command.otptoken_add.args(): yield arg for arg in super(otptoken_add_yubikey, self).get_args(): yield arg def get_options(self): for option in self.api.Command.otptoken_add.options(): if option.name not in ('type', 'ipatokenvendor', 'ipatokenmodel', 'ipatokenserial', 'ipatokenotpalgorithm', 'ipatokenhotpcounter', 'ipatokenotpkey', 'ipatokentotpclockoffset', 'ipatokentotptimestep', 'no_qrcode', 'qrcode', 'version'): yield option for option in super(otptoken_add_yubikey, self).get_options(): yield option def get_output_params(self): for param in self.api.Command.otptoken_add.output_params(): yield param for param in super(otptoken_add_yubikey, self).get_output_params(): yield param def _iter_output(self): return self.api.Command.otptoken_add.output() def forward(self, *args, **kwargs): # Open the YubiKey try: yk = yubico.find_yubikey() except usb.core.USBError as e: raise NotFound(reason="No YubiKey found: %s" % e.strerror) except yubico.yubikey.YubiKeyError as e: raise NotFound(reason=e.reason) except ValueError as e: raise NotFound(reason=str(e) + ". Please install 'libyubikey' " "and 'libusb' packages first.") assert yk.version_num() >= (2, 1) # If no slot is specified, find the first free slot. if kwargs.get('slot', None) is None: try: used = yk.status().valid_configs() kwargs['slot'] = sorted({1, 2}.difference(used))[0] except IndexError: raise NotFound(reason=_('No free YubiKey slot!')) # Create the key (NOTE: the length is fixed). key = os.urandom(20) # Write the config. cfg = yk.init_config() cfg.mode_oath_hotp(key, kwargs.get( 'ipatokenotpdigits', self.get_default_of('ipatokenotpdigits') )) cfg.extended_flag('SERIAL_API_VISIBLE', True) yk.write_config(cfg, slot=kwargs['slot']) # Filter the options we want to pass. options = {k: v for k, v in kwargs.items() if k in ( 'version', 'description', 'ipatokenowner', 'ipatokendisabled', 'ipatokennotbefore', 'ipatokennotafter', 'ipatokenotpdigits', )} # Run the command. answer = self.Backend.rpcclient.forward('otptoken_add', *args, type=u'hotp', ipatokenvendor=u'YubiCo', ipatokenmodel=unicode(yk.model), ipatokenserial=unicode(yk.serial()), ipatokenotpalgorithm=u'sha1', ipatokenhotpcounter=0, ipatokenotpkey=key, no_qrcode=True, **options) # Suppress values we don't want to return. for k in (u'uri', u'ipatokenotpkey'): if k in answer.get('result', {}): del answer['result'][k] # Return which slot was used for writing. answer.get('result', {})['slot'] = kwargs['slot'] return answer