Skip to content

Conversation

@amcgough-r7
Copy link
Contributor

Description

Adding snmp description detection for Huawei hardware that runs vrp

How Has This Been Tested?

A clear and concise description of your changes were tested.
https://www.shodan.io/search?query=VRP+product%3A%22HUAWEI+Technology+Co.+Ltd%22

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist:

  • I have updated the documentation accordingly (or changes are not required).
  • I have added tests to cover my changes (or new tests are not required).
  • All new and existing tests passed.

@amcgough-r7 amcgough-r7 marked this pull request as ready for review November 27, 2025 14:12
@mlaskowski-r7
Copy link
Contributor

The tests started to complain:

Failures:

  1) Recog::DB#snmp_sysdescr.xml (?-mix:^Huawei Versatile Routing Platform Software.*Version ([\d.]+)\s+\((.*?)\s+(V[\d.]+R[\d.]+C[\d.]+[SPC|SPH|CP|HP\d.]+)\S*) Example 'Huawei Versatile Routing Platform Software
      VRP (R) software, Version 8.120 (CE6870EI V200R001C00SPC700) Copyright (C) 2012-2016 Huawei Technologies Co., Ltd.
    ' matches this regex
     Failure/Error: expect(match).to_not be_nil, 'Regex did not match'
       Regex did not match
     # ./spec/lib/fingerprint_self_test_spec.rb:127:in `block (7 levels) in <top (required)>'

  2) Recog::DB#snmp_sysdescr.xml (?-mix:^Huawei Versatile Routing Platform Software.*Version ([\d.]+)\s+\((.*?)\s+(V[\d.]+R[\d.]+C[\d.]+[SPC|SPH|CP|HP\d.]+)\S*) Example 'Huawei Versatile Routing Platform Software
      VRP (R) software, Version 5.120 (AR2200 V200R003C00) Copyright (C) 2011-2012 HUAWEI TECH CO., LTD
    ' matches this regex
     Failure/Error: expect(match).to_not be_nil, 'Regex did not match'
       Regex did not match
     # ./spec/lib/fingerprint_self_test_spec.rb:127:in `block (7 levels) in <top (required)>'

Finished in 38.15 seconds (files took 10.11 seconds to load)
195501 examples, 2 failures

Failed examples:

rspec ./spec/lib/fingerprint_self_test_spec.rb[1:43:753:6] # Recog::DB#snmp_sysdescr.xml (?-mix:^Huawei Versatile Routing Platform Software.*Version ([\d.]+)\s+\((.*?)\s+(V[\d.]+R[\d.]+C[\d.]+[SPC|SPH|CP|HP\d.]+)\S*) Example 'Huawei Versatile Routing Platform Software
      VRP (R) software, Version 8.120 (CE6870EI V200R001C00SPC700) Copyright (C) 2012-2016 Huawei Technologies Co., Ltd.
    ' matches this regex
rspec ./spec/lib/fingerprint_self_test_spec.rb[1:43:753:9] # Recog::DB#snmp_sysdescr.xml (?-mix:^Huawei Versatile Routing Platform Software.*Version ([\d.]+)\s+\((.*?)\s+(V[\d.]+R[\d.]+C[\d.]+[SPC|SPH|CP|HP\d.]+)\S*) Example 'Huawei Versatile Routing Platform Software
      VRP (R) software, Version 5.120 (AR2200 V200R003C00) Copyright (C) 2011-2012 HUAWEI TECH CO., LTD
    ' matches this regex

Randomized with seed 10182

@amcgough-r7 amcgough-r7 merged commit 83f5b76 into main Dec 1, 2025
25 checks passed
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.

5 participants