!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache/2.4.18 (Ubuntu). PHP/7.0.33-0ubuntu0.16.04.16 

uname -a: Linux digifus 3.13.0-57-generic #95-Ubuntu SMP Fri Jun 19 09:28:15 UTC 2015 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/usr/lib/python2.7/dist-packages/twisted/news/test/   drwxr-xr-x
Free 9.42 GB of 29.4 GB (32.04%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     test_news.py (3.07 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.

from pprint import pformat

from twisted.trial import unittest
from twisted.news import database

MESSAGE_ID = "f83ba57450ed0fd8ac9a472b847e830e"

POST_STRING = """Path: not-for-mail
From: <exarkun@somehost.domain.com>
Subject: a test
Newsgroups: alt.test.nntp
Organization: 
Summary: 
Keywords: 
Message-Id: %s
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (Linux/2.4.17 (i686))

this is a test
...
lala
moo
-- 
"One World, one Web, one Program." - Microsoft(R) promotional ad
"Ein Volk, ein Reich, ein Fuhrer." - Adolf Hitler
--
 10:56pm up 4 days, 4:42, 1 user, load average: 0.08, 0.08, 0.12
""" % (MESSAGE_ID)

class NewsTests(unittest.TestCase):
    def setUp(self):
        self.backend = database.NewsShelf(None, 'news2.db')
        self.backend.addGroup('alt.test.nntp', 'y')
        self.backend.postRequest(POST_STRING.replace('\n', '\r\n'))


    def testArticleExists(self):
        d = self.backend.articleExistsRequest(MESSAGE_ID)
        d.addCallback(self.failUnless)
        return d


    def testArticleRequest(self):
        d = self.backend.articleRequest(None, None, MESSAGE_ID)

        def cbArticle(result):
            self.assertTrue(isinstance(result, tuple),
                            'callback result is wrong type: ' + str(result))
            self.assertEqual(len(result), 3,
                              'callback result list should have three entries: ' +
                              str(result))
            self.assertEqual(result[1], MESSAGE_ID,
                              "callback result Message-Id doesn't match: %s vs %s" %
                              (MESSAGE_ID, result[1]))
            body = result[2].read()
            self.failIfEqual(body.find('\r\n\r\n'), -1,
                             "Can't find \\r\\n\\r\\n between header and body")
            return result

        d.addCallback(cbArticle)
        return d


    def testHeadRequest(self):
        d = self.testArticleRequest()

        def cbArticle(result):
            index = result[0]

            d = self.backend.headRequest("alt.test.nntp", index)
            d.addCallback(cbHead)
            return d

        def cbHead(result):
            self.assertEqual(result[1], MESSAGE_ID,
                              "callback result Message-Id doesn't match: %s vs %s" %
                              (MESSAGE_ID, result[1]))

            self.assertEqual(result[2][-2:], '\r\n',
                              "headers must be \\r\\n terminated.")

        d.addCallback(cbArticle)
        return d


    def testBodyRequest(self):
        d = self.testArticleRequest()

        def cbArticle(result):
            index = result[0]

            d = self.backend.bodyRequest("alt.test.nntp", index)
            d.addCallback(cbBody)
            return d

        def cbBody(result):
            body = result[2].read()
            self.assertEqual(body[0:4], 'this',
                              "message body has been altered: " +
                              pformat(body[0:4]))

        d.addCallback(cbArticle)
        return d

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0058 ]--