From 898b63fcca002d123fa4a79b033160bb6084b954 Mon Sep 17 00:00:00 2001 From: Jean Lejeune Date: Tue, 29 Aug 2017 14:27:13 +0200 Subject: [PATCH 01/16] Sketch up DNS implementation --- legos/nettools.py | 5 ++-- legos/tools/Dns.py | 60 ++++++++++++++++++++++++++++++++++++++++++++++ requirements.txt | 1 + setup.py | 1 + 4 files changed, 65 insertions(+), 2 deletions(-) create mode 100644 legos/tools/Dns.py diff --git a/legos/nettools.py b/legos/nettools.py index bb16142..3fe8850 100644 --- a/legos/nettools.py +++ b/legos/nettools.py @@ -31,7 +31,7 @@ def listening_for(message): """ if Utilities.isNotEmpty(message['text']): - cmds = ['!whois', '!geoloc', '!ping', '!resolver', '!qualys'] + cmds = ['!whois', '!geoloc', '!ping', '!nslookup', '!dns'] return message['text'].split()[0] in cmds def handle(self, message): @@ -107,7 +107,8 @@ def get_help(): str: Helper """ - help_text = '[!whois, !geoloc, !ping, !resolver, !qualys]'\ + help_text = '[!whois, !geoloc, !ping, !nslookup'\ + ', !dns]'\ ' for further information' return help_text diff --git a/legos/tools/Dns.py b/legos/tools/Dns.py new file mode 100644 index 0000000..43ef758 --- /dev/null +++ b/legos/tools/Dns.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python + +import dns.resolver + +from Legobot.Utilities import Utilities as utils +from legos.tools.Tool import ToolScheme + +__author__ = "Nitrax " +__copyright__ = "Copyright 2017, Legobot" + + +class Dns(ToolScheme): + """This class retrieves the DNS record behind a given domain name. + """ + + def __init__(self, args): + if utils.isNotEmpty(args): + super().__init__(args) + + self.fncs = { + 'getMX': self._getMX, + } + + def run(self): + if utils.isNotEmpty(self.target): + results = [] + + if len(self.cmds) > 0: + for cmd in self.cmds: + try: + results.append(self.fncs[cmd]()) + except KeyError: + results.append('Command unknown: ' + cmd) + else: + results.append(self._getA()) + + return '\n'.join(results) + else: + return self.getHelp() + + def _getMX(self): + """Get MX records + + Args: + self: self + + Returns: + str: MX records + """ + try: + data = dns.resolver.query(self.target, 'MX') + results = [] + for item in data: + results.append(str(item.exchange)) + return ' | '.join(results) + except: + return 'Domain name invalid' + + def getHelp(self): + return "!dns {--getMX} {target}" diff --git a/requirements.txt b/requirements.txt index c4cb3fc..9e74169 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,3 +4,4 @@ urllib3 bandit==1.3.0 pytest==3.0.5 flake8==3.2.1 +dnspython diff --git a/setup.py b/setup.py index 3c9e6b3..f5d7f5b 100644 --- a/setup.py +++ b/setup.py @@ -18,6 +18,7 @@ install_requires=['legobot>=1.1.4,<=2.0.0', 'python-whois', 'urllib3', + 'dnspython', 'bandit==1.3.0', 'flake8==3.2.1', 'pytest==3.0.5' From 17ee1742988b58af48ec6b3c4f1fa53bbf557b5b Mon Sep 17 00:00:00 2001 From: Jean Lejeune Date: Tue, 29 Aug 2017 14:28:16 +0200 Subject: [PATCH 02/16] Fixing README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2c591ae..fda0599 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ The nettools Lego could be triggered by various prefix. - [x] Whois - [x] Resolver -- [ ] DNS +- [x] DNS - [ ] Trace - [x] Ping - [x] QUALYS lab From a4809bbf020adc622fd56dad4738096ef6f56210 Mon Sep 17 00:00:00 2001 From: zSec <31191533+z-Sec@users.noreply.github.com> Date: Tue, 29 Aug 2017 19:12:39 +0200 Subject: [PATCH 03/16] Adding DNS lookup for various records Implemented DNS lookup for A, AAAA, CNAME, MX, TXT records. --- legos/tools/Dns.py | 195 +++++++++++++++++++++++++++++++-------------- 1 file changed, 135 insertions(+), 60 deletions(-) diff --git a/legos/tools/Dns.py b/legos/tools/Dns.py index 43ef758..b1ee7f3 100644 --- a/legos/tools/Dns.py +++ b/legos/tools/Dns.py @@ -1,60 +1,135 @@ -#!/usr/bin/env python - -import dns.resolver - -from Legobot.Utilities import Utilities as utils -from legos.tools.Tool import ToolScheme - -__author__ = "Nitrax " -__copyright__ = "Copyright 2017, Legobot" - - -class Dns(ToolScheme): - """This class retrieves the DNS record behind a given domain name. - """ - - def __init__(self, args): - if utils.isNotEmpty(args): - super().__init__(args) - - self.fncs = { - 'getMX': self._getMX, - } - - def run(self): - if utils.isNotEmpty(self.target): - results = [] - - if len(self.cmds) > 0: - for cmd in self.cmds: - try: - results.append(self.fncs[cmd]()) - except KeyError: - results.append('Command unknown: ' + cmd) - else: - results.append(self._getA()) - - return '\n'.join(results) - else: - return self.getHelp() - - def _getMX(self): - """Get MX records - - Args: - self: self - - Returns: - str: MX records - """ - try: - data = dns.resolver.query(self.target, 'MX') - results = [] - for item in data: - results.append(str(item.exchange)) - return ' | '.join(results) - except: - return 'Domain name invalid' - - def getHelp(self): - return "!dns {--getMX} {target}" +import dns.resolver + +from Legobot.Utilities import Utilities as utils +from legos.tools.Tool import ToolScheme + +__author__ = "zSec " +__copyright__ = "Copyright 2017, Legobot" + + +class Dns(ToolScheme): + """The DNS class allows a DNS lookup for various records. + """ + + def __init__(self, args): + if utils.isNotEmpty(args): + super().__init__(args) + + self.fncs = { + 'getA': self._getA, + 'getAAAA': self._getAAAA, + 'getCNAME': self._getCNAME, + 'getMX': self._getMX, + 'getTXT': self._getTXT + } + + def run(self): + if utils.isNotEmpty(self.target): + results = [] + + if len(self.cmds) > 0: + for cmd in self.cmds: + try: + results.append(self.fncs[cmd]()) + except KeyError: + results.append('Command unknown: ' + cmd) + else: + results.append(self._getA()) + results.append(self._getAAAA()) + results.append(self._getCNAME()) + results.append(self._getMX()) + results.append(self._getTXT()) + + return '\n'.join(results) + else: + return self.getHelp() + + def _getA(self): + """Get the A record + Args: + self: self + + Returns: + str: A Record + """ + try: + data = dns.resolver.query(self.target, 'A') + results = [] + for item in data: + results.append(str(item.exchange)) + return ' | '.join(results) + except: + return 'Domain name invalid' + + def _getAAAA(self): + """Get the AAAA record + Args: + self: self + + Returns: + str: AAAA record + """ + try: + data = dns.resolver.query(self.target, 'AAAA') + results = [] + for item in data: + results.append(str(item.exchange)) + return ' | '.join(results) + except: + return 'Domain name invalid' + + def _getCNAME(self): + """Get the CNAME record + Args: + self: self + + Returns: + str: CNAME record + """ + try: + data = dns.resolver.query(self.target, 'CNAME') + results = [] + for item in data: + results.append(str(item.exchange)) + return ' | '.join(results) + except: + return 'Domain name invalid' + + def _getMX(self): + """Get the MX record + Args: + self: self + + Returns: + str: MX record + """ + try: + data = dns.resolver.query(self.target, 'MX') + results = [] + for item in data: + results.append(str(item.exchange)) + return ' | '.join(results) + except: + return 'Domain name invalid' + + def _getTXT(self): + """Get the TXT record + Args: + self: self + + Returns: + str: TXT record + """ + try: + data = dns.resolver.query(self.target, 'MX') + results = [] + for item in data: + results.append(str(item.exchange)) + return ' | '.join(results) + except: + return 'Domain name invalid' + + def getHelp(self): + return "!dns {--getA | --getAAAA |" \ + "--getCNAME | --getMX |" \ + "--getTXT} {target}" From fe22600520c3e85806008f0064b2844893fc83c6 Mon Sep 17 00:00:00 2001 From: zSec <31191533+z-Sec@users.noreply.github.com> Date: Tue, 29 Aug 2017 19:14:26 +0200 Subject: [PATCH 04/16] Update Dns.py --- legos/tools/Dns.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/legos/tools/Dns.py b/legos/tools/Dns.py index b1ee7f3..1369ffd 100644 --- a/legos/tools/Dns.py +++ b/legos/tools/Dns.py @@ -130,6 +130,6 @@ def _getTXT(self): return 'Domain name invalid' def getHelp(self): - return "!dns {--getA | --getAAAA |" \ - "--getCNAME | --getMX |" \ + return "!dns {--getA | --getAAAA | " \ + "--getCNAME | --getMX | " \ "--getTXT} {target}" From 0a9516fc70318d035940a1377159d271c74bde2c Mon Sep 17 00:00:00 2001 From: zSec <31191533+z-Sec@users.noreply.github.com> Date: Wed, 30 Aug 2017 11:16:59 +0200 Subject: [PATCH 05/16] Fixing DNS Tool --- legos/tools/Dns.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/legos/tools/Dns.py b/legos/tools/Dns.py index 1369ffd..3ebbdd2 100644 --- a/legos/tools/Dns.py +++ b/legos/tools/Dns.py @@ -56,7 +56,7 @@ def _getA(self): data = dns.resolver.query(self.target, 'A') results = [] for item in data: - results.append(str(item.exchange)) + results.append(str(item.address)) return ' | '.join(results) except: return 'Domain name invalid' @@ -73,7 +73,7 @@ def _getAAAA(self): data = dns.resolver.query(self.target, 'AAAA') results = [] for item in data: - results.append(str(item.exchange)) + results.append(str(item.address)) return ' | '.join(results) except: return 'Domain name invalid' @@ -90,7 +90,7 @@ def _getCNAME(self): data = dns.resolver.query(self.target, 'CNAME') results = [] for item in data: - results.append(str(item.exchange)) + results.append(str(item.target)) return ' | '.join(results) except: return 'Domain name invalid' @@ -121,10 +121,10 @@ def _getTXT(self): str: TXT record """ try: - data = dns.resolver.query(self.target, 'MX') + data = dns.resolver.query(self.target, 'TXT') results = [] for item in data: - results.append(str(item.exchange)) + results.append(str(item.strings)) return ' | '.join(results) except: return 'Domain name invalid' From 6d75c14f8586c7916c2ed2f70c2ec82715ae249a Mon Sep 17 00:00:00 2001 From: zSec <31191533+z-Sec@users.noreply.github.com> Date: Wed, 30 Aug 2017 20:11:23 +0200 Subject: [PATCH 06/16] Fixing NS Record --- legos/tools/Dns.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/legos/tools/Dns.py b/legos/tools/Dns.py index 3ebbdd2..2e788f2 100644 --- a/legos/tools/Dns.py +++ b/legos/tools/Dns.py @@ -18,7 +18,7 @@ def __init__(self, args): self.fncs = { 'getA': self._getA, 'getAAAA': self._getAAAA, - 'getCNAME': self._getCNAME, + 'getNS': self._getNS, 'getMX': self._getMX, 'getTXT': self._getTXT } @@ -36,7 +36,7 @@ def run(self): else: results.append(self._getA()) results.append(self._getAAAA()) - results.append(self._getCNAME()) + results.append(self._getNS()) results.append(self._getMX()) results.append(self._getTXT()) @@ -78,16 +78,16 @@ def _getAAAA(self): except: return 'Domain name invalid' - def _getCNAME(self): - """Get the CNAME record + def _getNS(self): + """Get the NS record Args: self: self Returns: - str: CNAME record + str: NS record """ try: - data = dns.resolver.query(self.target, 'CNAME') + data = dns.resolver.query(self.target, 'NS') results = [] for item in data: results.append(str(item.target)) @@ -131,5 +131,5 @@ def _getTXT(self): def getHelp(self): return "!dns {--getA | --getAAAA | " \ - "--getCNAME | --getMX | " \ + "--getNS | --getMX | " \ "--getTXT} {target}" From d502531ac9752caae22b0142593787f687cb30fe Mon Sep 17 00:00:00 2001 From: zSec <31191533+z-Sec@users.noreply.github.com> Date: Wed, 30 Aug 2017 20:25:51 +0200 Subject: [PATCH 07/16] Adjusting the parameters --- legos/tools/Dns.py | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/legos/tools/Dns.py b/legos/tools/Dns.py index 2e788f2..305ebac 100644 --- a/legos/tools/Dns.py +++ b/legos/tools/Dns.py @@ -16,11 +16,11 @@ def __init__(self, args): super().__init__(args) self.fncs = { - 'getA': self._getA, - 'getAAAA': self._getAAAA, - 'getNS': self._getNS, - 'getMX': self._getMX, - 'getTXT': self._getTXT + 'A': self._A, + 'AAAA': self._AAAA, + 'NS': self._NS, + 'MX': self._MX, + 'TXT': self._TXT } def run(self): @@ -34,17 +34,17 @@ def run(self): except KeyError: results.append('Command unknown: ' + cmd) else: - results.append(self._getA()) - results.append(self._getAAAA()) - results.append(self._getNS()) - results.append(self._getMX()) - results.append(self._getTXT()) + results.append(self._A()) + results.append(self._AAAA()) + results.append(self._NS()) + results.append(self._MX()) + results.append(self._TXT()) return '\n'.join(results) else: return self.getHelp() - def _getA(self): + def _A(self): """Get the A record Args: self: self @@ -61,7 +61,7 @@ def _getA(self): except: return 'Domain name invalid' - def _getAAAA(self): + def _AAAA(self): """Get the AAAA record Args: self: self @@ -78,7 +78,7 @@ def _getAAAA(self): except: return 'Domain name invalid' - def _getNS(self): + def _NS(self): """Get the NS record Args: self: self @@ -95,7 +95,7 @@ def _getNS(self): except: return 'Domain name invalid' - def _getMX(self): + def _MX(self): """Get the MX record Args: self: self @@ -112,7 +112,7 @@ def _getMX(self): except: return 'Domain name invalid' - def _getTXT(self): + def _TXT(self): """Get the TXT record Args: self: self @@ -130,6 +130,6 @@ def _getTXT(self): return 'Domain name invalid' def getHelp(self): - return "!dns {--getA | --getAAAA | " \ - "--getNS | --getMX | " \ - "--getTXT} {target}" + return "!dns {--A | --AAAA | " \ + "--NS | --MX | " \ + "--TXT} {target}" From be28d27736ed795da4ceb128a86692964a2f1274 Mon Sep 17 00:00:00 2001 From: zSec <31191533+z-Sec@users.noreply.github.com> Date: Fri, 1 Sep 2017 14:58:46 +0200 Subject: [PATCH 08/16] Fixing intendations --- legos/tools/Dns.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/legos/tools/Dns.py b/legos/tools/Dns.py index 305ebac..e30d714 100644 --- a/legos/tools/Dns.py +++ b/legos/tools/Dns.py @@ -48,11 +48,11 @@ def _A(self): """Get the A record Args: self: self - + Returns: str: A Record """ - try: + try: data = dns.resolver.query(self.target, 'A') results = [] for item in data: @@ -65,11 +65,11 @@ def _AAAA(self): """Get the AAAA record Args: self: self - + Returns: str: AAAA record """ - try: + try: data = dns.resolver.query(self.target, 'AAAA') results = [] for item in data: @@ -82,11 +82,11 @@ def _NS(self): """Get the NS record Args: self: self - + Returns: str: NS record """ - try: + try: data = dns.resolver.query(self.target, 'NS') results = [] for item in data: @@ -99,11 +99,11 @@ def _MX(self): """Get the MX record Args: self: self - + Returns: str: MX record """ - try: + try: data = dns.resolver.query(self.target, 'MX') results = [] for item in data: @@ -116,11 +116,11 @@ def _TXT(self): """Get the TXT record Args: self: self - + Returns: str: TXT record """ - try: + try: data = dns.resolver.query(self.target, 'TXT') results = [] for item in data: From ce70658410b9346d6e7a582840de3ca0ccb32c00 Mon Sep 17 00:00:00 2001 From: zSec <31191533+z-Sec@users.noreply.github.com> Date: Fri, 1 Sep 2017 15:07:26 +0200 Subject: [PATCH 09/16] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index fda0599..c14bf8a 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,9 @@ The nettools Lego could be triggered by various prefix. ` !qualys {target}` -> Assessment could take time ! Be patient. +#### Dns + +` !dns {--A | --AAAA | --NS | --MX | --TXT } {target}` ## Contributing From 7177127522524d12888e430c60dcd6e2f76c4d67 Mon Sep 17 00:00:00 2001 From: zSec <31191533+z-Sec@users.noreply.github.com> Date: Fri, 1 Sep 2017 15:39:07 +0200 Subject: [PATCH 10/16] Fixing style --- legos/tools/Dns.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/legos/tools/Dns.py b/legos/tools/Dns.py index e30d714..956bac8 100644 --- a/legos/tools/Dns.py +++ b/legos/tools/Dns.py @@ -46,6 +46,7 @@ def run(self): def _A(self): """Get the A record + Args: self: self @@ -63,6 +64,7 @@ def _A(self): def _AAAA(self): """Get the AAAA record + Args: self: self @@ -80,6 +82,7 @@ def _AAAA(self): def _NS(self): """Get the NS record + Args: self: self @@ -97,6 +100,7 @@ def _NS(self): def _MX(self): """Get the MX record + Args: self: self @@ -114,6 +118,7 @@ def _MX(self): def _TXT(self): """Get the TXT record + Args: self: self From f70255a8dae2c832c1ce8dd9163b420a1c8752f3 Mon Sep 17 00:00:00 2001 From: zSec <31191533+z-Sec@users.noreply.github.com> Date: Fri, 1 Sep 2017 15:53:58 +0200 Subject: [PATCH 11/16] Fixing style --- legos/tools/Dns.py | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/legos/tools/Dns.py b/legos/tools/Dns.py index 956bac8..5b518da 100644 --- a/legos/tools/Dns.py +++ b/legos/tools/Dns.py @@ -47,9 +47,6 @@ def run(self): def _A(self): """Get the A record - Args: - self: self - Returns: str: A Record """ @@ -65,9 +62,6 @@ def _A(self): def _AAAA(self): """Get the AAAA record - Args: - self: self - Returns: str: AAAA record """ @@ -83,9 +77,6 @@ def _AAAA(self): def _NS(self): """Get the NS record - Args: - self: self - Returns: str: NS record """ @@ -101,9 +92,6 @@ def _NS(self): def _MX(self): """Get the MX record - Args: - self: self - Returns: str: MX record """ @@ -119,9 +107,6 @@ def _MX(self): def _TXT(self): """Get the TXT record - Args: - self: self - Returns: str: TXT record """ From dee1025f7f8c7adfaf84fad48ce0060251a69ed4 Mon Sep 17 00:00:00 2001 From: Bren Briggs Date: Sat, 2 Sep 2017 20:55:14 -0400 Subject: [PATCH 12/16] Removing testing libraries from required install in setup.py --- setup.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/setup.py b/setup.py index f5d7f5b..3a91f55 100644 --- a/setup.py +++ b/setup.py @@ -18,10 +18,7 @@ install_requires=['legobot>=1.1.4,<=2.0.0', 'python-whois', 'urllib3', - 'dnspython', - 'bandit==1.3.0', - 'flake8==3.2.1', - 'pytest==3.0.5' + 'dnspython' ], classifiers=[ 'License :: OSI Approved :: MIT License', From 00d1e81b299618d78191f684ac03ccd191abeea8 Mon Sep 17 00:00:00 2001 From: Jean Lejeune Date: Sun, 3 Sep 2017 11:57:33 +0200 Subject: [PATCH 13/16] Change resolver to nslookup --- README.md | 6 +++--- legos/tools/{Resolver.py => Nslookup.py} | 24 +++++++++--------------- 2 files changed, 12 insertions(+), 18 deletions(-) rename legos/tools/{Resolver.py => Nslookup.py} (70%) diff --git a/README.md b/README.md index c14bf8a..6adceb0 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ baseplate_proxy.add_child(LegoNettools) The nettools Lego could be triggered by various prefix. - [x] Whois -- [x] Resolver +- [x] Nslookup - [x] DNS - [ ] Trace - [x] Ping @@ -62,9 +62,9 @@ The nettools Lego could be triggered by various prefix. ` !ping {target}` -#### Resolver +#### Nslookup -` !resolver {--host | --nslookup} {target}` +` !nslookup {target}` #### Qualys diff --git a/legos/tools/Resolver.py b/legos/tools/Nslookup.py similarity index 70% rename from legos/tools/Resolver.py rename to legos/tools/Nslookup.py index e1867b5..12e3f40 100644 --- a/legos/tools/Resolver.py +++ b/legos/tools/Nslookup.py @@ -1,5 +1,6 @@ #!/usr/bin/env python +import re import socket from Legobot.Utilities import Utilities as utils @@ -9,7 +10,7 @@ __copyright__ = "Copyright 2017, Legobot" -class Resolver(ToolScheme): +class Nslookup(ToolScheme): """This class allows resolving the IP address from a domain name as well as the reverse process. """ @@ -18,23 +19,16 @@ def __init__(self, args): if utils.isNotEmpty(args): super().__init__(args) - self.fncs = { - 'host': self._host, - 'nslookup': self._nslookup - } - def run(self): if utils.isNotEmpty(self.target): - if len(self.cmds) > 0: - for cmd in self.cmds: - try: - return self.fncs[cmd]() - except KeyError: - return 'Command unknown: ' + cmd + if re.match(r"^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$", self.target): + return self._getIP() + else: + return self._getDomainName() else: return self.getHelp() - def _host(self): + def _getDomainName(self): """Retrieve the IP address corresponding to a domain name. Args: @@ -48,7 +42,7 @@ def _host(self): except: return 'Host cannot be resolved' - def _nslookup(self): + def _getIP(self): """Retrieve the domain name corresponding to an IP address. Args: @@ -63,4 +57,4 @@ def _nslookup(self): return 'IP address cannot be resolved' def getHelp(self): - return " !resolver {--host | --nslookup} {target}" + return " !nslookup {target}" From 1fbb6ea59287aaa87f765bd2910b2f84a61c94d3 Mon Sep 17 00:00:00 2001 From: Jean Lejeune Date: Sun, 3 Sep 2017 12:02:02 +0200 Subject: [PATCH 14/16] Adding qualys --- legos/nettools.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/legos/nettools.py b/legos/nettools.py index 3fe8850..4e93a7e 100644 --- a/legos/nettools.py +++ b/legos/nettools.py @@ -31,7 +31,7 @@ def listening_for(message): """ if Utilities.isNotEmpty(message['text']): - cmds = ['!whois', '!geoloc', '!ping', '!nslookup', '!dns'] + cmds = ['!whois', '!geoloc', '!ping', '!nslookup', '!dns', '!qualys'] return message['text'].split()[0] in cmds def handle(self, message): @@ -108,7 +108,7 @@ def get_help(): """ help_text = '[!whois, !geoloc, !ping, !nslookup'\ - ', !dns]'\ + ', !dns, !qualys]'\ ' for further information' return help_text From b5793732d024fd589db0c2c4ed53db1654722147 Mon Sep 17 00:00:00 2001 From: Jean Lejeune Date: Sun, 3 Sep 2017 12:40:29 +0200 Subject: [PATCH 15/16] Deleting Trace --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 6adceb0..8dbb704 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,6 @@ The nettools Lego could be triggered by various prefix. - [x] Whois - [x] Nslookup - [x] DNS -- [ ] Trace - [x] Ping - [x] QUALYS lab - [x] IP geo From a8ebd3738bcd26e620ec8df1a8959386f2b0ada1 Mon Sep 17 00:00:00 2001 From: Jean Lejeune Date: Sun, 3 Sep 2017 12:42:24 +0200 Subject: [PATCH 16/16] Flake8 compatibility --- legos/nettools.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/legos/nettools.py b/legos/nettools.py index 4e93a7e..1349326 100644 --- a/legos/nettools.py +++ b/legos/nettools.py @@ -31,7 +31,8 @@ def listening_for(message): """ if Utilities.isNotEmpty(message['text']): - cmds = ['!whois', '!geoloc', '!ping', '!nslookup', '!dns', '!qualys'] + cmds = ['!whois', '!geoloc', '!ping', '!dns', + '!qualys', '!nslookup'] return message['text'].split()[0] in cmds def handle(self, message):