Пример #1
0
 def testRewriteDestPorts(self):
     match = Match('tcp', '--destination-port 1234')
     self.assertEqual(match.options(), {'dport': ['1234']})
Пример #2
0
 def testRewriteDestPorts(self):
     match = Match('multiport', '--destination-ports 1,2,3')
     self.assertEqual(match.options(), {'dports': ['1,2,3']})
Пример #3
0
 def testRewriteSourcePort(self):
     match = Match('tcp', '--source-port 1234')
     self.assertEqual(match.options(), {'sport': ['1234']})
Пример #4
0
 def testRewriteSourcePorts(self):
     match = Match('multiport', '--source-ports 1,2,3')
     self.assertEqual(match.options(), {'sports': ['1,2,3']})
Пример #5
0
 def testRewriteDestPort(self):
     print('Running Test Rewrite Dest Port...')
     match = Match('tcp', '--destination-port 1234')
     print('\tMatch: ' + str(match))
     self.assertEqual(match.options(), {'dport': ['1234']})
     print('...Done')
Пример #6
0
 def testRewriteDestPorts(self):
     print('Runnning Test Rewrite Dest Ports...')
     match = Match('multiport', '--destination-ports 1,2,3')
     print('\tMatch: ' + str(match))
     self.assertEqual(match.options(), {'dports': ['1,2,3']})
     print('...Done')
Пример #7
0
 def testRewriteDestPorts(self):
     match = Match("multiport", "--destination-ports 1,2,3")
     self.assertEqual(match.options(), {"dports": ["1,2,3"]})
Пример #8
0
 def testRewriteSourcePort(self):
     print('Match Test Case Set:\nRunning Test Rewrite Source Port...')
     match = Match('tcp', '--source-port 1234')
     print('\tMatch: ' + str(match))
     self.assertEqual(match.options(), {'sport': ['1234']})
     print('...Done')
Пример #9
0
 def testRewriteSourcePorts(self):
     match = Match("multiport", "--source-ports 1,2,3")
     self.assertEqual(match.options(), {"sports": ["1,2,3"]})
Пример #10
0
 def testRewriteDestPorts(self):
     match = Match("tcp", "--destination-port 1234")
     self.assertEqual(match.options(), {"dport": ["1234"]})
Пример #11
0
 def testRewriteSourcePort(self):
     match = Match("tcp", "--source-port 1234")
     self.assertEqual(match.options(), {"sport": ["1234"]})
Пример #12
0
 def testRewriteDestPorts(self):
     match = Match('multiport', '--destination-ports 1,2,3')
     self.assertEqual(match.options(), {'dports': ['1,2,3']})
Пример #13
0
 def testRewriteDestPorts(self):
     match = Match('tcp', '--destination-port 1234')
     self.assertEqual(match.options(), {'dport': ['1234']})
Пример #14
0
 def testRewriteSourcePorts(self):
     match = Match('multiport', '--source-ports 1,2,3')
     self.assertEqual(match.options(), {'sports': ['1,2,3']})
Пример #15
0
 def testRewriteSourcePort(self):
     match = Match('tcp', '--source-port 1234')
     self.assertEqual(match.options(), {'sport': ['1234']})