Linux id-dci-web1412.main-hosting.eu 5.14.0-611.20.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jan 14 06:35:04 EST 2026 x86_64
LiteSpeed
: 2a02:4780:6:1512:0:19fc:adf1:2 | : 216.73.216.85
Cant Read [ /etc/named.conf ]
8.1.34
u435990001
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
opt /
gsutil /
third_party /
idna /
tests /
[ HOME SHELL ]
Name
Size
Permission
Action
IdnaTestV2.txt
699.98
KB
-rw-r--r--
__init__.py
0
B
-rw-r--r--
test_idna.py
13.25
KB
-rw-r--r--
test_idna_codec.py
3.84
KB
-rw-r--r--
test_idna_compat.py
603
B
-rw-r--r--
test_idna_other.py
294
B
-rw-r--r--
test_idna_uts46.py
8.11
KB
-rw-r--r--
test_intranges.py
2.09
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : test_idna_codec.py
#!/usr/bin/env python import codecs import io import unittest import idna.codec CODEC_NAME = "idna2008" class IDNACodecTests(unittest.TestCase): def setUp(self): from . import test_idna self.idnatests = test_idna.IDNATests() self.idnatests.setUp() def testCodec(self): self.assertIs(codecs.lookup(CODEC_NAME).incrementalencoder, idna.codec.IncrementalEncoder) def testDirectDecode(self): self.idnatests.test_decode(decode=lambda obj: codecs.decode(obj, CODEC_NAME)) def testIndirectDecode(self): self.idnatests.test_decode(decode=lambda obj: obj.decode(CODEC_NAME), skip_str=True) def testDirectEncode(self): self.idnatests.test_encode(encode=lambda obj: codecs.encode(obj, CODEC_NAME)) def testIndirectEncode(self): self.idnatests.test_encode(encode=lambda obj: obj.encode(CODEC_NAME), skip_bytes=True) def testStreamReader(self): def decode(obj): if isinstance(obj, str): obj = bytes(obj, "ascii") buffer = io.BytesIO(obj) stream = codecs.getreader(CODEC_NAME)(buffer) return stream.read() return self.idnatests.test_decode(decode=decode, skip_str=True) def testStreamWriter(self): def encode(obj): buffer = io.BytesIO() stream = codecs.getwriter(CODEC_NAME)(buffer) stream.write(obj) stream.flush() return buffer.getvalue() return self.idnatests.test_encode(encode=encode) def testIncrementalDecoder(self): # Tests derived from Python standard library test/test_codecs.py incremental_tests = ( ("python.org", b"python.org"), ("python.org.", b"python.org."), ("pyth\xf6n.org", b"xn--pythn-mua.org"), ("pyth\xf6n.org.", b"xn--pythn-mua.org."), ) for decoded, encoded in incremental_tests: self.assertEqual( "".join(codecs.iterdecode((bytes([c]) for c in encoded), CODEC_NAME)), decoded, ) decoder = codecs.getincrementaldecoder(CODEC_NAME)() self.assertEqual( decoder.decode( b"xn--xam", ), "", ) self.assertEqual( decoder.decode( b"ple-9ta.o", ), "\xe4xample.", ) self.assertEqual(decoder.decode(b"rg"), "") self.assertEqual(decoder.decode(b"", True), "org") decoder.reset() self.assertEqual( decoder.decode( b"xn--xam", ), "", ) self.assertEqual( decoder.decode( b"ple-9ta.o", ), "\xe4xample.", ) self.assertEqual(decoder.decode(b"rg."), "org.") self.assertEqual(decoder.decode(b"", True), "") def testIncrementalEncoder(self): # Tests derived from Python standard library test/test_codecs.py incremental_tests = ( ("python.org", b"python.org"), ("python.org.", b"python.org."), ("pyth\xf6n.org", b"xn--pythn-mua.org"), ("pyth\xf6n.org.", b"xn--pythn-mua.org."), ) for decoded, encoded in incremental_tests: self.assertEqual(b"".join(codecs.iterencode(decoded, CODEC_NAME)), encoded) encoder = codecs.getincrementalencoder(CODEC_NAME)() self.assertEqual(encoder.encode("\xe4x"), b"") self.assertEqual(encoder.encode("ample.org"), b"xn--xample-9ta.") self.assertEqual(encoder.encode("", True), b"org") encoder.reset() self.assertEqual(encoder.encode("\xe4x"), b"") self.assertEqual(encoder.encode("ample.org."), b"xn--xample-9ta.org.") self.assertEqual(encoder.encode("", True), b"") if __name__ == "__main__": unittest.main()
Close