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

Suggestion for Issue 184 #192

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

eltoroit
Copy link

@eltoroit eltoroit commented Sep 2, 2023

This code fixes issue 184 where the wrong value was being returned. The problem is that the format has changed and the code assumed some specific format. I have written code that is more generic.

Description

Rewrote function named parseShowInterfaces without assuming a specific format in the output generated

Motivation and Context

Fixes issue #184

Usage examples

I did not change the original output, so same usage.

How Has This Been Tested?

I have a Windows 11 machine where the problem was occurring, and I have dual network card so I tested the output works for both interfaces.

Types of changes

  • [x ] Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Refactorization (non-functional change which improve code readibility)

This code fixes issue 184 where the wrong value was being returned.
@max-sistemich-kisters
Copy link

Unfortunately, this would break parsing on non-english machines, because the output of netsh is localized, for example like this on my german windows 10:

PS C:\> netsh wlan show interfaces

Es ist 1 Schnittstelle auf dem System vorhanden:

    Name                   : WLAN
    Beschreibung           : Intel(R) Wi-Fi 6E AX211 160MHz
    GUID                   : 3d16b69e-860c-41ec-bc9b-e684b51665ee
    Physische Adresse      : 00:d4:9e:5c:61:ba
    Status                 : Verbunden
    SSID                   : TP-Link_Guest_AEB7_5G
    BSSID                  : b2:be:76:77:ae:b6
    Netzwerktyp            : Infrastruktur
    Funktyp                   : 802.11ac
    Authentifizierung   : WPA2-Personal
    Verschlüsselung        : CCMP
    Verbindungsmodus          : Automat. Verbindung
    Kanal               : 36
    Empfangsrate (MBit/s)  : 780
    Übertragungsrate (MBit/s) : 780
    Signal              : 72%
    Profil                 : TP-Link_Guest_AEB7_5G

    Status des gehosteten Netzwerks  : Nicht verfügbar

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