https://github.com/cedi/cmap
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/cedi/cmap
- Owner: cedi
- License: apache-2.0
- Created: 2021-09-18T16:20:16.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2025-11-14T22:08:30.000Z (8 months ago)
- Last Synced: 2025-11-15T00:14:55.951Z (8 months ago)
- Language: Go
- Size: 12.5 MB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# cmap
[](https://github.com/cedi/cmap/blob/main/LICENSE)
[](https://github.com/cedi/cmap)
[](https://pkg.go.dev/github.com/cedi/cmap)
[](https://goreportcard.com/report/github.com/cedi/cmap)
[](https://lgtm.com/projects/g/cedi/cmap/alerts/)
[](https://github.com/cedi/cmap/actions)
cmap is a poor-mans version of `nmap`. It utilizes nmap under the hood.
I'm just really fucking lazy learning the proper nmap syntax. Nost of the time, I just wanna know which hosts are up, and if port 22 is open for SSH. So yeah, call me stupid, but I actually use this tool almost on a daily base.
Sorry to all the nmap fans who feel offended by this creation of mine. But hey - at least it uses nmap under the hood, right? ;)
## Usage
```bash
$ cmap scan network 192.168.0.0/24 -p 6443
Starting scan of network [192.168.0.0/24] with Timeout 15m0s
NAME (5) IP SSH OTHER PORTS ERROR
--------------------- --------------- ---------- ------------------------------ -------
router 192.168.0.1 filtered sun-sr-https/6443/tcp=closed
ava 192.168.0.140 closed sun-sr-https/6443/tcp=closed
clusterpi-master 192.168.0.156 open sun-sr-https/6443/tcp=open
clusterpi-worker-1 192.168.0.111 open sun-sr-https/6443/tcp=closed
clusterpi-worker-2 192.168.0.103 open sun-sr-https/6443/tcp=closed
```
## Pull requests
I warmly welcome pull requests. Feel free to contribute whatever you feel like (if you feel like it at all 😂 it's a kinda stupid tool anyway)
[](http://golang.org)
[](http://makeapullrequest.com)
### Multi-Threading
It should be rather called "multi-go-routines". I utilize go-routines with a thread-pool design approach, so you can easily tailor the amount of threads used using the `--paralell` flag.
By default I spawn 10 go routines.
I don't actually multi-thread the network discovery, but only the host-detection part.
That means, if you wanna scan a `/12` network, it first calls `nmap -sn cidr/12` under the hood, which will take forever (or at least it will feel like it's taking forever). However, now that you got a couple hundred (or - imagine - a couple thousand) hosts reported as "online", the thread-pool is used to scan for open ports in paralell. Each thread is scanning one host at a time, using `nmap ipaddr -p 22`.