File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 3131class ELFTest (unittest .TestCase ):
3232
3333 def test_tenda_ac15_arm (self ):
34-
34+ stop = False
3535 def nvram_listener ():
3636 server_address = '../examples/rootfs/arm_tendaac15/var/cfm_socket'
3737
@@ -63,6 +63,7 @@ def nvram_listener():
6363 data .clear ()
6464 finally :
6565 connection .close ()
66+ break
6667
6768 def patcher (ql : Qiling ):
6869 br0_addr = ql .mem .search (b'br0\x00 ' )
@@ -74,7 +75,8 @@ def my_tenda():
7475 ql = Qiling (["../examples/rootfs/arm_tendaac15/bin/httpd" ], "../examples/rootfs/arm_tendaac15" , verbose = QL_VERBOSE .DEBUG )
7576 ql .add_fs_mapper ("/dev/urandom" , "/dev/urandom" )
7677 ql .hook_address (patcher , ql .loader .elf_entry )
77- ql .run ()
78+ while not stop :
79+ ql .run (count = 5000 )
7880
7981 if __name__ == "__main__" :
8082 threads = [
@@ -103,7 +105,9 @@ def my_tenda():
103105 response = conn .getresponse ()
104106
105107 self .assertIn (b"Please update your documents to reflect the new location." , response .read ())
106-
108+ stop = True
109+ for th in threads :
110+ th .join ()
107111
108112if __name__ == "__main__" :
109113 unittest .main ()
You can’t perform that action at this time.
0 commit comments