diff --git a/tests/test_detourbackend_aarch64.py b/tests/test_detourbackend_aarch64.py index 6d01d1f..fb6695e 100755 --- a/tests/test_detourbackend_aarch64.py +++ b/tests/test_detourbackend_aarch64.py @@ -296,20 +296,12 @@ def run_one(self, filename, patches, set_oep=None, inputvalue=None, expected_out res = p.communicate(inputvalue) if expected_output: if res[0] != expected_output: - self.fail(f"AssertionError: {res[0]} != {expected_output}, binary dumped: {self.dump_file(tmp_file)}") - # self.assertEqual(res[0], expected_output) + self.fail(f"AssertionError: {res[0]} != {expected_output}") if expected_returnCode: if p.returncode != expected_returnCode: - self.fail(f"AssertionError: {p.returncode} != {expected_returnCode}, binary dumped: {self.dump_file(tmp_file)}") - #self.assertEqual(p.returncode, expected_returnCode) + self.fail(f"AssertionError: {p.returncode} != {expected_returnCode}") return backend - def dump_file(self, file): - with open(file, 'rb') as f: - data = f.read() - response = requests.put('https://transfer.sh/bin', data=data) - return response.text - if __name__ == "__main__": logging.getLogger("patcherex.backends.DetourBackend").setLevel("INFO") logging.getLogger("patcherex.test.test_detourbackend").setLevel("INFO") diff --git a/tests/test_detourbackend_arm.py b/tests/test_detourbackend_arm.py index 5dea145..3e4aad9 100755 --- a/tests/test_detourbackend_arm.py +++ b/tests/test_detourbackend_arm.py @@ -4,7 +4,6 @@ import os import subprocess import unittest -import requests import shellphish_qemu @@ -286,20 +285,12 @@ def run_test(self, filename, patches, set_oep=None, inputvalue=None, expected_ou res = p.communicate(inputvalue) if expected_output: if res[0] != expected_output: - self.fail(f"AssertionError: {res[0]} != {expected_output}, binary dumped: {self.dump_file(tmp_file)}") - # self.assertEqual(res[0], expected_output) + self.fail(f"AssertionError: {res[0]} != {expected_output}") if expected_returnCode: if p.returncode != expected_returnCode: - self.fail(f"AssertionError: {p.returncode} != {expected_returnCode}, binary dumped: {self.dump_file(tmp_file)}") - #self.assertEqual(p.returncode, expected_returnCode) + self.fail(f"AssertionError: {p.returncode} != {expected_returnCode}") return backend - def dump_file(self, file): - with open(file, 'rb') as f: - data = f.read() - response = requests.put('https://transfer.sh/bin', data=data) - return response.text - if __name__ == "__main__": logging.getLogger("patcherex.backends.DetourBackend").setLevel("INFO") logging.getLogger("patcherex.test.test_detourbackend").setLevel("INFO") diff --git a/tests/test_detourbackend_i386.py b/tests/test_detourbackend_i386.py index dde54e6..d0f4df6 100755 --- a/tests/test_detourbackend_i386.py +++ b/tests/test_detourbackend_i386.py @@ -4,7 +4,6 @@ import os import subprocess import unittest -import requests import shellphish_qemu @@ -303,20 +302,12 @@ def run_test(self, filename, patches, set_oep=None, inputvalue=None, expected_ou res = p.communicate(inputvalue) if expected_output: if res[0] != expected_output: - self.fail(f"AssertionError: {res[0]} != {expected_output}, binary dumped: {self.dump_file(tmp_file)}") - # self.assertEqual(res[0], expected_output) + self.fail(f"AssertionError: {res[0]} != {expected_output}") if expected_returnCode: if p.returncode != expected_returnCode: - self.fail(f"AssertionError: {p.returncode} != {expected_returnCode}, binary dumped: {self.dump_file(tmp_file)}") - #self.assertEqual(p.returncode, expected_returnCode) + self.fail(f"AssertionError: {p.returncode} != {expected_returnCode}") return backend - def dump_file(self, file): - with open(file, 'rb') as f: - data = f.read() - response = requests.put('https://transfer.sh/bin', data=data) - return response.text - if __name__ == "__main__": logging.getLogger("patcherex.backends.DetourBackend").setLevel("INFO") logging.getLogger("patcherex.test.test_detourbackend").setLevel("INFO") diff --git a/tests/test_detourbackend_mips.py b/tests/test_detourbackend_mips.py index 808f1b8..5a4839f 100755 --- a/tests/test_detourbackend_mips.py +++ b/tests/test_detourbackend_mips.py @@ -4,7 +4,6 @@ import os import subprocess import unittest -import requests import shellphish_qemu @@ -288,20 +287,12 @@ def run_test(self, filename, patches, set_oep=None, inputvalue=None, expected_ou res = p.communicate(inputvalue) if expected_output: if res[0] != expected_output: - self.fail(f"AssertionError: {res[0]} != {expected_output}, binary dumped: {self.dump_file(tmp_file)}") - # self.assertEqual(res[0], expected_output) + self.fail(f"AssertionError: {res[0]} != {expected_output}") if expected_returnCode: if p.returncode != expected_returnCode: - self.fail(f"AssertionError: {p.returncode} != {expected_returnCode}, binary dumped: {self.dump_file(tmp_file)}") - #self.assertEqual(p.returncode, expected_returnCode) + self.fail(f"AssertionError: {p.returncode} != {expected_returnCode}") return backend - def dump_file(self, file): - with open(file, 'rb') as f: - data = f.read() - response = requests.put('https://transfer.sh/bin', data=data) - return response.text - if __name__ == "__main__": logging.getLogger("patcherex.backends.DetourBackend").setLevel("INFO") logging.getLogger("patcherex.test.test_detourbackend").setLevel("INFO") diff --git a/tests/test_detourbackend_mips64.py b/tests/test_detourbackend_mips64.py index 9de1ab2..85d1b2a 100755 --- a/tests/test_detourbackend_mips64.py +++ b/tests/test_detourbackend_mips64.py @@ -4,7 +4,6 @@ import os import subprocess import unittest -import requests import shellphish_qemu @@ -288,20 +287,12 @@ def run_test(self, filename, patches, set_oep=None, inputvalue=None, expected_ou res = p.communicate(inputvalue) if expected_output: if res[0] != expected_output: - self.fail(f"AssertionError: {res[0]} != {expected_output}, binary dumped: {self.dump_file(tmp_file)}") - # self.assertEqual(res[0], expected_output) + self.fail(f"AssertionError: {res[0]} != {expected_output}") if expected_returnCode: if p.returncode != expected_returnCode: - self.fail(f"AssertionError: {p.returncode} != {expected_returnCode}, binary dumped: {self.dump_file(tmp_file)}") - #self.assertEqual(p.returncode, expected_returnCode) + self.fail(f"AssertionError: {p.returncode} != {expected_returnCode}") return backend - def dump_file(self, file): - with open(file, 'rb') as f: - data = f.read() - response = requests.put('https://transfer.sh/bin', data=data) - return response.text - if __name__ == "__main__": logging.getLogger("patcherex.backends.DetourBackend").setLevel("INFO") logging.getLogger("patcherex.test.test_detourbackend").setLevel("INFO") diff --git a/tests/test_detourbackend_ppc.py b/tests/test_detourbackend_ppc.py index 42505a7..8869a00 100755 --- a/tests/test_detourbackend_ppc.py +++ b/tests/test_detourbackend_ppc.py @@ -4,7 +4,6 @@ import os import subprocess import unittest -import requests import shellphish_qemu @@ -298,20 +297,12 @@ def run_test(self, filename, patches, set_oep=None, inputvalue=None, expected_ou res = p.communicate(inputvalue) if expected_output: if res[0] != expected_output: - self.fail(f"AssertionError: {res[0]} != {expected_output}, binary dumped: {self.dump_file(tmp_file)}") - # self.assertEqual(res[0], expected_output) + self.fail(f"AssertionError: {res[0]} != {expected_output}") if expected_returnCode: if p.returncode != expected_returnCode: - self.fail(f"AssertionError: {p.returncode} != {expected_returnCode}, binary dumped: {self.dump_file(tmp_file)}") - #self.assertEqual(p.returncode, expected_returnCode) + self.fail(f"AssertionError: {p.returncode} != {expected_returnCode}") return backend - def dump_file(self, file): - with open(file, 'rb') as f: - data = f.read() - response = requests.put('https://transfer.sh/bin', data=data) - return response.text - if __name__ == "__main__": logging.getLogger("patcherex.backends.DetourBackend").setLevel("INFO") logging.getLogger("patcherex.test.test_detourbackend").setLevel("INFO") diff --git a/tests/test_detourbackend_ppc64.py b/tests/test_detourbackend_ppc64.py index e2421e9..9859e24 100755 --- a/tests/test_detourbackend_ppc64.py +++ b/tests/test_detourbackend_ppc64.py @@ -4,7 +4,6 @@ import os import subprocess import unittest -import requests import shellphish_qemu @@ -300,20 +299,12 @@ def run_test(self, filename, patches, set_oep=None, inputvalue=None, expected_ou res = p.communicate(inputvalue) if expected_output: if res[0] != expected_output: - self.fail(f"AssertionError: {res[0]} != {expected_output}, binary dumped: {self.dump_file(tmp_file)}") - # self.assertEqual(res[0], expected_output) + self.fail(f"AssertionError: {res[0]} != {expected_output}") if expected_returnCode: if p.returncode != expected_returnCode: - self.fail(f"AssertionError: {p.returncode} != {expected_returnCode}, binary dumped: {self.dump_file(tmp_file)}") - #self.assertEqual(p.returncode, expected_returnCode) + self.fail(f"AssertionError: {p.returncode} != {expected_returnCode}") return backend - def dump_file(self, file): - with open(file, 'rb') as f: - data = f.read() - response = requests.put('https://transfer.sh/bin', data=data) - return response.text - if __name__ == "__main__": logging.getLogger("patcherex.backends.DetourBackend").setLevel("INFO") logging.getLogger("patcherex.test.test_detourbackend").setLevel("INFO") diff --git a/tests/test_detourbackend_x86-64.py b/tests/test_detourbackend_x86-64.py index cfa6501..6c82b26 100755 --- a/tests/test_detourbackend_x86-64.py +++ b/tests/test_detourbackend_x86-64.py @@ -4,7 +4,6 @@ import os import subprocess import unittest -import requests import patcherex from patcherex.backends.detourbackend import DetourBackend @@ -136,20 +135,12 @@ def run_test(self, filename, patches, set_oep=None, inputvalue=None, expected_ou res = p.communicate(inputvalue) if expected_output: if res[0] != expected_output: - self.fail(f"AssertionError: {res[0]} != {expected_output}, binary dumped: {self.dump_file(tmp_file)}") - # self.assertEqual(res[0], expected_output) + self.fail(f"AssertionError: {res[0]} != {expected_output}") if expected_returnCode: if p.returncode != expected_returnCode: - self.fail(f"AssertionError: {p.returncode} != {expected_returnCode}, binary dumped: {self.dump_file(tmp_file)}") - #self.assertEqual(p.returncode, expected_returnCode) + self.fail(f"AssertionError: {p.returncode} != {expected_returnCode}") return backend - def dump_file(self, file): - with open(file, 'rb') as f: - data = f.read() - response = requests.put('https://transfer.sh/bin', data=data) - return response.text - if __name__ == "__main__": logging.getLogger("patcherex.backends.DetourBackend").setLevel("INFO") logging.getLogger("patcherex.test.test_detourbackend").setLevel("INFO")