{"id":20199312,"url":"https://github.com/mwiater/ghost","last_synced_at":"2025-09-21T21:32:31.751Z","repository":{"id":261337855,"uuid":"877620721","full_name":"mwiater/ghost","owner":"mwiater","description":"Ghost: A lightweight, cross-platform tool for network inspection and host scanning, written in Go. Quickly perform ARP scans and inspect network details on both Unix and Windows systems.","archived":false,"fork":false,"pushed_at":"2024-11-26T17:12:27.000Z","size":38984,"stargazers_count":43,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-26T18:24:29.831Z","etag":null,"topics":["cobra-cli","cross-platform","go","golang","goreleaser","unix","windows"],"latest_commit_sha":null,"homepage":"https://levelup.gitconnected.com/building-ghost-exploring-command-loading-patterns-and-goreleaser-in-a-personal-go-project-9706847445f3","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mwiater.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-24T00:24:07.000Z","updated_at":"2024-11-21T15:17:24.000Z","dependencies_parsed_at":"2024-11-26T18:32:51.041Z","dependency_job_id":null,"html_url":"https://github.com/mwiater/ghost","commit_stats":null,"previous_names":["mwiater/ghost"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mwiater%2Fghost","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mwiater%2Fghost/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mwiater%2Fghost/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mwiater%2Fghost/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mwiater","download_url":"https://codeload.github.com/mwiater/ghost/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233802418,"owners_count":18732534,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cobra-cli","cross-platform","go","golang","goreleaser","unix","windows"],"created_at":"2024-11-14T04:37:02.351Z","updated_at":"2025-09-21T21:32:31.737Z","avatar_url":"https://github.com/mwiater.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ghost\n\n![Ghost Gopher Mascot](ghostpher-sm.png)\n\n_Golang + Host Inspection = Ghost!_\n\nThis project provides a suite of tools for system and network management, all packaged as a versatile CLI application built with Go and Cobra. It offers features like network scanning, system info retrieval, and more, all of which are compiled and released using GoReleaser.\n\n**Note:** This tool is not intended as a production-grade application but rather as an illustrative example of a cross-platform utility that I find useful during development. Working across various environments, it’s practical to have a consistent set of tools for inspecting system and network states, and this project reflects that. It serves as a demonstration of what can be achieved quickly with Go for Go engineering, providing insight into foundational techniques and implementations that may benefit others building similar utilities.\n\n**Maintenence:** I will try to keep the `main` branch in a working state, but that doen't mean that all commands will be in working condition in all platforms. Sometimes, I just need to quickly write a command for a particular platform and circle back to making it cross-platform.\n\n**Reference:** Companion article on [Level Up Coding](https://levelup.gitconnected.com/building-ghost-exploring-command-loading-patterns-and-goreleaser-in-a-personal-go-project-9706847445f3)\n\n---\n\n## Table of Contents\n\n1. [Cloning and Setting Up the Project](#cloning-and-setting-up-the-project)\n2. [Building the Project with GoReleaser](#building-the-project-with-goreleaser)\n3. [Cobra Commands](#cobra-commands)\n   - [Command List](#command-list)\n   - [Command Details](#command-details)\n4. [Running in a Docker container](#running-in-docker)\n\n---\n\n## Cloning and Setting Up the Project\n\nTo get started, follow these steps to clone the repository and install dependencies:\n\n### Step 1: Clone the Repository\n\nClone the repository using `git`:\n\n```bash\ngit clone git@github.com:mwiater/ghost.git\ncd ghost\n```\n\n### Step 2: Install Dependencies\n\nThis project relies on several Go modules specified in `go.mod`. Install them with the following command:\n\n```bash\ngo mod tidy\n```\n\nThis command will fetch all required dependencies, ensuring a smooth build process.\n\nOptional: Install the  [Github CLI](https://github.com/cli/cli#github-cli)\n\n---\n\n## Building the Project with GoReleaser\n\nWe use **GoReleaser** to manage builds and releases. Follow these instructions to build a snapshot release, which is ideal for local testing.\n\n### Step 1: Install GoReleaser\n\nIf you haven’t already installed GoReleaser, you can do so by following the [GoReleaser installation instructions](https://goreleaser.com/install/).\n\n### Step 2: Build a Snapshot Release\n\nTo build `ghost` locally, use **GoReleaser** with snapshot mode. This setup builds the project without creating a formal release, making it ideal for local testing. \n\n### Local Build Command\n\nRun the following command to build the application locally:\n\n```bash\ngoreleaser release --snapshot --clean --skip archive\n```\n\nThis command:\n- Builds the application for all specified platforms in the `.goreleaser.yml` file.\n- Cleans the `dist` directory before each build.\n- Skips creating an archive or release, building only a snapshot.\n\n```\n  • skipping announce, archive, publish and validate...\n  • cleaning distribution directory\n  • loading environment variables\n  • getting and validating git state\n    • git state                                      commit=d99dca23c32c4b987e44382198b8771ae5a7aa02 branch=development current_tag=v20241111171704 previous_tag=v20241107101326 dirty=true\n    • pipe skipped                                   reason=disabled during snapshot mode\n  • parsing tag\n  • setting defaults\n  • snapshotting\n    • building snapshot...                           version=20241111171704-SNAPSHOT-d99dca2\n  • running before hooks\n    • running                                        hook=go mod tidy\n  • ensuring distribution directory\n  • setting up metadata\n  • writing release metadata\n  • loading go mod information\n  • build prerequisites\n  • building binaries\n    • building                                       binary=dist\\linuxarm64\\ghost\n    • building                                       binary=dist\\linux64\\ghost\n    • building                                       binary=dist\\win64\\ghost.exe\n  • upx\n    • packed                                         before=7.434MB after=2.227MB ratio=29% binary=dist/win64/ghost.exe\n    • packed                                         before=7.078MB after=1.926MB ratio=27% binary=dist/linuxarm64/ghost\n    • packed                                         before=7.234MB after=2.21MB ratio=30% binary=dist/linux64/ghost\n    • took: 21s\n  • calculating checksums\n  • writing artifacts metadata\n  • release succeeded after 38s\n  • thanks for using goreleaser!\n```\n\nFor this example application and configuration, this command builds the following files:\n\n```\n├── dist\n│   ├── artifacts.json\n│   ├── config.yaml\n│   ├── linux64\n│   │   └── ghost\n│   ├── linuxarm64\n│   │   └── ghost\n│   ├── metadata.json\n│   └── win64\n│       └── ghost.exe\n```\n\nFor more detailed setup instructions, see the [GORELEASER.md](GORELEASER.md) file. This document includes installation steps, configuration examples, and validation commands to set up GoReleaser for `ghost`. \n\n---\n\n## Cobra Commands\n\nThis project includes several commands that allow users to interact with system and network utilities. Below is a detailed list of each command, including usage examples and flag definitions.\n\n### Command List\n\n- `arpscanner`: Scans the network for active devices.\n- `cpuinfo`: Retrieves detailed CPU information.\n- `diskusage`: Shows disk usage statistics.\n- `envvars`: Lists all environment variables.\n- `find`: Searches for files or directories based on the specified parameters.\n- `fsinfo`: Displays information about the file system.\n- `getservices`: Lists active services on the system.\n- `gpuinfo`: Provides detailed GPU information.\n- `hostinfo`: Provides general information about the host.\n- `largestdirs`: Finds the largest directories.\n- `largestfiles`: Finds the largest files.\n- `localip`: Shows the local IP address.\n- `meminfo`: Retrieves memory usage information.\n- `netstat`: Shows network status and connections.\n- `networkinterfaces`: Lists all network interfaces.\n- `portscanner`: Scans for open ports on the network.\n- `routeinfo`: Displays the system's routing table.\n- `subnetcalc`: Calculates subnet information.\n- `treeprint`: Prints directory structure in a tree format.\n- `traceroute`: Performs a traceroute to a specified IP address.\n\n---\n\n### Command Details\n\nHere is a detailed breakdown of each command, including examples and flag definitions.\n\n---\n\n####  `arpscanner`\n\n**Description:** Scans the network for active devices and shows their IP addresses.\n\n```bash\n./ghost arpscanner --interface eth0\n```\n\n**Flags:**\n- `--interface`: Specifies the network interface to scan (e.g., `eth0`).\n\nExample Output:\n\n```\n Windows ARP Table\n OUTPUT\n\n Interface: 192.168.213.1 --- 0x5\n   Internet Address      Physical Address      Type       \n   192.168.213.254       00-50-56-f1-e2-70     dynamic    \n   192.168.213.255       ff-ff-ff-ff-ff-ff     static     \n   224.0.0.9             01-00-5e-00-00-09     static     \n   224.0.0.22            01-00-5e-00-00-16     static     \n   224.0.0.251           01-00-5e-00-00-fb     static     \n   224.0.0.252           01-00-5e-00-00-fc     static     \n   239.255.255.250       01-00-5e-7f-ff-fa     static     \n   255.255.255.255       ff-ff-ff-ff-ff-ff     static     \n\n Interface: 169.254.67.233 --- 0x6\n   Internet Address      Physical Address      Type       \n   169.254.255.255       ff-ff-ff-ff-ff-ff     static     \n   224.0.0.9             01-00-5e-00-00-09     static     \n   224.0.0.22            01-00-5e-00-00-16     static     \n   224.0.0.251           01-00-5e-00-00-fb     static     \n   224.0.0.252           01-00-5e-00-00-fc     static     \n   239.255.255.250       01-00-5e-7f-ff-fa     static     \n   255.255.255.255       ff-ff-ff-ff-ff-ff     static     \n\n Interface: 192.168.142.244 --- 0xd\n   Internet Address      Physical Address      Type       \n   192.168.142.113       ca-52-50-74-df-ee     dynamic    \n   192.168.142.255       ff-ff-ff-ff-ff-ff     static     \n   224.0.0.9             01-00-5e-00-00-09     static     \n   224.0.0.22            01-00-5e-00-00-16     static     \n   224.0.0.251           01-00-5e-00-00-fb     static     \n   224.0.0.252           01-00-5e-00-00-fc     static     \n   239.255.255.250       01-00-5e-7f-ff-fa     static     \n   255.255.255.255       ff-ff-ff-ff-ff-ff     static     \n\n Interface: 192.168.116.1 --- 0xe\n   Internet Address      Physical Address      Type       \n   192.168.116.254       00-50-56-e4-8f-4c     dynamic    \n   192.168.116.255       ff-ff-ff-ff-ff-ff     static     \n   224.0.0.9             01-00-5e-00-00-09     static     \n   224.0.0.22            01-00-5e-00-00-16     static     \n   224.0.0.251           01-00-5e-00-00-fb     static     \n   224.0.0.252           01-00-5e-00-00-fc     static     \n   239.255.255.250       01-00-5e-7f-ff-fa     static     \n   255.255.255.255       ff-ff-ff-ff-ff-ff     static     \n\n Interface: 169.254.76.71 --- 0x1d\n   Internet Address      Physical Address      Type       \n   169.254.255.255       ff-ff-ff-ff-ff-ff     static     \n   224.0.0.9             01-00-5e-00-00-09     static     \n   224.0.0.22            01-00-5e-00-00-16     static     \n   224.0.0.251           01-00-5e-00-00-fb     static     \n   224.0.0.252           01-00-5e-00-00-fc     static     \n   239.255.255.250       01-00-5e-7f-ff-fa     static     \n   255.255.255.255       ff-ff-ff-ff-ff-ff     static  \n```\n\n---\n\n####  `cpuinfo`\n\n**Description:** Displays CPU information such as model, cores, and usage.\n\n```bash\n./ghost cpuinfo\n```\n\n**Flags:** None\n\nExample Output:\n\n```\n cpuInfoCmd\n CPU INFO   VALUE\n CPU 1\n ModelName  Intel(R) Core(TM) i7-4710HQ CPU @ 2.50GHz\n Cores      8\n Frequency  2.50 GHz\n```\n\n---\n\n####  `diskusage`\n\n**Description:** Shows disk usage statistics for the system.\n\n```bash\n./ghost diskusage --path / --limit 10\n```\n\n**Flags:**\n- `--path`: Specifies the path to check disk usage.\n- `--limit`: Limits the number of entries displayed.\n\nExample Output:\n\n```\n diskUsageCmd\n MOUNT POINT  TOTAL SPACE  USED SPACE  FREE SPACE  USED PERCENT \n C:           466.61 GB    353.14 GB   113.47 GB   75.68%       \n D:           26.84 GB     3.05 GB     23.80 GB    11.34%\n G:           466.61 GB    358.82 GB   107.79 GB   76.90%  \n```\n\n---\n\n####  `envvars`\n\n**Description:** Lists all environment variables.\n\n```bash\n./ghost envvars\n```\n\n**Flags:** None\n\nExample Output:\n\n```\nenvVarsCmd\nVARIABLE                             VALUE\nALLUSERSPROFILE                      C:\\ProgramData\nAPPDATA                              C:\\Users\\Matt\\AppData\\Roaming\nCOMMONPROGRAMFILES                   C:\\Program Files\\Common Files\nCOMSPEC                              C:\\WINDOWS\\system32\\cmd.exe\nCONFIG_SITE                          C:\\Program Files\\Git\\etc\\config.site    \nChocolateyInstall                    C:\\ProgramData\\chocolatey\n```\n\n---\n\n####  `find`\n\n**Description:** Searches for files or directories based on specified parameters.\n\n```bash\n./ghost find .go\n```\n\n**Flags:**\n- `--name`: Pattern to match file or directory names.\n- `--path`: Directory path to search in.\n\nExample Output:\n\n```\n findCmd\n MATCHING FILES\n C:\\Users\\Matt\\projects\\ghost\\cmd\\arpscanner.go        \n C:\\Users\\Matt\\projects\\ghost\\cmd\\cpuInfo.go\n C:\\Users\\Matt\\projects\\ghost\\cmd\\demo.go\n C:\\Users\\Matt\\projects\\ghost\\cmd\\diskUsage.go\n C:\\Users\\Matt\\projects\\ghost\\cmd\\envVars.go\n```\n\n---\n\n####  `fsinfo`\n\n**Description:** Provides information about the file system.\n\n```bash\n./ghost fsinfo\n```\n\n**Flags:** None\n\nExample Output:\n\n```\n fsInfoCmd                                                                   \n FILESYSTEM  TYPE  TOTAL SPACE  USED SPACE  AVAILABLE SPACE  USED PERCENT    \n C:                466.61 GB    353.14 GB   113.47 GB        75.68%          \n D:                26.84 GB     3.05 GB     23.80 GB         11.34%\n G:                466.61 GB    358.82 GB   107.79 GB        76.90%   \n```\n\n---\n\n#### `gpuinfo`\n\n**Description:** Retrieves detailed information about the GPU(s) installed on the system, including model, memory, driver version, and current usage statistics.\n\n```bash\n./ghost gpuinfo\n```\n\n**Flags: None**\n\n**Example Output:**\n\n*Standard Output:*\n\n```\n gpuinfoCmd\n MODEL                               MEMORY  DRIVER VERSION  UTILIZATION \n 4293918720 31.0.21912.14 Radeon RX  0 MB    Series          0 %\n```\n\n---\n\n####  `hostinfo`\n\n**Description:** Displays general information about the host, including OS and architecture.\n\n```bash\n./ghost hostinfo\n```\n\n**Flags:** None\n\nExample Output:\n\n```\n hostInfoCmd\n HOST INFO             VALUE\n Hostname              Laptop08\n Uptime                1129014\n BootTime              1729639261\n Procs                 281\n OS                    windows\n Platform              Microsoft Windows 11 Home\n PlatformFamily        Standalone Workstation\n PlatformVersion       10.0.19045 Build 19045\n KernelVersion         10.0.19045 Build 19045\n KernelArch            x86_64\n VirtualizationSystem\n VirtualizationRole\n HostID                1a8f4fa2-a7c7-a7c6-a9c9-7cbf6af1a994 \n```\n\n---\n\n####  `largestdirs`\n\n**Description:** Finds the largest directories within a specified path.\n\n```bash\n./ghost largestdirs --path /home --limit 5\n```\n\n**Flags:**\n- `--path`: Path to search for large directories.\n- `--limit`: Maximum number of entries to display.\n\nExample Output:\n\n```\n largestDirsCmd\n DIRECTORY PATH  SIZE (MB) \n .                   71.68 \n .git                49.90\n dist                21.66 \n cmd                  0.07\n utils                0.01 \n```\n\n---\n\n####  `largestfiles`\n\n**Description:** Finds the largest files within a specified path.\n\n```bash\n./ghost largestfiles --path /var/log --limit 5\n```\n\n**Flags:**\n- `--path`: Path to search for large files.\n- `--limit`: Maximum number of entries to display.\n\nExample Output:\n\n```\n largestFilesCmd\n FILE PATH                                                             SIZE (MB) \n .git\\objects\\pack\\pack-0eb34eb50c013b3d04285bf919e9d6ae897e937b.pack  40.40     \n dist\\win64\\ghost.exe                                                  7.43\n dist\\linux64\\ghost                                                    7.23      \n dist\\linuxarm64\\ghost                                                 7.00\n .git\\objects\\f8\\9e9afc27cde6241c1fd8612b8023f7e63cf998                3.29      \n .git\\objects\\1d\\f0ca22765a29aa0d9cda84b90c31755fef4362                3.22\n .git\\objects\\bc\\8a2f62a3a992711d907205f87a2f1a466e0c91                2.95      \n go.sum                                                                0.01\n .git\\objects\\pack\\pack-0eb34eb50c013b3d04285bf919e9d6ae897e937b.idx   0.01      \n cmd\\portscanner.go                                                    0.01\n cmd\\largestDirs.go                                                    0.01      \n README.md                                                             0.01\n utils\\packageList.go                                                  0.01      \n GORELEASER.md                                                         0.00\n .git\\hooks\\pre-rebase.sample                                          0.00      \n .git\\hooks\\fsmonitor-watchman.sample                                  0.00\n dist\\config.yaml                                                      0.00      \n cmd\\networkInterfaces.go                                              0.00\n .git\\index                                                            0.00      \n SCRIPTS.md                                                            0.00\n```\n\n---\n\n####  `localip`\n\n**Description:** Shows the local IP address of the system.\n\n```bash\n./ghost localip\n```\n\n**Flags:** None\n\nExample Output:\n\n```\n localIPCmd\n LOCAL IP    VALUE\n IP Address  192.168.116.1 \n```\n\n---\n\n####  `loggedin`\n\n**Description:** Shows the local IP address of the system.\n\n```bash\n./ghost loggedin\n```\n\n**Flags:** None\n\nExample Output:\n\n```\n loggedInCmd\n USER              TERMINAL  HOST      \n Laptop12\\Matt  N/A       localhost \n```\n\n---\n\n####  `meminfo`\n\n**Description:** Displays memory usage statistics.\n\n```bash\n./ghost meminfo\n```\n\n**Flags:** None\n\nExample Output:\n\n```\n memInfoCmd\n MEMORY INFO  VALUE    \n Total        17.09 GB \n Used         9.41 GB\n Free         7.68 GB  \n UsedPercent  55.00%\n```\n\n---\n\n####  `netstat`\n\n**Description:** Shows network status, including open connections.\n\n```bash\n./ghost netstat\n```\n\n**Flags:** None\n\nExample Output:\n\n```\nActive Network Connections\n PROTOCOL  LOCAL ADDRESS                                  REMOTE ADDRESS                             STATE       \n TCP       0.0.0.0:135                                    0.0.0.0:0                                  LISTEN      \n TCP       0.0.0.0:445                                    0.0.0.0:0                                  LISTEN      \n TCP       0.0.0.0:902                                    0.0.0.0:0                                  LISTEN      \n TCP       0.0.0.0:912                                    0.0.0.0:0                                  LISTEN      \n TCP       0.0.0.0:5040                                   0.0.0.0:0                                  LISTEN      \n TCP       0.0.0.0:5357                                   0.0.0.0:0                                  LISTEN      \n TCP       0.0.0.0:49664                                  0.0.0.0:0                                  LISTEN      \n TCP       0.0.0.0:49665                                  0.0.0.0:0                                  LISTEN  \n```\n\n---\n\n####  `networkinterfaces`\n\n**Description:** Lists all network interfaces on the system.\n\n```bash\n./ghost networkinterfaces\n```\n\n**Flags:** None\n\nExample Output:\n\n```\nnetworkInterfacesCmd\n NETWORK INTERFACES  VALUE\n Index               16\n MTU                 1500\n Name                Ethernet\n HardwareAddr        f8:a9:5e:3c:7d:42\n Flags               broadcast\n                     multicast\n Addrs               Addr: fe80::92c7:819:a487:b76d/64\n                     Addr: 169.254.245.133/16\n ----------\n Index               6\n MTU                 1500\n Name                VirtualBox Host-Only Network #2\n HardwareAddr        0a:00:27:00:00:06\n Flags               up\n                     broadcast\n                     multicast\n Addrs               Addr: fe80::87db:86ed:1d04:29dd/64\n                     Addr: 169.254.67.233/16\n ----------\n Index               29\n MTU                 1500\n Name                VirtualBox Host-Only Network\n HardwareAddr        0a:00:27:00:00:1d\n Flags               up\n                     broadcast\n                     multicast\n Addrs               Addr: fe80::b583:79ce:27fc:72c6/64\n                     Addr: 169.254.76.71/16\n```\n\n---\n\n####  `portscanner`\n\n**Description:** Scans for open ports on the specified host.\n\n```bash\n./ghost portscanner --host 192.168.1.1 --ports 20-80\n```\n\n**Flags:**\n- `--host`: Host IP to scan.\n- `--ports`: Range of ports to scan.\n\nExample Output:\n\n```\nPort Scan Results\n PORT  PROTOCOL  LOCAL ADDRESS  FOREIGN ADDRESS  STATE      PROCESS           PID   OWNER \n 135   TCP       0.0.0.0:135    0.0.0.0:0        LISTENING  svchost.exe       1184  N/A   \n 445   TCP       0.0.0.0:445    0.0.0.0:0        LISTENING  System            4     N/A\n 902   TCP       0.0.0.0:902    0.0.0.0:0        LISTENING  vmware-authd.exe  5272  N/A   \n 912   TCP       0.0.0.0:912    0.0.0.0:0        LISTENING  vmware-authd.exe  5272  N/A\n```\n\n---\n\n#### `routeinfo`\n\n**Description:** Displays the system's routing table, showing all network routes, their destinations, gateways, metrics, and associated interfaces.\n\n```bash\n./ghost routeinfo\n```\n\n**Flags: None**\n\n**Example Output:**\n\n```\n routeCmd\n NETWORK DESTINATION  NETMASK          GATEWAY      INTERFACE      METRIC \n 0.0.0.0              0.0.0.0          192.168.0.1  192.168.0.114  25     \n 127.0.0.0            255.0.0.0        On-link      127.0.0.1      331    \n 127.0.0.1            255.255.255.255  On-link      127.0.0.1      331    \n 127.255.255.255      255.255.255.255  On-link      127.0.0.1      331    \n 192.168.0.0          255.255.255.0    On-link      192.168.0.114  281    \n 192.168.0.114        255.255.255.255  On-link      192.168.0.114  281    \n 192.168.0.255        255.255.255.255  On-link      192.168.0.114  281    \n 192.168.56.0         255.255.255.0    On-link      192.168.56.1   281    \n 192.168.56.1         255.255.255.255  On-link      192.168.56.1   281    \n 192.168.56.255       255.255.255.255  On-link      192.168.56.1   281    \n 224.0.0.0            240.0.0.0        On-link      127.0.0.1      331    \n 224.0.0.0            240.0.0.0        On-link      192.168.56.1   281    \n 224.0.0.0            240.0.0.0        On-link      192.168.0.114  281    \n 255.255.255.255      255.255.255.255  On-link      127.0.0.1      331    \n 255.255.255.255      255.255.255.255  On-link      192.168.56.1   281    \n 255.255.255.255      255.255.255.255  On-link      192.168.0.114  281    \n```\n\n####  `services`\n\n**Description:** Lists active services on the system.\n\n```bash\n./ghost services\n```\n\n**Flags:**\n- `--filter`: Filter services based on a pattern.\n\nExample Output:\n\n```\n servicesCmd\n SERVICE NAME  STATUS       MEMORY USAGE \n Energy        Manager      44.04 MB     \n Memory        Compression  137.59 MB\n Secure        System       39.40 MB     \n```\n\n---\n\n####  `subnetcalc`\n\n**Description:** Calculates subnet information based on input IP and mask.\n\n```bash\n./ghost subnetcalc --ip 192.168.1.10 --mask 24\n```\n\n**Flags:**\n- `--ip`: IP address.\n- `--mask`: Subnet mask.\n\nExample Output:\n\n```\n Subnet Calculation Results\n FIELD              VALUE\n Network Address    192.168.1.0\n Broadcast Address  192.168.1.255\n IP Range           192.168.1.0 - 192.168.1.255 \n```\n\n---\n\n####  `sysinfo`\n\n**Description:** Calculates subnet information based on input IP and mask.\n\n```bash\n./ghost sysinfo\n```\n\n**Flags:** None\n\nExample Output:\n\n```\n sysInfoCmd\n SYSTEM INFO   VALUE\n OS            Microsoft Windows 11 Home 10.0.19045 Build 19045 \n Architecture  amd64\n Kernel        11.0.19045 Build 19025\n Uptime        313h45m48s\n```\n\n---\n\n#### `traceroute`\n\n**Description:** Executes a traceroute from the current location to a specified IP address or hostname, displaying each hop along the route with RTT (Round-Trip Time) measurements.\n\n```bash\n./ghost traceroute --destination 8.8.8.8 --maxHops 20 --timeout 30\n```\n\n**Flags:**\n- `--destination` (`-d`): Specifies the target IP address or hostname for the traceroute. Defaults to `4.4.4.4`.\n- `--maxHops` (`-m`): Sets the maximum number of hops to trace. Defaults to `30`.\n- `--timeout` (`-t`): Defines the timeout in seconds for the traceroute command. Defaults to `30`.\n\n**Example Output:**\n\n*Standard Output:*\n\n```\n tracerouteCmd\n HOP  HOSTNAME      IP ADDRESS       RTT1 (MS)                 RTT2 (MS)                                  RTT3 (MS)\n   1  1  (omitted)  192.168.0.1      192.168.0.1)  0.428       0.402                                      0.458\n   2  2  (omitted)  10.0.0.1         10.0.0.1)  3.841          3.831                                      3.821\n   3  3  (omitted)  96.120.60.221    96.120.60.221)  11.833    18.277                                     18.266\n   4  4  (omitted)  162.151.214.73   162.151.214.73)  19.251   19.287                                     19.277\n   5  5  (omitted)  96.216.60.61     96.216.60.61)  19.216     19.180                                     19.195\n   6  6  (omitted)  96.216.158.37    96.216.158.37)  23.433    16.678                                     10.393\n   7  7  (omitted)  68.86.93.53      68.86.93.53)  26.039      -                                          -\n   8  8  (omitted)  96.110.39.226    96.110.39.226)  26.090    25.970                                     25.959\n   9  -  *                           -                         -                                          -\n  10  10  (omitted) 108.170.255.173  108.170.255.173)  25.994  192.178.105.141 (192.178.105.141)  22.910  -\n  11  11  (omitted) 142.251.50.244   142.251.50.244)  22.573   216.239.43.121 (216.239.43.121)  24.017    142.251.55.198 (142.251.55.198)  22.519\n  12  12  (omitted) 142.251.211.238  142.251.211.238)  22.837  108.170.255.130 (108.170.255.130)  21.976  23.361\n```\n\n---\n\n####  `treeprint`\n\n**Description:** Prints the directory structure in a tree format.\n\n```bash\n./ghost treeprint --path /home\n```\n\n**Flags:**\n- `--path`: Root directory to print.\n\nExample Output:\n\n```.\n.\n├── .gitignore\n├── .goreleaser.yaml\n├── DOCKER.md\n├── Dockerfile\n├── GORELEASER.md\n├── LICENSE\n├── README.md\n├── SCRIPTS.md\n├── SETUP.md\n├── cmd\n│   ├── arpscan.go\n│   ├── arpscan_linux.go\n│   ├── arpscan_windows.go\n│   ├── cpuInfo.go\n│   ├── diskUsage.go\n│   ├── envVars.go\n│   ├── find.go\n│   ├── fsInfo.go\n│   ├── gpuInfo.go\n│   ├── hostInfo.go\n│   ├── largestDirs.go\n│   ├── largestFiles.go\n│   ├── localIP.go\n│   ├── loggedIn.go\n│   ├── loggedin_linux.go\n│   ├── loggedin_windows.go\n│   ├── logins.go\n│   ├── memInfo.go\n│   ├── netstat.go\n│   ├── networkInterfaces.go\n│   ├── portscanner.go\n│   ├── root.go\n│   ├── routeInfo.go\n│   ├── services.go\n│   ├── services_linux.go\n│   ├── services_windows.go\n│   ├── subnetcalc.go\n│   ├── sysinfo.go\n│   ├── treceroute.go\n│   └── treePrint.go\n├── dist\n│   ├── artifacts.json\n│   ├── config.yaml\n│   ├── linux64\n│   │   └── ghost\n│   ├── linuxarm64\n│   │   └── ghost\n│   ├── metadata.json\n│   └── win64\n│       └── ghost.exe\n├── ghostpher-sm.png\n├── ghostpher.png\n├── go.mod\n├── go.sum\n├── main.go\n├── pullRequest.sh\n├── release.sh\n├── updateMain.sh\n└── utils\n    ├── tables.go\n    └── terminal.go\n\n\n```\n\n## Running in Docker\n\nFor instructions on using `ghost` within a Docker container, including example commands and limitations, see the [Docker Guide](./DOCKER.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmwiater%2Fghost","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmwiater%2Fghost","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmwiater%2Fghost/lists"}