Ejemplo n.º 1
0
 def setUp(self):
     self.databus = conpot_core.get_databus()
     self.databus.initialize('conpot/templates/default.xml')
     S7_instance = S7Server('conpot/templates/default.xml')
     self.S7_server = S7_instance.get_server('localhost', 0)
     self.S7_server.start()
     self.server_port = self.S7_server.server_port
Ejemplo n.º 2
0
 def setUp(self):
     self.databus = conpot_core.get_databus()
     self.databus.initialize('conpot/templates/default/template.xml')
     args = namedtuple('FakeArgs', '')
     self.s7_instance = S7Server(
         'conpot/templates/default/s7comm/s7comm.xml', 'none', args)
     gevent.spawn(self.s7_instance.start, '127.0.0.1', 0)
     gevent.sleep(0.5)
     self.server_port = self.s7_instance.server.server_port
Ejemplo n.º 3
0
 def setUp(self):
     self.databus = conpot_core.get_databus()
     self.dir_name = os.path.dirname(conpot.__file__)
     self.databus.initialize(self.dir_name +
                             "/templates/default/template.xml")
     args = namedtuple("FakeArgs", "")
     self.s7_instance = S7Server(
         self.dir_name + "/templates/default/s7comm/s7comm.xml", "none",
         args)
     gevent.spawn(self.s7_instance.start, "127.0.0.1", 0)
     gevent.sleep(0.5)
     self.server_port = self.s7_instance.server.server_port