Linux vmi284606.contaboserver.net 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
Apache/2.4.57 (Ubuntu)
: 167.86.127.34 | : 216.73.217.31
Cant Read [ /etc/named.conf ]
7.2.24-0ubuntu0.18.04.17
root
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
lib /
python3 /
dist-packages /
certbot /
plugins /
[ HOME SHELL ]
Name
Size
Permission
Action
__pycache__
[ DIR ]
drwxr-xr-x
__init__.py
30
B
-rw-r--r--
common.py
16.9
KB
-rw-r--r--
common_test.py
16.53
KB
-rw-r--r--
disco.py
9.92
KB
-rw-r--r--
disco_test.py
11.34
KB
-rw-r--r--
dns_common.py
11.7
KB
-rw-r--r--
dns_common_lexicon.py
5.39
KB
-rw-r--r--
dns_common_lexicon_test.py
651
B
-rw-r--r--
dns_common_test.py
8.25
KB
-rw-r--r--
dns_test_common.py
1.61
KB
-rw-r--r--
dns_test_common_lexicon.py
5.48
KB
-rw-r--r--
enhancements.py
5.58
KB
-rw-r--r--
enhancements_test.py
2.36
KB
-rw-r--r--
manual.py
10.6
KB
-rw-r--r--
manual_test.py
7.37
KB
-rw-r--r--
null.py
1.34
KB
-rw-r--r--
null_test.py
624
B
-rw-r--r--
selection.py
13.55
KB
-rw-r--r--
selection_test.py
7.76
KB
-rw-r--r--
standalone.py
11.36
KB
-rw-r--r--
standalone_test.py
9.26
KB
-rw-r--r--
storage.py
4.08
KB
-rw-r--r--
storage_test.py
5.37
KB
-rw-r--r--
util.py
1.7
KB
-rw-r--r--
util_test.py
1.61
KB
-rw-r--r--
webroot.py
11.9
KB
-rw-r--r--
webroot_test.py
11.95
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : enhancements_test.py
"""Tests for new style enhancements""" import unittest import mock from certbot.plugins import enhancements from certbot.plugins import null import certbot.tests.util as test_util class EnhancementTest(test_util.ConfigTestCase): """Tests for new style enhancements in certbot.plugins.enhancements""" def setUp(self): super(EnhancementTest, self).setUp() self.mockinstaller = mock.MagicMock(spec=enhancements.AutoHSTSEnhancement) @test_util.patch_get_utility() def test_enhancement_enabled_enhancements(self, _): FAKEINDEX = [ { "name": "autohsts", "cli_dest": "auto_hsts", }, { "name": "somethingelse", "cli_dest": "something", } ] with mock.patch("certbot.plugins.enhancements._INDEX", FAKEINDEX): self.config.auto_hsts = True self.config.something = True enabled = list(enhancements.enabled_enhancements(self.config)) self.assertEqual(len(enabled), 2) self.assertTrue([i for i in enabled if i["name"] == "autohsts"]) self.assertTrue([i for i in enabled if i["name"] == "somethingelse"]) def test_are_requested(self): self.assertEqual( len([i for i in enhancements.enabled_enhancements(self.config)]), 0) self.assertFalse(enhancements.are_requested(self.config)) self.config.auto_hsts = True self.assertEqual( len([i for i in enhancements.enabled_enhancements(self.config)]), 1) self.assertTrue(enhancements.are_requested(self.config)) def test_are_supported(self): self.config.auto_hsts = True unsupported = null.Installer(self.config, "null") self.assertTrue(enhancements.are_supported(self.config, self.mockinstaller)) self.assertFalse(enhancements.are_supported(self.config, unsupported)) def test_enable(self): self.config.auto_hsts = True domains = ["example.com", "www.example.com"] lineage = "lineage" enhancements.enable(lineage, domains, self.mockinstaller, self.config) self.assertTrue(self.mockinstaller.enable_autohsts.called) self.assertEqual(self.mockinstaller.enable_autohsts.call_args[0], (lineage, domains)) if __name__ == '__main__': unittest.main() # pragma: no cover
Close