Skip to content

fix: truncate long matched strings in findrefs output - #32

Open
xaoLiu1222 wants to merge 4 commits into
MG1937:dev-0.1.0from
xaoLiu1222:main
Open

xaoLiu1222 wants to merge 4 commits into
MG1937:dev-0.1.0from
xaoLiu1222:main

Conversation

@xaoLiu1222

Copy link
Copy Markdown

Problem

findrefs string prints matched string constants verbatim. When the query is a short substring that occurs inside a large regex constant, the whole multi-KB regex floods the console.

Repro:

droidasc findrefs app.apk string frida

frida matches the blackfriday TLD inside the androidx WEB_URL pattern constants, printing the entire 2000+ char regex as matched=(...).

Fix

Truncate matched string names at 200 chars with an ellipsis in _format_matched_name (asc_client/asc_handler.py).

Verification

  • Manual: findrefs string frida output now ends with ...
  • Full test suite: 58 tests OK (4.438s)

MG1937 and others added 4 commits September 16, 2026 02:43
enhance gui xref ability by androguard token type
String matches against regex constants (e.g. searching 'frida' hits the
'blackfriday' TLD inside androidx WEB_URL patterns) printed multi-KB
regex literals verbatim, flooding the console. Truncate matched string
names at 200 chars with an ellipsis.
@MG1937
MG1937 changed the base branch from main to dev-0.1.0 September 22, 2026 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants