Skip to content

Commit 54e98ea

Browse files
committed
clean elf loader
1 parent a157d53 commit 54e98ea

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

qiling/loader/elf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -679,4 +679,4 @@ def get_elfdata_mapping(self, elffile: ELFFile) -> bytes:
679679
# aggregate section data
680680
elfdata_mapping.extend(sec.data())
681681

682-
return bytes(elfdata_mapping)
682+
return bytes(elfdata_mapping)

tests/test_pe.py

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -128,24 +128,16 @@ def randomize_config_value(ql, key, subkey):
128128
del ql
129129

130130
# RUN AS USER
131-
ql = Qiling(["../examples/rootfs/x86_windows/bin/GandCrab502.bin"], "../examples/rootfs/x86_windows",
132-
verbose=QL_VERBOSE.DEBUG, profile="profiles/windows_gandcrab_user.ql")
131+
ql = Qiling(["../examples/rootfs/x86_windows/bin/GandCrab502.bin"], "../examples/rootfs/x86_windows", profile="profiles/windows_gandcrab_user.ql")
133132

134133
ql.run()
135134
num_syscalls_user = ql.os.utils.syscalls_counter
136135

137-
del ql
138-
139-
# ql = Qiling(["../examples/rootfs/x86_windows/bin/GandCrab502.bin"], "../examples/rootfs/x86_windows",
140-
# verbose=QL_VERBOSE.DEBUG, profile="profiles/windows_gandcrab_russian_keyboard.ql")
141-
# num_syscalls_russ = ql.os.utils.syscalls_counter
142-
143-
# ql.run()
144-
# del ql
145-
146136
# let's check that gandcrab behave takes a different path if a different environment is found
147137
assert num_syscalls_admin != num_syscalls_user != num_syscalls_russ
148138

139+
del ql
140+
149141
def test_pe_win_x86_multithread(self):
150142
def ThreadId_onEnter(ql, address, params):
151143
self.thread_id = ql.os.thread_manager.cur_thread.id

0 commit comments

Comments
 (0)