]> jfr.im git - irc/rizon/moo.git/commitdiff
Add DNSBL lookup result to output
authorDwarf <redacted>
Fri, 8 Feb 2019 12:54:17 +0000 (13:54 +0100)
committerDwarf <redacted>
Fri, 8 Feb 2019 12:54:17 +0000 (13:54 +0100)
commands/src/main/java/net/rizon/moo/plugin/commands/why/CommandWhy.java

index fbc2b85bf68059e9932faa62fc58f75623d1365f..d03a54369dc405c92a7e30526aebb627ae2c8b8d 100644 (file)
@@ -39,8 +39,11 @@ class DNSBLChecker extends Thread
 
                        try
                        {
-                               InetAddress.getAllByName(lookup_addr);
-                               source.reply(this.ip + " is listed in " + dnsbl);
+                               InetAddress[] res = InetAddress.getAllByName(lookup_addr);
+                               // We're only interested in the first result
+                               String type = res[0].getHostAddress();
+
+                               source.reply(this.ip + " is listed in " + dnsbl + " as type " + type);
                        }
                        catch (UnknownHostException ex)
                        {