Name | gscan JSON |
Version |
0.3.3
JSON |
| download |
home_page | |
Summary | A golang scanner |
upload_time | 2023-07-19 04:04:04 |
maintainer | |
docs_url | None |
author | lanXuage & YuSec2021 |
requires_python | |
license | MIT |
keywords |
scan
golang
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
![GitHub language count](https://img.shields.io/github/languages/count/lanxuage/gscan) ![GitHub top language](https://img.shields.io/github/languages/top/lanxuage/gscan) ![GitHub Repo stars](https://img.shields.io/github/stars/lanxuage/gscan?style=social) ![Docker Image Version (latest by date)](https://img.shields.io/docker/v/lanxuage/gscan) ![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/lanxuage/gscan) ![Docker Stars](https://img.shields.io/docker/stars/lanxuage/gscan) ![piwheels](https://img.shields.io/piwheels/v/gscan) ![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/lanxuage/gscan) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/ab59c36bb65c409fa547c137bd3ae825)](https://app.codacy.com/gh/LanXuage/gscan/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade) ![Discord](https://img.shields.io/discord/1106210931333156976) ![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/lanxuage/gscan) ![GitHub all releases](https://img.shields.io/github/downloads/lanxuage/gscan/total) ![GitHub issues](https://img.shields.io/github/issues/lanxuage/gscan) ![GitHub](https://img.shields.io/github/license/lanxuage/gscan) ![GitHub last commit](https://img.shields.io/github/last-commit/lanxuage/gscan)
[English](README_EN.md)
# 介绍
`gscan`最初是为项目[gosam](https://github.com/LanXuage/gosam.git)提供基础扫描支持的。后来独立出来成为一个类似 `nmap`的扫描工具,目前正在努力加强和完善中,项目很期待其他开发者的加入。也欢迎您下载[发布包](https://github.com/LanXuage/gscan/releases)来体验它,帮我们测试并反馈问题给我们。
# 特性
- [X] ARP scan
- [X] ICMP scan
- [X] TCP port scan
- [X] Domain support
- [X] Random port support
- [ ] UDP port scan
- [ ] Service discovery
- [ ] Vulnerability discovery
- [ ] Adaptive binary overflow
# 使用
从[发布包](https://github.com/LanXuage/gscan/releases)里下载的对应系统和架构的可执行文件 `gscan`。
## 查看帮助
```
$ gscan help
Gscan
____ ______ ____ _____ ____
/ ___\/ ___// ___\\__ \ / \
/ /_/ >___ \\ \___ / __ \| | \
\___ /____ >\___ >____ /___| /
/_____/ \/ \/ \/ \/
https://github.com/LanXuage/gosam/gscan
A Scanner.
Usage:
gscan [flags]
gscan [command]
Available Commands:
arp ARP Scanner
completion Generate the autocompletion script for the specified shell
help Help about any command
icmp ICMP Scanner
port PORT Scanner
Flags:
-A, --arp with arp scan
-D, --debug set debug log level
-F, --file string file to output(unrealized)
-H, --help help for this command
-I, --icmp with icmp scan
-O, --output string normal, json or xml(unrealized) (default "normal")
-T, --timeout int global timeout(ms) (default 6500)
-V, --version version for gscan
Use "gscan [command] --help" for more information about a command.
```
详细命令作用参考[这里](docs/command.md)。
## 简单例子
### ARP 扫描
#### 对本地的整个局域网进行 arp 扫描
```sh
$ gscan arp -a
192.168.50.179 00:15:5d:fa:d7:e7 Microsoft Corporation
192.168.48.1 00:15:5d:ab:10:3a Microsoft Corporation
Cost: 6.514218807s
```
#### 对指定 IP 进行 arp 扫描
```sh
$ gscan arp -h 192.168.50.179
192.168.50.179 00:15:5d:fa:d7:e7 Microsoft Corporation
Cost: 6.500702247s
```
> 注意:默认超时为6500毫秒,可以使用 `-T`进行指定,单位为毫秒。
### ICMP 扫描
### 单IP or 网段 主机存活探测
```sh
$ gscan icmp -h 192.168.1.1/24
IP Status
192.168.1.1 Alive
Cost: 4.009240208s
```
### 多目标 存活探测
```sh
$ gscan icmp -h 192.168.1.1 -h 192.168.2.2
IP Status
192.168.1.1 Alive
192.168.2.2 Alive
Cost: 4.002214791s
```
### TCP Port 扫描
#### 对一个 IP 进行全端口探测
```sh
$ gscan port -h 192.168.48.1 -p 0-65535
IP PORT TYPE STATE
192.168.48.1 135(epmap) tcp open
192.168.48.1 5091 tcp open
192.168.48.1 7680(pando-pub) tcp open
192.168.48.1 5040 tcp open
192.168.48.1 5357(wsdapi) tcp open
192.168.48.1 2179(vmrdp) tcp open
192.168.48.1 10808 tcp open
192.168.48.1 10809(nbd) tcp open
Cost: 6.00483283s
```
#### 对一个 IP 进行全端口探测,结合 ARP 扫描结果
```sh
$ gscan port -h 192.168.48.1 -p 0-65535 -A
IP MAC VENDOR PORT TYPE STATE
192.168.48.1 00:15:5d:ab:10:3a Microsoft Corporation 2179(vmrdp) tcp open
192.168.48.1 00:15:5d:ab:10:3a Microsoft Corporation 135(epmap) tcp open
192.168.48.1 00:15:5d:ab:10:3a Microsoft Corporation 5091 tcp open
192.168.48.1 00:15:5d:ab:10:3a Microsoft Corporation 5357(wsdapi) tcp open
192.168.48.1 00:15:5d:ab:10:3a Microsoft Corporation 5040 tcp open
192.168.48.1 00:15:5d:ab:10:3a Microsoft Corporation 10809(nbd) tcp open
192.168.48.1 00:15:5d:ab:10:3a Microsoft Corporation 7680(pando-pub) tcp open
192.168.48.1 00:15:5d:ab:10:3a Microsoft Corporation 10808 tcp open
Cost: 9.013501996s
```
#### 使用全连接模式对一个 IP 进行全端口探测
```sh
$ gscan port -h 192.168.48.1 -p 0-65535 -Af
IP MAC VENDOR PORT TYPE STATE
192.168.48.1 00:15:5d:ab:10:3a Microsoft Corporation 10808 tcp open
192.168.48.1 00:15:5d:ab:10:3a Microsoft Corporation 7680(pando-pub) tcp open
192.168.48.1 00:15:5d:ab:10:3a Microsoft Corporation 2179(vmrdp) tcp open
192.168.48.1 00:15:5d:ab:10:3a Microsoft Corporation 5040 tcp open
192.168.48.1 00:15:5d:ab:10:3a Microsoft Corporation 10809(nbd) tcp open
192.168.48.1 00:15:5d:ab:10:3a Microsoft Corporation 135(epmap) tcp open
192.168.48.1 00:15:5d:ab:10:3a Microsoft Corporation 5357(wsdapi) tcp open
Cost: 9.01656839s
```
> 注意:`gscan`使用的是 `gopacket`模拟的全连接,所以使用 `-f`参数时应该开启本地的防火墙,防止本机系统自动 `rst`连接导致全连接扫描失败。
# 开发
## 从源码构建
### 环境准备
#### debain/ubuntu
```sh
apt install docker
```
#### darwin(MacOS)
```sh
brew install libpcap-dev golang git
```
### 拉取源码
```sh
git clone https://github.com/LanXuage/gscan.git
```
### 编译
```sh
make linux
```
编译完成会在项目目录下的 `bin`目录生不同架构的 `linux`静态可执行文件。
## 开发规范
参考[这里](docs/development.md)
# 感谢
## 开发者
- [YuSec2021](https://github.com/YuSec2021)
## 项目
- [gopacket](https://github.com/google/gopacket)
- [concurrent-map](https://github.com/orcaman/concurrent-map)
- [ants](https://github.com/panjf2000/ants)
- [cobra](https://github.com/spf13/cobra)
- [zap](https://go.uber.org/zap)
Raw data
{
"_id": null,
"home_page": "",
"name": "gscan",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "scan,golang",
"author": "lanXuage & YuSec2021",
"author_email": "lanxuage@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/41/e6/5af8c45233c2d8131203c8f02312129180a2d0640e6fbe3bd73ba7673296/gscan-0.3.3.tar.gz",
"platform": null,
"description": "![GitHub language count](https://img.shields.io/github/languages/count/lanxuage/gscan) ![GitHub top language](https://img.shields.io/github/languages/top/lanxuage/gscan) ![GitHub Repo stars](https://img.shields.io/github/stars/lanxuage/gscan?style=social) ![Docker Image Version (latest by date)](https://img.shields.io/docker/v/lanxuage/gscan) ![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/lanxuage/gscan) ![Docker Stars](https://img.shields.io/docker/stars/lanxuage/gscan) ![piwheels](https://img.shields.io/piwheels/v/gscan) ![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/lanxuage/gscan) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/ab59c36bb65c409fa547c137bd3ae825)](https://app.codacy.com/gh/LanXuage/gscan/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade) ![Discord](https://img.shields.io/discord/1106210931333156976) ![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/lanxuage/gscan) ![GitHub all releases](https://img.shields.io/github/downloads/lanxuage/gscan/total) ![GitHub issues](https://img.shields.io/github/issues/lanxuage/gscan) ![GitHub](https://img.shields.io/github/license/lanxuage/gscan) ![GitHub last commit](https://img.shields.io/github/last-commit/lanxuage/gscan)\n\n[English](README_EN.md)\n\n# \u4ecb\u7ecd\n\n`gscan`\u6700\u521d\u662f\u4e3a\u9879\u76ee[gosam](https://github.com/LanXuage/gosam.git)\u63d0\u4f9b\u57fa\u7840\u626b\u63cf\u652f\u6301\u7684\u3002\u540e\u6765\u72ec\u7acb\u51fa\u6765\u6210\u4e3a\u4e00\u4e2a\u7c7b\u4f3c `nmap`\u7684\u626b\u63cf\u5de5\u5177\uff0c\u76ee\u524d\u6b63\u5728\u52aa\u529b\u52a0\u5f3a\u548c\u5b8c\u5584\u4e2d\uff0c\u9879\u76ee\u5f88\u671f\u5f85\u5176\u4ed6\u5f00\u53d1\u8005\u7684\u52a0\u5165\u3002\u4e5f\u6b22\u8fce\u60a8\u4e0b\u8f7d[\u53d1\u5e03\u5305](https://github.com/LanXuage/gscan/releases)\u6765\u4f53\u9a8c\u5b83\uff0c\u5e2e\u6211\u4eec\u6d4b\u8bd5\u5e76\u53cd\u9988\u95ee\u9898\u7ed9\u6211\u4eec\u3002\n\n# \u7279\u6027\n\n- [X] ARP scan\n- [X] ICMP scan\n- [X] TCP port scan\n- [X] Domain support\n- [X] Random port support\n- [ ] UDP port scan\n- [ ] Service discovery\n- [ ] Vulnerability discovery\n- [ ] Adaptive binary overflow\n\n# \u4f7f\u7528\n\n\u4ece[\u53d1\u5e03\u5305](https://github.com/LanXuage/gscan/releases)\u91cc\u4e0b\u8f7d\u7684\u5bf9\u5e94\u7cfb\u7edf\u548c\u67b6\u6784\u7684\u53ef\u6267\u884c\u6587\u4ef6 `gscan`\u3002\n\n## \u67e5\u770b\u5e2e\u52a9\n\n```\n$ gscan help\nGscan\n ____ ______ ____ _____ ____ \n / ___\\/ ___// ___\\\\__ \\ / \\ \n / /_/ >___ \\\\ \\___ / __ \\| | \\\n \\___ /____ >\\___ >____ /___| /\n/_____/ \\/ \\/ \\/ \\/ \nhttps://github.com/LanXuage/gosam/gscan\n\nA Scanner.\n\nUsage:\n gscan [flags]\n gscan [command]\n\nAvailable Commands:\n arp ARP Scanner\n completion Generate the autocompletion script for the specified shell\n help Help about any command\n icmp ICMP Scanner\n port PORT Scanner\n\nFlags:\n -A, --arp with arp scan\n -D, --debug set debug log level\n -F, --file string file to output(unrealized)\n -H, --help help for this command\n -I, --icmp with icmp scan\n -O, --output string normal, json or xml(unrealized) (default \"normal\")\n -T, --timeout int global timeout(ms) (default 6500)\n -V, --version version for gscan\n\nUse \"gscan [command] --help\" for more information about a command.\n```\n\n\u8be6\u7ec6\u547d\u4ee4\u4f5c\u7528\u53c2\u8003[\u8fd9\u91cc](docs/command.md)\u3002\n\n## \u7b80\u5355\u4f8b\u5b50\n\n### ARP \u626b\u63cf\n\n#### \u5bf9\u672c\u5730\u7684\u6574\u4e2a\u5c40\u57df\u7f51\u8fdb\u884c arp \u626b\u63cf\n\n```sh\n$ gscan arp -a\n192.168.50.179 00:15:5d:fa:d7:e7 Microsoft Corporation\n192.168.48.1 00:15:5d:ab:10:3a Microsoft Corporation\nCost: 6.514218807s\n```\n\n#### \u5bf9\u6307\u5b9a IP \u8fdb\u884c arp \u626b\u63cf\n\n```sh\n$ gscan arp -h 192.168.50.179\n192.168.50.179 00:15:5d:fa:d7:e7 Microsoft Corporation\nCost: 6.500702247s\n```\n\n> \u6ce8\u610f\uff1a\u9ed8\u8ba4\u8d85\u65f6\u4e3a6500\u6beb\u79d2\uff0c\u53ef\u4ee5\u4f7f\u7528 `-T`\u8fdb\u884c\u6307\u5b9a\uff0c\u5355\u4f4d\u4e3a\u6beb\u79d2\u3002\n\n### ICMP \u626b\u63cf\n\n### \u5355IP or \u7f51\u6bb5 \u4e3b\u673a\u5b58\u6d3b\u63a2\u6d4b\n\n```sh\n$ gscan icmp -h 192.168.1.1/24 \nIP\t\t\t Status\n192.168.1.1 Alive\nCost: 4.009240208s\n```\n\n### \u591a\u76ee\u6807 \u5b58\u6d3b\u63a2\u6d4b\n\n```sh\n$ gscan icmp -h 192.168.1.1 -h 192.168.2.2\nIP Status\n192.168.1.1 Alive\n192.168.2.2 Alive\nCost: 4.002214791s\n\n```\n\n### TCP Port \u626b\u63cf\n\n#### \u5bf9\u4e00\u4e2a IP \u8fdb\u884c\u5168\u7aef\u53e3\u63a2\u6d4b\n\n```sh\n$ gscan port -h 192.168.48.1 -p 0-65535\nIP PORT TYPE STATE\n192.168.48.1 135(epmap) tcp open\n192.168.48.1 5091 tcp open\n192.168.48.1 7680(pando-pub) tcp open\n192.168.48.1 5040 tcp open\n192.168.48.1 5357(wsdapi) tcp open\n192.168.48.1 2179(vmrdp) tcp open\n192.168.48.1 10808 tcp open\n192.168.48.1 10809(nbd) tcp open\nCost: 6.00483283s\n```\n\n#### \u5bf9\u4e00\u4e2a IP \u8fdb\u884c\u5168\u7aef\u53e3\u63a2\u6d4b\uff0c\u7ed3\u5408 ARP \u626b\u63cf\u7ed3\u679c\n\n```sh\n$ gscan port -h 192.168.48.1 -p 0-65535 -A\nIP MAC VENDOR PORT TYPE STATE\n192.168.48.1 00:15:5d:ab:10:3a Microsoft Corporation 2179(vmrdp) tcp open\n192.168.48.1 00:15:5d:ab:10:3a Microsoft Corporation 135(epmap) tcp open\n192.168.48.1 00:15:5d:ab:10:3a Microsoft Corporation 5091 tcp open\n192.168.48.1 00:15:5d:ab:10:3a Microsoft Corporation 5357(wsdapi) tcp open\n192.168.48.1 00:15:5d:ab:10:3a Microsoft Corporation 5040 tcp open\n192.168.48.1 00:15:5d:ab:10:3a Microsoft Corporation 10809(nbd) tcp open\n192.168.48.1 00:15:5d:ab:10:3a Microsoft Corporation 7680(pando-pub) tcp open\n192.168.48.1 00:15:5d:ab:10:3a Microsoft Corporation 10808 tcp open\nCost: 9.013501996s\n```\n\n#### \u4f7f\u7528\u5168\u8fde\u63a5\u6a21\u5f0f\u5bf9\u4e00\u4e2a IP \u8fdb\u884c\u5168\u7aef\u53e3\u63a2\u6d4b\n\n```sh\n$ gscan port -h 192.168.48.1 -p 0-65535 -Af\nIP MAC VENDOR PORT TYPE STATE\n192.168.48.1 00:15:5d:ab:10:3a Microsoft Corporation 10808 tcp open\n192.168.48.1 00:15:5d:ab:10:3a Microsoft Corporation 7680(pando-pub) tcp open\n192.168.48.1 00:15:5d:ab:10:3a Microsoft Corporation 2179(vmrdp) tcp open\n192.168.48.1 00:15:5d:ab:10:3a Microsoft Corporation 5040 tcp open\n192.168.48.1 00:15:5d:ab:10:3a Microsoft Corporation 10809(nbd) tcp open\n192.168.48.1 00:15:5d:ab:10:3a Microsoft Corporation 135(epmap) tcp open\n192.168.48.1 00:15:5d:ab:10:3a Microsoft Corporation 5357(wsdapi) tcp open\nCost: 9.01656839s\n```\n\n> \u6ce8\u610f\uff1a`gscan`\u4f7f\u7528\u7684\u662f `gopacket`\u6a21\u62df\u7684\u5168\u8fde\u63a5\uff0c\u6240\u4ee5\u4f7f\u7528 `-f`\u53c2\u6570\u65f6\u5e94\u8be5\u5f00\u542f\u672c\u5730\u7684\u9632\u706b\u5899\uff0c\u9632\u6b62\u672c\u673a\u7cfb\u7edf\u81ea\u52a8 `rst`\u8fde\u63a5\u5bfc\u81f4\u5168\u8fde\u63a5\u626b\u63cf\u5931\u8d25\u3002\n\n# \u5f00\u53d1\n\n## \u4ece\u6e90\u7801\u6784\u5efa\n\n### \u73af\u5883\u51c6\u5907\n\n#### debain/ubuntu\n\n```sh\napt install docker\n```\n\n#### darwin(MacOS)\n\n```sh\nbrew install libpcap-dev golang git\n```\n\n### \u62c9\u53d6\u6e90\u7801\n\n```sh\ngit clone https://github.com/LanXuage/gscan.git\n```\n\n### \u7f16\u8bd1\n\n```sh\nmake linux\n```\n\n\u7f16\u8bd1\u5b8c\u6210\u4f1a\u5728\u9879\u76ee\u76ee\u5f55\u4e0b\u7684 `bin`\u76ee\u5f55\u751f\u4e0d\u540c\u67b6\u6784\u7684 `linux`\u9759\u6001\u53ef\u6267\u884c\u6587\u4ef6\u3002\n\n## \u5f00\u53d1\u89c4\u8303\n\n\u53c2\u8003[\u8fd9\u91cc](docs/development.md)\n\n# \u611f\u8c22\n\n## \u5f00\u53d1\u8005\n\n- [YuSec2021](https://github.com/YuSec2021)\n\n## \u9879\u76ee\n\n- [gopacket](https://github.com/google/gopacket)\n- [concurrent-map](https://github.com/orcaman/concurrent-map)\n- [ants](https://github.com/panjf2000/ants)\n- [cobra](https://github.com/spf13/cobra)\n- [zap](https://go.uber.org/zap)\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A golang scanner",
"version": "0.3.3",
"project_urls": null,
"split_keywords": [
"scan",
"golang"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "fa3903df7fbb7241d2a1767df69bad8eae647067f74aecdae2776c70c2b54de9",
"md5": "57878b7163ab5039031940c6b73a76c1",
"sha256": "067bc478445351bfe991c75cee99a4e51a49d4d8a056ee56a878d2b2bbbf06e4"
},
"downloads": -1,
"filename": "gscan-0.3.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "57878b7163ab5039031940c6b73a76c1",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 35103768,
"upload_time": "2023-07-19T04:04:00",
"upload_time_iso_8601": "2023-07-19T04:04:00.272488Z",
"url": "https://files.pythonhosted.org/packages/fa/39/03df7fbb7241d2a1767df69bad8eae647067f74aecdae2776c70c2b54de9/gscan-0.3.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "41e65af8c45233c2d8131203c8f02312129180a2d0640e6fbe3bd73ba7673296",
"md5": "15aadcb99155580894d9c3849fab6c1d",
"sha256": "ff3d36a4bb8632adca7c3beaffae5d8562e56ad9334cf040e44218f3759b32f5"
},
"downloads": -1,
"filename": "gscan-0.3.3.tar.gz",
"has_sig": false,
"md5_digest": "15aadcb99155580894d9c3849fab6c1d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 34943346,
"upload_time": "2023-07-19T04:04:04",
"upload_time_iso_8601": "2023-07-19T04:04:04.004634Z",
"url": "https://files.pythonhosted.org/packages/41/e6/5af8c45233c2d8131203c8f02312129180a2d0640e6fbe3bd73ba7673296/gscan-0.3.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-07-19 04:04:04",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "gscan"
}