From 44e6438d37fd6e2c8a1bfbf02b145003aef309d6 Mon Sep 17 00:00:00 2001 From: danielsagi Date: Sun, 25 Aug 2019 20:40:30 +0300 Subject: [PATCH] Changed name of Subnet scanning to - Interface Scanning (#169) * changed Subnet/internal scanning to interface * Change one more internal -> interface --- README.md | 6 +++--- kube-hunter.py | 8 ++++---- runtest.py | 2 +- src/modules/discovery/hosts.py | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 7483900..7b5e8b2 100644 --- a/README.md +++ b/README.md @@ -29,9 +29,9 @@ By default, kube-hunter will open an interactive session, in which you will be a To specify remote machines for hunting, select option 1 or use the `--remote` option. Example: `./kube-hunter.py --remote some.node.com` -2. **Internal scanning** -To specify internal scanning, you can use the `--internal` option. (this will scan all of the machine's network interfaces) Example: -`./kube-hunter.py --internal` +2. **interface scanning** +To specify interface scanning, you can use the `--interface` option. (this will scan all of the machine's network interfaces) Example: +`./kube-hunter.py --interface` 3. **Network scanning** To specify a specific CIDR to scan, use the `--cidr` option. Example: diff --git a/kube-hunter.py b/kube-hunter.py index d55f813..7bb7328 100755 --- a/kube-hunter.py +++ b/kube-hunter.py @@ -6,7 +6,7 @@ import threading parser = argparse.ArgumentParser(description='Kube-Hunter - hunts for security weaknesses in Kubernetes clusters') parser.add_argument('--list', action="store_true", help="displays all tests in kubehunter (add --active flag to see active tests)") -parser.add_argument('--internal', action="store_true", help="set hunting of all internal network interfaces") +parser.add_argument('--interface', action="store_true", help="set hunting of all network interfaces") parser.add_argument('--pod', action="store_true", help="set hunter as an insider pod") parser.add_argument('--quick', action="store_true", help="Prefer quick scan (subnet 24)") parser.add_argument('--cidr', type=str, help="set an ip range to scan, example: 192.168.0.0/16") @@ -63,7 +63,7 @@ import src def interactive_set_config(): """Sets config manually, returns True for success""" options = [("Remote scanning", "scans one or more specific IPs or DNS names"), - ("Subnet scanning","scans subnets on all local network interfaces"), + ("Interface scanning","scans subnets on all local network interfaces"), ("IP range scanning","scans a given IP range")] print("Choose one of the options below:") @@ -73,7 +73,7 @@ def interactive_set_config(): if choice == '1': config.remote = input("Remotes (separated by a ','): ").replace(' ', '').split(',') elif choice == '2': - config.internal = True + config.interface = True elif choice == '3': config.cidr = input("CIDR (example - 192.168.1.0/24): ").replace(' ', '') else: @@ -105,7 +105,7 @@ def main(): config.pod, config.cidr, config.remote, - config.internal + config.interface ] try: if config.list: diff --git a/runtest.py b/runtest.py index 0abae87..f5ad18a 100644 --- a/runtest.py +++ b/runtest.py @@ -3,7 +3,7 @@ import pytest parser = argparse.ArgumentParser(description='Kube-Hunter tests') parser.add_argument('--list', action="store_true", help="displays all tests in kubehunter (add --active flag to see active tests)") -parser.add_argument('--internal', action="store_true", help="set hunting of all internal network interfaces") +parser.add_argument('--interface', action="store_true", help="set hunting of all interface network interfaces") parser.add_argument('--pod', action="store_true", help="set hunter as an insider pod") parser.add_argument('--quick', action="store_true", help="Prefer quick scan (subnet 24)") parser.add_argument('--cidr', type=str, help="set an ip range to scan, example: 192.168.0.0/16") diff --git a/src/modules/discovery/hosts.py b/src/modules/discovery/hosts.py index f44a08e..d88ba6c 100644 --- a/src/modules/discovery/hosts.py +++ b/src/modules/discovery/hosts.py @@ -161,7 +161,7 @@ class HostDiscovery(Discovery): cloud = HostDiscoveryHelpers.get_cloud(ip) for ip in HostDiscoveryHelpers.generate_subnet(ip, sn=sn): self.publish_event(NewHostEvent(host=ip, cloud=cloud)) - elif config.internal: + elif config.interface: self.scan_interfaces() elif len(config.remote) > 0: for host in config.remote: