-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Adding wo*y
commands using clipboard instead of [val]
#4533
Conversation
You can already do this with the For example. having |
My first instinct was to extend the |
oh i get your point. Using the clipboard as a place to store the key. My suggestion would be to add an
|
d43a6ac
to
e1e10f2
Compare
yX
command for clipboard XOR to blockwo*y
commands using clipboard instead of [val]
An elegant patch just turned ugly, but I may have made it. |
65e2582
to
4a696f3
Compare
I couldn't bring myself to rewrite the arg parsing for the |
I am getting second thoughts here: Wouldn't it be more sensible to fall back to clipboard when no |
I have a version ready that falls back to clipboard when no |
"wor"," [val]", ">>= shift right", | ||
"wol"," [val]","<<= shift left", | ||
"wo2"," [val]","2= 2 byte endian swap", | ||
"wo4"," [val]", "4= 4 byte endian swap", | ||
"wo*y", "", "same as their counterparts above, but using clipboard instead of [val]", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this shuold be alphabetically sorted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's been a mess before, so it was hard to make out the right spot. I tried to work surgically. Shouldn't a cleanup here be part of a different pull request?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r2 have a huge codebase and we try to have as much testcases as possible in order to not break stuff, because one of the main premises is the continuous refactoring, mainly because most of the stuff that is implemented in r2 is done "quickly" because is a feature someone needs for something NOW. but there are always better ways to do stuff, so that's where the refactoring enters the game. you can do this alphabetically sorting thing in the same PR, there's no real issue in sorting out a text array that will be processed by humans.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the explanation. I'm sorry. I didn't mean to drive you into defense. :/
I will push along a separate commit in this pull request.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Into defense? Dont take me wrong. Im not trying to be offensive or anything. Just trying to give some feedback on every new contributor just to discuss better way to handle this.
Thats a very nice addition :) take a beer and chill a bit ;)
Ill merge after lunch
Thx
On 07 Apr 2016, at 14:49, Christiane Ruetten [email protected] wrote:
In libr/core/cmd_write.c:
"wor"," [val]", ">>= shift right", "wol"," [val]","<<= shift left", "wo2"," [val]","2= 2 byte endian swap", "wo4"," [val]", "4= 4 byte endian swap",
Thanks for the explanation. I'm sorry. I didn't mean to drive you into defense. :/"wo*y", "", "same as their counterparts above, but using clipboard instead of [val]",
I will push along a separate commit in this pull request.
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No offense taken at all! I was just slightly worried that you felt offended because you started justifying radare code quality there.
Sorry for the late reply, its been a crazy day yesterday. Can you address the comments and update the PR? looks good to merge |
@radare, please comment on #4533 (comment) . I much prefer that solution. |
TBH, I have never gotten in that much trouble for not touching the existing code. I am thankful that you pointed out the mistakes I was about to leave in place, but I also feel that we might be better off to separate my feature work from what seems to be a much-needed audit/rewrite of the existing code. |
When the [val] argument to wo* subcommands is omitted, clipboard content is used instead. This allows, for example, to easily XOR two memory blocks.
Woah, someone merged this PR into master before we were done with the review. :( |
I am closing this PR. There's not much sense in trying to fix the broken merge on top of this. |
wtf? you dont have to fix any merge and you can push -f in pr'd branches perfectly. github handles this |
ok moved to #4548 |
This PR was poisoned because I had force-pushed into this branch without realizing that it had already been merged. |
When working with streaming ciphers, being able to XOR memory regions inside radare is super nifty. This implementation uses the clipboard as XOR key which is repeated when it is shorter than blocksize.