1

I'm trying to use netcat (the busybox version nc) to execute a command (devmem) on a remote machine and read the return on my local machine.

With

nc -ll -p [port] [IP] -e /bin/cat

i was able to echo my commands (devmem 0x12345678).

I tried

nc -ll -p [port] [IP] -e /bin/sh

, which didn't get me any response. (again sending "devmem 0x12345678" from my local machine)

Ultimately i want to be able to read/write memory on the remote machine from my local machine using nc and devmem.

1 Answer 1

2

Solved my Problem by using this small script:

#!/bin/sh
while true
    do
        /sbin/devmem $(read str; echo $str)
done

and then starting netcat with:

nc -ll -p [port] -w 10 [IP] -e /scriptfile
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.