INNER CODE UNIT · Python

main

vchinnipilli/kubestriker · kubestriker/__main__.py:17

def main():
    """
    This function executes all services on host
    :return:
    """
    process = True
    while process:
        menu.add_choices(["url or ip", "configfile", "iprange or cidr"])
        option = menu.select("Choose one of the below options:")
        if option == 'url or ip':
            input_host = input("Enter the target K8s Endpoint : ")
            host, port = ValidateInput().input_to_host(input_host)
            if not host:
                cowsay("Target is neither reachable nor valid")
                return
            file_name = str(host) + ".txt"
            file_obj = open(file_name, 'w')
            kube_services_process(option, file_obj, host, port)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…