DE-CIX / pbgp-parser

PCAP BGP Parser
Other
84 stars 21 forks source link

Input validation of CLI arguments #45

Open johannesmoos opened 3 years ago

johannesmoos commented 3 years ago

Input validation of CLI arguments would be a valuable feature to immediately notice that a given CLI command is not valid (instead of waiting for the parser to do its thing and then wondering why there are no results :)

Currently all of the following get accepted:

pbgpp.py --pcap test.pcap --filter-message-type=TEST
pbgpp.py --pcap test.pcap --filter-message-subtype=TEST
pbgpp.py --pcap test.pcap --filter-next-hop=TEST
pbgpp.py --pcap test.pcap --filter-source-ip=TEST

I didn't test all of the arguments, but I guess it's not implemented at all currently.

thannaske commented 3 years ago

Hey JMo! You are guessing right. At the moment there is no input validation regarding the command line arguments, except for those that are restricted to a list of well defined values (e.g. the message types).

johannesmoos commented 3 years ago

Hi Tobias,

but then

pbgpp.py --pcap test.pcap --filter-message-type=TEST
pbgpp.py --pcap test.pcap --filter-message-subtype=TEST

should throw an error?