Comments (5)
Did you write this using ChatGPT or another LLM? It does not make sense.
from fish-shell.
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.
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.
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.
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)
- check-completions.fish fails when completion command exists but errors HOT 7
- [vi-mode] bug: incorrect `b` behavior
- [vi-mode] bug: cursor gets misplaced after delete
- Autosuggestions sometimes get accepted without input HOT 11
- Fish doesn't use character classes with Globbing?fish HOT 1
- Cannot set universal variables in `fish --no-config` HOT 1
- Documentation: document method for not splitting shell outputs by newline HOT 2
- Can't set nim prompt for root user in Termux.
- Feature: Tab completion and showing description HOT 8
- fish_add_path does nothing on msys2, and set $PATH misbehaves HOT 5
- Key input after piping to `fzf` does not work with new extended keyboard input functionality HOT 3
- Focus reporting stays on in long-running loop
- Commandline is needlessly repainted with new extended keyboard input functionality HOT 4
- Multiple successive up-or-search broken in gnome terminal HOT 3
- Autosuggestions suggest non-existing files HOT 10
- mipsel arch lacks AtomicU64 support HOT 5
- Suppress wildcards-globbing for http(s) parameters HOT 1
- Can't use Windows Terminal's Starting Directory HOT 4
- document limitations of --condition HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fish-shell.