-
-
Notifications
You must be signed in to change notification settings - Fork 381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use the same protocols in =+ and <file> Rizin's parameter #593
Comments
I can see the confusion indeed, but those are different things... gdb, winedbg, file://, zip://, etc. are IO plugins that say how to read/write a file. So they do two different things, but, again, I can see the confusion indeed. This might be a good improvement to the book and/or to the help messages? |
I know that you can access to the IO plugins using the # rz rap://:8080 was executed in /bin in other terminal
$ rz --
> =+ rap://localhost:8080/rizin
# opened as fd = 1658
> o rap://localhost:8080/rizin
# Connecting to localhost, port 8080
# Connected to: localhost at port 8080
# rap connection was successful. open 1739 The point I tried to make (somehow) is that, ideally, these differences (io plugin vs protocol) could be abstracted, so that the user only have to think something like:
This protocol/io abstraction could eventually lead to converting the And this conversion could maybe remove code-duplication? Anyways, this is just me thinking out loud 🙂 |
It's not really like that.. You can have multiple files opened with I do understand it's even hard to explain... Figure it's harder to understand for users :D I agree we should simplify the whole thing somehow, not sure how yet. Suggestions are welcome. |
I know, I said the following:
Also, I didn't mention files in the two bullet points, I used the word something instead. What I'm trying to say is: Let's unify/abstract the concept of files/io and remote, so that the user can use one single command for opening something in the foreground, and a different command for opening something in the background (and switching between what is currently in the foreground). Example: $ rz --
> o /bin/rizin
# Prompt changes to rizin's entrypoint
> o gdb://10.0.0.39:8080
# Prompt changes to the entrypoint of whatever gdb is serving
# A message saying that /bin/rizin was moved to a background fd appears
> &o
# 0 fd:6 /bin/rizin
> &o rap://10.0.0.254:9090/dbg://rizin
# opened as fd = 1146
> &o
# 0 fd:6 /bin/rizin
# 2 fd:8 rap://10.0.0.254:9090/dbg://rizin
> &o 0
# Prompt changes to local rizin's previous seek position
# A message saying that gdb://10.0.0.39:8080 was moved to a background fd appears
> &o
# 1 fd:7 gdb://10.0.0.39:8080
# 2 fd:8 rap://10.0.0.254:9090/dbg://rizin |
Possibly using |
I'm not following you... You already have You also already have the |
Apologies for the poor explanation, clearly I am not expressing the idea in an understandable way. I'll try to do it one last time 🙂 Step one: forget everything you know about In this other dimension, Other dimension's The thing is that other dimension's Other dimension's $ rz rap://10.0.0.50:8080/--
> o
# * 0 fd:6 rap://10.0.0.50:8080/--
> o /bin/rizin
> o
# 0 fd:6 rap://10.0.0.50:8080/--
# * 0.0 fd:7 /bin/rizin
> &o tcp://:9090//opt # Starts in the background a TCP server serving remote /opt
> o
# 0 fd:6 rap://10.0.0.50:8080/--
# * 0.0 fd:7 /bin/rizin
# 0.1 fd:8 tcp://:9090//opt Of course, other dimension's Returning to our dimension, the io/file and remote is confusing: $ rz --
> o /bin/rizin ✅
> o rap://localhost:8080/malloc://512 ✅
> o http://localhost:8080 ✅
> o udp://localhost:8080 ❎ - Hmm
> o tcp://localhost:8080 ❎ - wat? http worked
> =+ tcp://localhost:8080 ✅ - Hmmm
> =+ http://localhost:8080 ✅ - mmmm
> =+ rap://localhost:8080/malloc://512 ✅
> o rap://:8080 ✅
> o tcp://:8080 ❎ - waa
> o http://:8080 ❎ - aaat?
> =t 8080 ✅ - 💣
> =h 8080 ✅ - 💥
> =: 8080 ✅ - 🤯 For a newbie (who likely wouldn't care about if |
Thanks for the longer explanation. Can I suggest that |
Sure think you made a good point here 🐃 Anyways, IMO modern emacs doesn't need the server-client functionality (same way the modern X server is 99.99% of the time used by one client, thus the reason Wayland will hopefully take over when some graphic card manufactures stop being annoying). In emacs, the whole reason this was relevant (in sane practice) was due to poor/incomplete terminal implementations, so you could use your super-terminal for your sysadmin tasks allowing opening the files in emacs without suffering the slowness and bugs from the firsts built-in emacs terminals. Of course you could start the server and control it from remote machines, but exposing your system to the internet like that is not worthy considering the modern alternatives: After all this emacs talk, what I want to say regarding Rizin is more or less the same: I really don't see how Rizin ("modern" radare2) benefits from this (attempted) separation of |
Now, I don't know all those emacs stuff... But it seems to me you are saying that nowadays the client/server implementation is not used/worth. Now, independently of whether I agree or not, that's the same as saying "client/server in rizin shall not be used/shall be removed". It is not the same as saying "client/server rizin is the same as opening a file remotely". I hope it's clear what I mean. Again, we might think whether it's worth having this client/server possibility within Rizin (and I believe I've heard people saying in some cases it is useful, but I would indeed be happy to think more about this) and making it better, but I do not think it is a good thing to mix "client/server concept" with "opening a remote file". |
Sure thing I understand the usefulness of the server/client Rizin capabilities. I went so far with the emacs argument that I ended up communicating the wrong thing.
If this is indeed the intention, then it is really confusing that |
So, for consistency's sake, either:
|
I think this is the problem indeed! I see no reason why How does that sound? |
It was a hit and miss but we finally got there, thank you for your patience! 🙂
Honestly, I don't know, because there are already 48 flags 😆 Also, to make things amazingly confusing, using a Now, will this be 1 flag per server type, or just one flag for the rap server? How about the raps server, another flag? How would it look like when starting a listening server? Does the user have to pass Somehow the current behavior looks less cryptic: Man, it looks like I'm mad after re-reading what I just wrote. Don't take it that way plz 👼 |
I think it is alright to have the form |
Certainly, that syntax clearly conveys what Though unsure why Assuming |
It's common in all tools to give the possibility to specify the listen address. I don't see why we should limit ourselves. |
Sure thing. I'm just questioning the use-case 🙂 |
I think there are use-cases for every network service to be limited on a particular network. I do that with different tools every time (e.g. a dns server only on one network, another dns server on another network, etc.). Anyway, I would either close this issue or transform it into: "Enforce usage of |
Fair enough 👍 Now, to be consistent, the user should be able to specify
|
Thanks for creating the specific issues. I'd suggest we close this issue as we are not going to use the same protocols in And yes, I think all protocols should be able to specify the specific address to listen to. By the way, additional context about why that might be necessary is: you want a localhost only server or a server accessible on the network to debug from other machines (or maybe from another VM attached through a virtual network). |
Is your feature request related to a problem? Please describe.
The
=+
command allows connecting to some protocols such as rap, tcp, and upd (among maybe others).The problem is that it doesn't allow connecting to the same protocols available as
<file>
Rizin's parameter.Describe the solution you'd like
Basically the opposite of what was reported #561, be able to do:
rz -c '=+ gdb://localhost:9090/ ; =!= 0' --
rz -c '=+ winedbg://localhost:9090/ ; =!= 0' --
Describe alternatives you've considered
💔
Additional context
AFAIK, only the RAP protocol can be used as
<file>
parameter and=+
:rz rap://:8080
<file>
:rz rap://localhost:8080/rizin
=+
:rz -c '=+ rap://localhost:8080/rizin ; =!= 0' --
The same should be possible for other protocols.
The same limitations exist in radare2.
The text was updated successfully, but these errors were encountered: