I need to make a script in a router, to do a WOL to a NAS machine.

The problem is that, router refuses all connections except telnet. It is D-link router, from a service provider.

I can login to it, and it has busybox installed. Here are commands list of busybox: enter image description here

The problem here is that there is no usual commands like scp, for example, even vi doesn't work to create a file.

So how can I possible download the file?

The sftp or ftp or anything else except telnet doesn't work also.

If someone has any idea it would be appreciated! Thanx!

有帮助吗?

解决方案

Based on the existing commands on your router you can create the script using below commands:

echo 'your script' >> somefile

Put a semicolon at the end of each line for EOL. But you need to have permission to execute the script. use touch command to create file as touch xyz.txt and see the file permission.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top