Skip to content

Conversation

@samuelet
Copy link
Contributor

@samuelet samuelet commented Sep 3, 2025

On latest Debian versions the command "Ip add show" outputs color chars on interface names. This patch uses the Term::ANSIColor lib to strip them fixing garbage in keys of Rex Template vars.
To test the problem simply dump gathered infos from a Debian Trixie (with iproute2 package installed) , and check the output of key interfaces for "$__36m" word:
rex -H MyDebian-e "say dump_system_information;"
...
$__36mens192_ip = ''
$__36mlo_netmask = ''
$__36mens192_netmask = ''
....

On latest Debian versions the command "Ip add show" outputs color chars on interface names.
This patch strips them fixing garbage in keys of Rex Template vars.
@samuelet samuelet closed this Sep 5, 2025
@samuelet samuelet deleted the patch-6 branch September 5, 2025 12:27
@samuelet samuelet restored the patch-6 branch September 5, 2025 12:28
@samuelet samuelet reopened this Sep 5, 2025
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.

1 participant