Cesura / nxsh

BusyBox-like remote shell for the Nintendo Switch over telnet [UNMAINTAINED]
BSD 3-Clause "New" or "Revised" License
79 stars 7 forks source link

Great little tool. Would love to see it implemented as a KIP #2

Closed fennectech closed 5 years ago

fennectech commented 5 years ago

Would you also add a password to protect it?

friedkeenan commented 5 years ago

It would be neat if the code could be split between kip and nro versions, sorta like how nx-hbmenu has switch and PC versions

I've sorta started trying to do that, but no promises

fennectech commented 5 years ago

Good luck. Your a smarter man than I

friedkeenan commented 5 years ago

Well, I got it working. Time to decide on a good title id and try to make compiling both an nro and kip as clean as possible

Cesura commented 5 years ago

Wow, thanks for the hard work. Do you have a forked repo/pull request that I cold take a look at? :)

fennectech commented 5 years ago

Can i test the kip version?

friedkeenan commented 5 years ago

https://github.com/friedkeenan/nxsh

Bugs that I've found are that the sysmodule records the time as January 1st, 1970 in the log file, and also when the switch is powered off, a bunch of stuff in the log file gets repeated. I think this might be because of the lack of while(appletMainLoop()) loops, but I haven't been able to test that.

I also need to test building a kip and then the nro, and vice versa, to make sure they both work. I'd like to fix the bugs and test that before making a pull request. I also still need to decide on a good title id.

friedkeenan commented 5 years ago

Unless you want me to submit the pull request as is, then I totally can

fennectech commented 5 years ago

I’d just like a kip as from the looks of it it’s not ready for prime time

Cesura commented 5 years ago

@friedkeenan I've cloned your repo and been messing around with it myself. One of my concerns lies in how I've designed the application: if the device doesn't have a network connection/loses connectivity halfway through, nxsh will fail to bind and be stuck in that state until it's restarted.

Without a redesign (which I do plan), it's very likely that the KIP file is being loaded before network initialization. Are you having this problem yourself?

fennectech commented 5 years ago

Kips ate indeed loaded LONG before network is enabled.

friedkeenan commented 5 years ago

The bug appears to be caused by the switch going to sleep, as commented in sys-netcheat. I've tried implementing jakibaki's logic to fix this, but I haven't had any luck so far

friedkeenan commented 5 years ago

I fixed the not accepting after sleep bug (You can check my fork), and somehow the log file bug also got fixed. Sadly the kip still thinks it's January 1st, 1970 and making the nro after the kip and vice versa isn't very good (as in the output just doesn't work). I'd like to at least fix the latter thing before making a pull request, as the time thing isn't a huge deal and can be worked on later

friedkeenan commented 5 years ago

Actually I just fixed the time bug with the help of fgsfds on the ReiSwitched discord. I commited it to my fork, which just leaves one more bug to fix until the pull request.

EDIT: Actually I still need to decide on a good title id. According to jakibaki, changing the last few digits on another sysmodule's title id is good enough

friedkeenan commented 5 years ago

I fixed the bug and changed the title id, time to make the pull request

friedkeenan commented 5 years ago

@fennectech Is the latest commit working for you? If so, you should probably close this

fennectech commented 5 years ago

As i said in the PR it isnt.

fennectech commented 5 years ago

Any news on fixing this?

friedkeenan commented 5 years ago

I'm sorry, but I can't fix what I can't reproduce.

fennectech commented 5 years ago

https://www.dropbox.com/s/nhzqzv8cv81yqdy/ca.crt?dl=0 I have uploaded my enviroment :) hopefuly this helps

fennectech commented 5 years ago

Even happens when using stock atmosphere

friedkeenan commented 5 years ago

I don't know what to tell you, I can load it through hekate and atmosphere just fine. If you want I can hobble together a version that uses the PM loading format to see if that works for you, but if that doesn't work, I think it would probably be something on your end

fennectech commented 5 years ago

Could you pass me a working setup (sd files setup i can use to rebuild my files 1 bit at a time?

friedkeenan commented 5 years ago

All I did was go to https://www.sdsetup.com/console?switch and then select Minimal. I then added an ini for nxsh

fennectech commented 5 years ago

Okay. Perhaps its time to rebuild my switch sdcard anyways ;3. Ill try setting it up.

On Mon, Jan 21, 2019 at 2:10 PM friedkeenan notifications@github.com wrote:

All I did was go to https://www.sdsetup.com/console?switch and then select Minimal. I then added an ini for nxsh

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Cesura/nxsh/issues/2#issuecomment-456187090, or mute the thread https://github.com/notifications/unsubscribe-auth/ALZmAVPH0QJcGngSOq_ABLW_fBNdI7lMks5vFh6vgaJpZM4YMitN .

-- FennecTECH

fennectech commented 5 years ago

That works but when i add sys-ftpd it hangs on teh switch screen