{"id":19235708,"url":"https://github.com/seaung/masscan","last_synced_at":"2026-01-07T05:45:58.086Z","repository":{"id":57622360,"uuid":"392739308","full_name":"seaung/masscan","owner":"seaung","description":"A golang development library encapsulating masscan(一个封装了masscan扫描器的一个golang开发库)","archived":false,"fork":false,"pushed_at":"2022-04-13T15:09:47.000Z","size":3061,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-03T13:37:52.442Z","etag":null,"topics":["go","golang","masscan","masscan-parse"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/seaung.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-04T15:28:13.000Z","updated_at":"2024-08-19T08:15:49.000Z","dependencies_parsed_at":"2022-09-26T20:10:42.987Z","dependency_job_id":null,"html_url":"https://github.com/seaung/masscan","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seaung%2Fmasscan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seaung%2Fmasscan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seaung%2Fmasscan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seaung%2Fmasscan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seaung","download_url":"https://codeload.github.com/seaung/masscan/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246135744,"owners_count":20729056,"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":["go","golang","masscan","masscan-parse"],"created_at":"2024-11-09T16:17:57.284Z","updated_at":"2026-01-07T05:45:53.047Z","avatar_url":"https://github.com/seaung.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Masscan\n\n\u003cp align=\"center\"\u003e\n\t\u003cimg with=\"350\" src=\"images/gopher.gif\" /\u003e\n\u003c/p\u003e\n\n\n## What is masscan\n\n\u003e masscan is an Internet-scale port scanner, useful for large scale surveys of the Internet, or of internal networks. While the default transmit rate is only 100 packets/second, it can optional go as fast as 25 million packets/second, a rate sufficient to scan the Internet in 3 minutes for one port.\n\n## Installation\n\n```bash\ngo get github.com/seaung/masscan\n\n```\n\n## Special Instructions\n\n\u003e This library depends on masscan, so you need to install masscan in your system in advance. since the execution of masscan requires root permission, you must ensure that you have root permission\n\n\n## Supported features\n\n- [x] Support some parameters of masscan scanner\n\n## TODO\n\n- [ ] Constantly improve this library\n\n\n## Simple example\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"github.com/seaung/masscan\"\n\t\"time\"\n\t\"log\"\n)\n\nfunc main() {\n\tcxt, cancel := context.WithTimeout(context.Background(), time.Minute * 5)\n\tdefer cancel()\n\n\tmasscanScanner, err := masscan.NewMasscanScanner(\n\t\tmasscan.WithTargets(\"192.168.1.106\"),\n\t\tmasscan.WithPorts(\"0-8000\"),\n\t\tmasscan.WithBanners(),\n\t\tmasscan.WithContext(cxt),\n\t)\n\n\tif err != nil {\n\t\tlog.Fatalf(\"unable to create masscan scan: %v\\n\", err)\n\t}\n\n\tresult, _, err := masscanScanner.Run()\n\tif err != nil {\n\t\tlog.Fatalf(\"unable to run masscan scan: %v\\n\", err)\n\t\treturn\n\t}\n\n\tfor _, host := range result.Hosts {\n\t\tfmt.Printf(\"Address : %s - Address Type : %s\\n\", host.Address.Addr, host.Address.AddrType)\n\n\t\tfor _, port := range host.Ports {\n\t\t\tfmt.Printf(\"Port : %s - State : %s - Protocol : %s\\n\", port.ID, port.State.State, port.Protocol)\n\t\t}\n\t}\n}\n\n```\n\n\nProgram output\n\n\n```bash\nAddress : 192.168.7.180 - Address Type : ipv4\nPort : 22 - State : open - Protocol : tcp\nAddress : 192.168.7.180 - Address Type : ipv4\nPort : 80 - State : open - Protocol : tcp\nAddress : 192.168.7.180 - Address Type : ipv4\nPort : 3306 - State : open - Protocol : tcp\nAddress : 192.168.7.180 - Address Type : ipv4\nPort : 81 - State : open - Protocol : tcp\nAddress : 192.168.7.180 - Address Type : ipv4\nPort : 111 - State : open - Protocol : tcp\nAddress : 192.168.7.180 - Address Type : ipv4\nPort : 389 - State : open - Protocol : tcp\n```\n\n\n## The development soul comes from\nThe development of this library is inspired by this library [Ullaakut/nmap](https://github1s.com/Ullaakut/nmap)\n\n## Reference\n\n[Masscan Github](https://github.com/robertdavidgraham/masscan)\n\n---\nthat's all\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseaung%2Fmasscan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseaung%2Fmasscan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseaung%2Fmasscan/lists"}