예제 #1
0
 def setUp(self):
     # if not hasattr(self, 'manager'):
     #    self.manager = SyncManager()
     #    self.manager.start(lambda: signal.signal(signal.SIGINT, signal.SIG_IGN))
     dirname = os.path.dirname(__file__)
     l = linux.Linux(os.path.join(dirname, "binaries", "basic_linux_amd64"))
     self.state = State(ConstraintSet(), l)
예제 #2
0
 def setUp(self):
     if not hasattr(self, 'manager'):
         self.manager = SyncManager()
         self.manager.start(
             lambda: signal.signal(signal.SIGINT, signal.SIG_IGN))
     l = linux.Linux('/bin/ls')
     self.state = State(ConstraintSet(), l)
     self.lock = self.manager.Condition()
예제 #3
0
 def setUp(self):
     if not hasattr(self, 'manager'):
         self.manager = SyncManager()
         self.manager.start(
             lambda: signal.signal(signal.SIGINT, signal.SIG_IGN))
     dirname = os.path.dirname(__file__)
     l = linux.Linux(os.path.join(dirname, 'binaries', 'basic_linux_amd64'))
     self.state = State(ConstraintSet(), l)
     self.lock = self.manager.Condition()
예제 #4
0
    def test_stack_init(self):
        argv = ['arg1', 'arg2', 'arg3']
        real_argv = [self.BIN_PATH] + argv
        envp = ['env1', 'env2', 'env3']
        self.linux = linux.Linux(self.BIN_PATH, argv, envp)
        cpu = self.linux.current

        self.assertEqual(cpu.read_int(cpu.STACK), 4)

        argv_ptr = cpu.STACK + 8
        envp_ptr = argv_ptr + len(real_argv)*8 + 8

        for i, arg in enumerate(real_argv):
            self.assertEqual(cpu.read_string(cpu.read_int(argv_ptr + i*8)), arg)

        for i, env in enumerate(envp):
            self.assertEqual(cpu.read_string(cpu.read_int(envp_ptr + i*8)), env)
예제 #5
0
 def setUp(self):
     self.linux = linux.Linux(self.BIN_PATH)
     self.symbolic_linux_armv7 = linux.SLinux.empty_platform("armv7")
     self.symbolic_linux_aarch64 = linux.SLinux.empty_platform("aarch64")
예제 #6
0
 def setUp(self):
     dirname = os.path.dirname(__file__)
     l = linux.Linux(os.path.join(dirname, "binaries", "basic_linux_amd64"))
     self.state = State(ConstraintSet(), l)
예제 #7
0
 def setUp(self):
     self.linux = linux.Linux(self.BIN_PATH)
     self.symbolic_linux = linux.SLinux.empty_platform('armv7')
예제 #8
0
 def setUp(self):
     l = linux.Linux('/bin/ls')
     self.state = State(ConstraintSet(), l)
     self.lock = manager.Condition(manager.RLock())
예제 #9
0
 def setUp(self):
     self.linux = linux.Linux(self.BIN_PATH)
예제 #10
0
 def setUp(self):
     l = linux.Linux('/bin/ls')
     self.state = State(ConstraintSet(), l)