MCPcopy Create free account
hub / github.com/qilingframework/qiling / my_getenv

Function my_getenv

examples/hello_arm_uboot.py:14–27  ·  view source on GitHub ↗
(ql: Qiling)

Source from the content-addressed store, hash-verified

12
13
14def my_getenv(ql: Qiling):
15 env = {
16 "ID" : b"000000000000000",
17 "ethaddr" : b"11:22:33:44:55:66"
18 }
19
20 params = ql.os.resolve_fcall_params({'key': STRING})
21 value = env.get(params["key"], b"")
22
23 value_addr = ql.os.heap.alloc(len(value))
24 ql.mem.write(value_addr, value)
25
26 ql.arch.regs.r0 = value_addr
27 ql.arch.regs.arch_pc = ql.arch.regs.lr
28
29
30def get_password(ql: Qiling):

Callers

nothing calls this directly

Calls 4

resolve_fcall_paramsMethod · 0.80
getMethod · 0.45
allocMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected