MyGit

Cesura/nxsh

Fork: 8 Star: 80 (更新于 2024-11-11 18:20:05)

license: BSD-3-Clause

Language: C .

BusyBox-like remote shell for the Nintendo Switch over telnet [UNMAINTAINED]

最后发布版本: 0.1.8-beta ( 2019-02-03 12:43:12)

GitHub网址

nxsh

BusyBox-like remote shell for the Nintendo Switch over telnet

Switch view:

screenshot_1

Remote view:

screenshot_2

Installation

Prebuilt

For a basic installation, grab the latest nxsh.nro version from the "Releases" tab above. You can build it from source if you so choose, in which case you should check out the section below.

To make the application available at the root of your homebrew menu, simply copy the nxsh.nro file to the /switch directory of your SD card. You can do this directly, but I recommend using one of the many ftpd applications that are available on the homebrew app store.

Building from source (Unix)

If you choose to compile the application from source, clone the latest code from GitHub and build:

$ git clone https://github.com/Cesura/nxsh.git
$ cd nxsh
$ make nro

To build the sysmodule version, instead run:

$ make sys

To build binaries in a ready-to-release format, run:

$ make dist

I've included a Makefile for simplifying the build process, but you will need to have an aarch64 cross compiler installed, as well as the latest version of libnx and devkitpro. As of version 0.1.5 alpha, you'll need to link it against libcurl and zlib as well. More information on how to set up a proper build environment can be found here.

Connecting

Once started, the application will listen on port 23 for incoming connections. If the socket initializes correctly, the listen address will be displayed on your Switch's screen. Unfortunately, until multithreading is fully supported for Switch homebrew apps, the shell cannot accept more than 1 simultaneous connection.

Linux/BSD/Mac OS

First ensure that you have the "telnet" client installed on your local machine (it may or may not be bundled with your base distribution). For Mac users, I recommend installing the client via the Homebrew package manager

$ brew install telnet

From there, connecting to nxsh is as simple as:

$ telnet [address]

where address is your Switch's IP.

Windows

The built-in Windows telnet client does not play nicely with nxsh, so I recommend installing PuTTY. Note that connecting via a "raw" connection instead of a "telnet" one will avoid a pesky "command not found" message upon initialization of the shell. The telnet protocol sends some garbage text as it's negotiating the connection, so if you want a clean-looking shell, ditch that and go for a raw socket.

Usage

nxsh bundles its own implementations of basic coreutils, such as (but not necessarily limited to):

  • cat
  • ls
  • rm
  • cp
  • mv

etc. etc.

For a full list of commands supported by your current version of nxsh, type "help" in the prompt.

Scripting

As of version 0.1.7 beta, nxsh supports scripting via an ECMAScript-compliant engine named duktape. You can execute scripts in the following way:

$ ./script_name.js

See examples/quadratic.js for an basic example script that works with the shell. As many of the more desirable JS features are non-standard and machine-dependent (such as file I/O), I am slowly but surely writing my own implementations of them.

In Progress

Right now, I'm working on:

  • Passing command line arguments to JS scripts
  • Smoothing out general stability of the shell
  • Executing other NROs from within the shell
  • Any other requests you'd like to throw my way

Bugs

As this is an alpha release, there are bound to be many unforeseen bugs in the software. If it segfaults or something, I take no responsibility, but I would be very appreciative of a little nudge in the way of a new GitHub issue pointing out your problem. ;)

License

This project is licensed under the BSD 3-clause license.

最近版本更新:(数据更新于 2024-10-20 05:09:11)

2019-02-03 12:43:12 0.1.8-beta

2018-11-15 11:55:43 0.1.7-beta

2018-11-06 04:17:15 0.1.6-alpha

2018-11-05 23:44:54 0.1.5-alpha

2018-11-05 14:53:55 0.1.4-alpha

2018-11-03 04:50:49 0.1.3-alpha

2018-11-02 23:44:22 0.1.2-alpha

2018-11-02 17:14:55 0.1-alpha

Cesura/nxsh同语言 C最近更新仓库

2024-11-21 10:58:30 EdgeTX/edgetx

2024-11-15 10:03:16 hanwckf/bl-mt798x

2024-11-09 07:41:43 XITRIX/Moonlight-Switch

2024-11-04 17:16:21 redis/redis

2024-10-31 09:06:25 Spooks4576/Ghost_ESP

2024-10-31 03:40:05 tursodatabase/libsql