Skip to content
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

Improve visual indentation logic for tables #18849

Conversation

adfoster-r7
Copy link
Contributor

Improve visual indentation logic for tables

Requires rapid7/rex-text#68

Verification

  • Ensure hiearchical search command continues to work:
msf6 auxiliary(scanner/mysql/mysql_hashdump) > search forge_ticket

Matching Modules
================

   #  Name                                   Disclosure Date  Rank    Check  Description
   -  ----                                   ---------------  ----    -----  -----------
   0  auxiliary/admin/kerberos/forge_ticket  .                normal  No     Kerberos Silver/Golden/Diamond/Sapphire Ticket Forging
   1    \_ action: FORGE_DIAMOND             .                .       .      Forge a Diamond Ticket
   2    \_ action: FORGE_GOLDEN              .                .       .      Forge a Golden Ticket
   3    \_ action: FORGE_SAPPHIRE            .                .       .      Forge a Sapphire Ticket
   4    \_ action: FORGE_SILVER              .                .       .      Forge a Silver Ticket
   5    \_ AKA: Ticketer                     .                .       .      .
   6    \_ AKA: Klist                        .                .       .      .


  • Ensure DNS command still continues to work
msf6 auxiliary(scanner/mysql/mysql_hashdump) > dns print
Default search domain: N/A
Default search list:   localdomain
Current cache size:    0

Resolver rule entries
=====================

   #  Rule   Resolver     Comm channel
   -  ----   --------     ------------
   1  *
   .    \_   static       N/A
   .    \_   192.168.1.1
... etc...

@adfoster-r7 adfoster-r7 force-pushed the improve-visual-indentation-logic-for-tables branch 2 times, most recently from eec2c56 to 103380e Compare February 17, 2024 01:09
@@ -238,15 +243,15 @@
context 'password' do
it 'should show just the password' do
creds.cmd_creds('-t', 'password')
# Table matching really sucks
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

# ca62fd9102665d6986f918ae42cae244e/lib/rex/text/table.rb#L221-L222
# So use https://en.wikipedia.org/wiki/Non-breaking_space as a workaround for now. A change should exist in Rex-Text to support this requirement
TABLE_INDENT = "\xc2\xa0\xc2\xa0\\_ ".freeze
TABLE_INDENT = " \\_ ".freeze
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe in the future this should be moved into a centralized place if we want consistent indentation of rows, or maybe it should be part of the 'Styler' concept that we have for rows - which currently adds coloring support and arrows like =>, so visual indiciators would work here too

@smcintyre-r7 smcintyre-r7 self-assigned this Feb 21, 2024
@adfoster-r7 adfoster-r7 force-pushed the improve-visual-indentation-logic-for-tables branch from 103380e to d76dd4a Compare February 22, 2024 14:43
@@ -426,7 +426,7 @@ GEM
rex-socket
rex-text
rex-struct2 (0.1.4)
rex-text (0.2.53)
rex-text (0.2.56)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing else noteworthy here, just some cleanup from past me

@smcintyre-r7 smcintyre-r7 merged commit 2c09f38 into rapid7:master Feb 22, 2024
48 checks passed
@smcintyre-r7
Copy link
Contributor

Release Notes

This adjusts the logic used for the visual indentation of tables.

@zeroSteiner zeroSteiner mentioned this pull request Feb 26, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants