Beispiel #1
0
    def test_help_contents(self):
        shell = ReadShell(MockVuln(), None, None)
        _help = shell.help(None)

        self.assertNotIn('execute', _help)
        self.assertNotIn('upload', _help)
        self.assertIn('read', _help)
Beispiel #2
0
 def test_help_contents(self):
     shell = ReadShell(MockVuln(), None, None)
     _help = shell.help(None)
     
     self.assertNotIn('execute', _help)
     self.assertNotIn('upload', _help)
     self.assertIn('read', _help)
Beispiel #3
0
 def test_help_contents_specific(self):
     shell = ReadShell(MockVuln(), None, None)
     _help = shell.help('read')
     
     self.assertIn('read', _help)
     self.assertIn('/etc/passwd', _help)
     
     
Beispiel #4
0
    def test_help_format(self):
        shell = ReadShell(MockVuln(), None, None)
        _help = shell.help(None)

        self.assertFalse(_help.startswith(' '))

        self.assertIn('    help', _help)
        # Note that I add an extra space
        self.assertNotIn('     help', _help)
Beispiel #5
0
 def test_help_format(self):
     shell = ReadShell(MockVuln(), None, None)
     _help = shell.help(None)
     
     self.assertFalse(_help.startswith(' '))
     
     self.assertIn('    help', _help)
     # Note that I add an extra space
     self.assertNotIn('     help', _help)
Beispiel #6
0
    def test_help_contents_specific(self):
        shell = ReadShell(MockVuln(), None, None)
        _help = shell.help('read')

        self.assertIn('read', _help)
        self.assertIn('/etc/passwd', _help)