-
Notifications
You must be signed in to change notification settings - Fork 14.7k
WMAP improvement #8104
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
WMAP improvement #8104
Conversation
…ites -s [ids] (true/false)) Filtering 404 in tree output
| end | ||
|
|
||
| # | ||
| # Print Tree structure. Still ugly |
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.
Quite!
| if l == nil or l.empty? | ||
| l = 200 | ||
| s = true | ||
| o = 'true' |
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.
Why is this not Boolean true?
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.
Ah, it comes from the arg. You should be resolving the string to a Boolean.
| l = l.to_i | ||
| s = false | ||
| # Add check if unicode parameters is the second one | ||
| if l == 'true' or l == 'false' |
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.
|| is preferred over or.
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.
Sorry ! (Newbie in Ruby) Thanks, I will think about it the next time :)
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.
Lol, this was the only valid criticism. Nice work!
| u = args.shift | ||
| l = args.shift | ||
| s = args.shift | ||
| o = args.shift |
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.
Why the var change?
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.
I assume for "output?"
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.
Yes exactly ! 's' was useless before so I recycle it !
| end | ||
| end | ||
|
|
||
| o = (o == 'true') |
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.
Looks like you're resolving to Boolean down here. Can you move it earlier?
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.
Hmm, maybe not.
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.
That's right, an other option is this :
o = args.shift
o = (o == 'true')
return unless u
if l == nil or l.empty?
l = 200
o = true
else
# Add check if unicode parameters is the second one
if l == 'true' || l == 'false'
o = (l == 'true')
l = 200
else
l = l.to_i
end
end
But it's involves two resolutions, not necessarily prettier…
|
This diff is difficult to read due to the gaps. Apologies if the comments don't read linearly. It seems you've already accounted for all my review points. Nice work! |
|
So, do you think you can add Unicode detection like |
|
@wvu-r7 I believe our current approach is to assume everything but Windows is Unicode, or at least that's how the Meterpreter console does it. Another approach would be to check the LANG environment variable contains UTF-8 |
|
If you come up with a common method we can share between the two locations, I'll bet there are some other areas we could start fixing too. Maybe we should add Rex::Compat.output_unicode or something. |
|
Thanks, great work! |
|
Thanks !! :) |
Release NotesVisual Improvements were made to the Unicode tree produced by WMAP plugin's |
wmap_sites -swmap_sites -s [ids] (level) (unicode output true/false))You can see some of the informations in issue #8089
Verification