rehosting / libnvram

NVRAM emulator
MIT License
1 stars 2 forks source link

`nvram show` command returns nothing #10

Open AndrewFasano opened 5 months ago

AndrewFasano commented 5 months ago
~ # LD_PRELOAD=/igloo/utils/libnvram.so nvram show
size: 20 bytes (131052 left)

~ # LD_PRELOAD=/igloo/utils/libnvram.so nvram set foo=zoo

~ # LD_PRELOAD=/igloo/utils/libnvram.so nvram show
size: 20 bytes (131052 left)

~ # LD_PRELOAD=/igloo/utils/libnvram.so nvram get foo
zoo

After setting a value into nvram, I think nvram show should return it (along with all other set values?)

be32826 commented 5 months ago

Where can I get access to the nvram command?

AndrewFasano commented 5 months ago

It's a pretty common binary in lots of firmware, I can send you a specific example

AndrewFasano commented 5 months ago

Also, in testing with another firmware it seems to work fine. This probably could be caused by different library calls being present in different nvram binaries?

~ # LD_PRELOAD=/igloo/lib_inject.so nvram set foo=1
~ # LD_PRELOAD=/igloo/lib_inject.so nvram get foo
1
~ # LD_PRELOAD=/igloo/lib_inject.so nvram show
foo=1
_upgrading=
size: 0X26 bytes (0X7DA left)

This was with DIR-615_REVE_FIRMWARE_5.14.B01.ZIP with a sha1sum of f5cdc2e346c618b8faa348826ebb445829638fc9