GithubHelp home page GithubHelp logo

Comments (5)

zanchey avatar zanchey commented on June 15, 2024 1

Did you write this using ChatGPT or another LLM? It does not make sense.

from fish-shell.

faho avatar faho commented on June 15, 2024

Use python3 -c 'import pty;pty.spawn("/bin/bash")' to upgrade and stabilize the reverse shell.

This starts a bash. At that point, fish is entirely out of the picture.

However, if you do run "/usr/bin/fish" instead, you will find that it started something that isn't really a fully usable terminal - e.g. fish will fail to get the correct dimensions for the terminal. It needs that in order to be able to move the cursor properly, which is necessary for highlighting, suggestions, the completion pager, ...

A lot of its drawing will also fail, and the input doesn't work as expected.

Fish demands a lot more from the terminal than bash, and will e.g. set the terminal modes like it needs.

It appears that fish simply won't run properly in whatever is presenting the terminal here (rlwrap or python's pty module).

I'm going to say that we simply do not target this usecase. Sorry.

from fish-shell.

uhtred-X avatar uhtred-X commented on June 15, 2024

Did you write this using ChatGPT or another LLM? It does not make sense.
It will only make sense if you have conducted some penetration testing or engaged in CTF-like activities and stabilized your shell after spawning it. Also sorry yes I used ChatGPT because my english isn't that good so I wrote a raw query then ask chatgpt for correction in sentences but issue is very understandable if you know the concept I'm talking about.

from fish-shell.

uhtred-X avatar uhtred-X commented on June 15, 2024

Use python3 -c 'import pty;pty.spawn("/bin/bash")' to upgrade and stabilize the reverse shell.

This starts a bash. At that point, fish is entirely out of the picture.

However, if you do run "/usr/bin/fish" instead, you will find that it started something that isn't really a fully usable terminal - e.g. fish will fail to get the correct dimensions for the terminal. It needs that in order to be able to move the cursor properly, which is necessary for highlighting, suggestions, the completion pager, ...

A lot of its drawing will also fail, and the input doesn't work as expected.

Fish demands a lot more from the terminal than bash, and will e.g. set the terminal modes like it needs.

It appears that fish simply won't run properly in whatever is presenting the terminal here (rlwrap or python's pty module).

I'm going to say that we simply do not target this usecase. Sorry.

fish is not typically included as a default package/binary in systems so I can't spawn a shell in fish if it is not present there, so ideal choices left are /bin/sh and /bin/bash. I'm using fish as my terminal where I'm running the netcat listener. I don't have much idea how the environment variables and other things work when we spawn a shell and the try to make it more interactive using stty but in bash shell it work fine so there must be some solution for fish as well. I guess you are not getting the actual picture of the issue and fault is mine I'm not that good to display it. Would you be open to examining the issue further if I provide a video demonstration in both bash and fish as my terminal?

from fish-shell.

uhtred-X avatar uhtred-X commented on June 15, 2024

Use python3 -c 'import pty;pty.spawn("/bin/bash")' to upgrade and stabilize the reverse shell.

This starts a bash. At that point, fish is entirely out of the picture.

However, if you do run "/usr/bin/fish" instead, you will find that it started something that isn't really a fully usable terminal - e.g. fish will fail to get the correct dimensions for the terminal. It needs that in order to be able to move the cursor properly, which is necessary for highlighting, suggestions, the completion pager, ...

A lot of its drawing will also fail, and the input doesn't work as expected.

Fish demands a lot more from the terminal than bash, and will e.g. set the terminal modes like it needs.

It appears that fish simply won't run properly in whatever is presenting the terminal here (rlwrap or python's pty module).

I'm going to say that we simply do not target this usecase. Sorry.

I guess, I have to temporarily switch to zsh or any other shell for such tasks but I love to use fish as my default shell, it has many much features than others. BTW thanks for your time and your response.

from fish-shell.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.