This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python | |
| # setup: pip install requests beautifulsoup4 | |
| from decimal import Decimal | |
| import requests | |
| from bs4 import BeautifulSoup | |
| import sys | |
| import getpass |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| # put output of 'monitor np counter PUNT_IPV4_ADJ_NULL_RTE_EXCD np3 count 25 location 0/1/CPU0' to a file 'foox.txt' | |
| # run './xr2pcap.rb foox.txt' and you'll have 'packets.txt' and 'packets.pcap' | |
| class XRNPUCounter | |
| PACKET_START = /byte packet/ | |
| LINE_RE = /^....: (.{48}).*/ | |
| def self.parse lines |