Module: Mihari::Mixins::AutonomousSystem
- Included in:
- Structs::Censys::AutonomousSystem, Structs::GreyNoise::Metadata, Structs::IPInfo::Response, Structs::Onyphe::Result, Structs::Shodan::Match
- Defined in:
- lib/mihari/mixins/autonomous_system.rb
Instance Method Summary collapse
-
#normalize_asn(asn) ⇒ Integer
Normalize ASN value.
Instance Method Details
#normalize_asn(asn) ⇒ Integer
Normalize ASN value
13 14 15 16 17 18 |
# File 'lib/mihari/mixins/autonomous_system.rb', line 13 def normalize_asn(asn) return asn if asn.is_a?(Integer) return asn.to_i unless asn.start_with?("AS") asn.delete_prefix("AS").to_i end |