Skip to content

Commit

Permalink
Due to the poorly constructed port list CSV from IANA we need to chec…
Browse files Browse the repository at this point in the history
…k if we have all the data we need before doing anything with it since it is sometimes inconsistent. CSV is not consistent throughout :(
  • Loading branch information
aaronjwood committed Jan 14, 2015
1 parent 1022748 commit 27326bb
Showing 1 changed file with 11 additions and 3 deletions.
Expand Up @@ -213,9 +213,17 @@ public void run() {

while((line = reader.readLine()) != null) {
String[] portInfo = line.split(",");
String name = portInfo[0];
String port = portInfo[1];
String protocol = portInfo[2];
String name;
String port;

if(portInfo.length > 2) {
name = portInfo[0];
port = portInfo[1];
}
else {
name = "unknown";
port = null;
}

try {
if(output == Integer.parseInt(port)) {
Expand Down

0 comments on commit 27326bb

Please sign in to comment.