Skip to content

Wireshark has incorrect URL and parsing #1008

@bra1ncramp

Description

@bra1ncramp

The download URL for Wireshark is incorrect.

Current URL in script:
https://1.as.dl.wireshark.org/osx/Wireshark%20Latest%20Intel%2064.dmg
and
https://1.as.dl.wireshark.org/osx/Wireshark%20Latest%20Arm%2064.dmg

Correct URL:
https://2.na.dl.wireshark.org/osx/Wireshark%20Latest%20Intel%2064.dmg
and
https://2.na.dl.wireshark.org/osx/Wireshark%20Latest%20Arm%2064.dmg

Also, the appNewVersion command is not working correctly. There should be a -e after the xpath and before the query.

Re-building it could look like this:

wireshark)
    name="Wireshark"
    type="dmg"
    appNewVersion=$(curl -fs "https://www.wireshark.org/update/0/Wireshark/4.0.0/macOS/x86-64/en-US/stable.xml" | xpath -e '(//rss/channel/item/enclosure/@sparkle:version)[1]' 2>/dev/null | head -1 | cut -d '"' -f 2)
    urlToParse=$(curl -fs "https://www.wireshark.org/update/0/Wireshark/4.0.0/macOS/x86-64/en-US/stable.xml" | xpath -e '(//rss/channel/item/enclosure/@url)[1]' 2>/dev/null | head -1 | cut -d ':' -f 2 | cut -d '%' -f 1)
    if [[ $(arch) == i386 ]]; then
      downloadURL="https:$urlToParse%20Latest%20Intel%2064.dmg"
    elif [[ $(arch) == arm64 ]]; then
      downloadURL="https:$urlToParse%20Latest%20Arm%2064.dmg"
    fi
    expectedTeamID="7Z6EMTD2C6"
    ;;```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions