Jump to content




nsh - Now With Previous Session Resume!


  • You cannot reply to this topic
71 replies to this topic

#21 Mendax

  • Members
  • 366 posts

Posted 11 January 2013 - 12:21 AM

May I use this in my OS? It's the last thing I need. I might also make a front-end for it if you don't mind :)

#22 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 11 January 2013 - 05:01 AM

View PostMendax, on 11 January 2013 - 12:21 AM, said:

May I use this in my OS? It's the last thing I need. I might also make a front-end for it if you don't mind :)

You're welcome to include nsh as-is in whatever you like. You may also create a derivative program, though I would ask that you make it nsh-compatible if you do (that is, your front-end should be able to connect to a standard nsh server and operate correctly, or have clients connect to it and operate correctly, if it's a server front-end). :)

#23 Mendax

  • Members
  • 366 posts

Posted 11 January 2013 - 02:03 PM

View PostLyqyd, on 11 January 2013 - 05:01 AM, said:

You're welcome to include nsh as-is in whatever you like. You may also create a derivative program, though I would ask that you make it nsh-compatible if you do (that is, your front-end should be able to connect to a standard nsh server and operate correctly, or have clients connect to it and operate correctly, if it's a server front-end). :)
By frontend I mean a GUI. I may also include some server-side software for it.

#24 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 11 January 2013 - 05:58 PM

nsh has been updated to include file transfers! See the first post for details and the required additional programs.

View PostMendax, on 11 January 2013 - 02:03 PM, said:

View PostLyqyd, on 11 January 2013 - 05:01 AM, said:

You're welcome to include nsh as-is in whatever you like. You may also create a derivative program, though I would ask that you make it nsh-compatible if you do (that is, your front-end should be able to connect to a standard nsh server and operate correctly, or have clients connect to it and operate correctly, if it's a server front-end). :)
By frontend I mean a GUI. I may also include some server-side software for it.

Oh, a gui for it? I'm curious as to how that would work! :) Funny you should mention server-side software for it, as I just added a little API to it and plan to further extend nsh's capabilities to handle extra stuff client-side. There are exciting changes in the pipeline.

#25 Mendax

  • Members
  • 366 posts

Posted 12 January 2013 - 08:19 AM

I look forward to it. It's gonna just be a mouse click and type interface. Nothing that special.

#26 pielover88888

  • Members
  • 66 posts
  • LocationIn a library that's in a village, huddling my advanced computer as zombies bang on the door.

Posted 20 January 2013 - 02:43 PM

Is it just my laggy computer, or does editing a large file or..doing anything..slowly print whatever's happening, word by word?

#27 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 20 January 2013 - 04:26 PM

Things are going to be a little bit slower when doing things over nsh, as there's the obvious overhead of transmitting all the key events to the nsh host, and receiving all the screen drawing instructions back. I haven't noticed it being too much of a problem, but obviously, if you're already on a relatively slow server, it's only going to be compounded by needing to interact with two computers at once. One thing you might try if you have the latest version is using the get and put commands (programs available in the first post) to retrieve the file from the nsh host and edit it locally, then put it back on the host computer again. Is editing the file locally a little slow also?

#28 twitch204

  • Members
  • 11 posts

Posted 21 January 2013 - 04:25 PM

Hi,
I downloaded NSH to two computers. With the one I put in nsh host and got the following error "bios:267 attempt to write to gobal. Installed on a few others and keep getting the same error.

#29 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 21 January 2013 - 04:32 PM

View Posttwitch204, on 21 January 2013 - 04:25 PM, said:

Hi,
I downloaded NSH to two computers. With the one I put in nsh host and got the following error "bios:267 attempt to write to gobal. Installed on a few others and keep getting the same error.

What version of ComputerCraft are you on?

#30 twitch204

  • Members
  • 11 posts

Posted 21 January 2013 - 05:16 PM

1.3 with tekkit classic using the launcher.

#31 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 21 January 2013 - 05:31 PM

View Posttwitch204, on 21 January 2013 - 05:16 PM, said:

1.3 with tekkit classic using the launcher.

Try changing line 248 from this:

_G.nsh = nshAPI

to this:

rawset(_G, "nsh", nshAPI)


#32 twitch204

  • Members
  • 11 posts

Posted 21 January 2013 - 08:39 PM

ok, i changed the line and am now getting the error "bios:206: [string "nsh"]:127: unexpected symbol

#33 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 22 January 2013 - 04:29 AM

View Posttwitch204, on 21 January 2013 - 08:39 PM, said:

ok, i changed the line and am now getting the error "bios:206: [string "nsh"]:127: unexpected symbol

Hmm, that change should not have resulted in that error. Is it possible you accidentally changed something else in the code while you were changing line 248? I will look into this tonight and see if I can reproduce the error.

#34 twitch204

  • Members
  • 11 posts

Posted 22 January 2013 - 05:36 AM

I dont think so, i did highlight, and pasted over it. When I get home ill redownload and try again. If you need access to the server or the cfg let me know. Thank you for helping me with this!

#35 Ciesson

  • New Members
  • 2 posts

Posted 02 February 2013 - 05:47 AM

I must say, brilliant work mate! This is code at its finest.

Except for a typo I found on line 413:
elseif pacektType == "data" then

This hasn't crashed me yet, so it might just be an artifact.

Again, lovely work!

#36 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 02 February 2013 - 06:38 AM

View PostCiesson, on 02 February 2013 - 05:47 AM, said:

I must say, brilliant work mate! This is code at its finest.

Except for a typo I found on line 413:
elseif pacektType == "data" then

This hasn't crashed me yet, so it might just be an artifact.

Again, lovely work!

Awesome! I'm glad you're liking it. :)

If I recall correctly, that is probably code that's stubbed in for future functionality (would be used for client-side nsh extensions), so it shouldn't cause any issues. I will certainly get that fixed when I flesh out the extensions code, though. Thanks for the report!

#37 Ciesson

  • New Members
  • 2 posts

Posted 03 February 2013 - 09:57 PM

You don't mind if I fork this and make a secure version of it? I am currently working on a PKI system and I have a relatively fast AES library that I plan to use.

#38 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 05 February 2013 - 04:26 AM

View PostCiesson, on 03 February 2013 - 09:57 PM, said:

You don't mind if I fork this and make a secure version of it? I am currently working on a PKI system and I have a relatively fast AES library that I plan to use.

It's on github for a reason. :)

#39 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 16 February 2013 - 11:16 AM

Here's a small authorization program you might use for asking for a password in incoming connections:

local pass = "fooBarBaz"
term.clear()
term.setCursorPos(1,1)
print("[email protected]"..(os.getComputerLabel() or os.getComputerID()))
term.write("Login Required: ")
if read("*") == pass then
  shell.run("rom/programs/shell")
end

The code should be pretty obvious--they get one chance at getting the password correct. If they get it wrong, they are immediately disconnected. If they get it correct, a new shell session is started. If you named the program "auth", you would use it with `nsh host auth` or `nsh host auth shell` or similar, so that it will be run for all incoming connections.

#40 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 22 February 2013 - 07:56 AM

A new version of nsh is available. This version fixes a bug related to the rednet change in ComputerCraft 1.5. If you have computers that are not easily accessible, I would advise you to update nsh on these computers prior to updating to ComputerCraft 1.5. Any computers running any older versions will be non-responsive in ComputerCraft 1.5. I apologize for any inconvenience this causes.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users