• Stars
    star
    499
  • Rank 88,341 (Top 2 %)
  • Language
    Go
  • Created about 10 years ago
  • Updated about 10 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

gscan

一个Go语言实现的HTTPS IP可用性扫描工具, 主要作用于Google IP

用途

主要用于两种场景:

  • 扫描修复Hosts:指定IP段, 以及输入的hosts文件,扫描可用的IP替换(保留不可替换的),生成新的Hosts文件
  • 扫描可用IP:指定IP段,扫描可用于Google HTTPS的IP,结果可用于GSnova、GoAgent等代理工具

使用说明

如果对Go熟悉的,可以直接执行以下命令下载编译gscan:

 go get -u github.com/yinqiwen/gscan

不了解Go的,可以直接下载example的gscan.exe, 不过无法保证和源码同步更新

gscan是一个命令行工具,支持两个参数,配置说明见后文:

$ ./gscan.exe -h
Usage of D:\Src\MyProjects\gscan\gscan.exe:
   -conf="./gscan.conf": Config file, json format
   -iprange="./iprange.conf": IP Range file

配置说明

一个完整的配置文件, json格式:

{
 "ScanWorker" : 100,         //启动的扫描worker个数(GoRoutine)
 "ScanMinPingRTT" : 100,     //ping IP最小延迟,丢弃延迟很低的IP,延迟很低的IP不稳定,单位毫秒
 "ScanMaxPingRTT" : 800,     //ping IP最大延迟,丢弃延迟很大的IP,单位毫秒
 "ScanMaxSSLRTT":3000,       //最大SSL连接协商延迟
 "ScanCountPerIP" : 3,       //每个IP重试次数,每次都成功,才认为合法

 "Operation" : "ScanGoogleHosts",  //本次操作类型, 扫描IP或者扫描修复Hosts

 "ScanGoogleIP" :{
    "SSLCertVerifyHosts" : ["www.google.com.hk"],  //检查证书中域名
    "HTTPVerifyHosts" : ["www.google.com"],        //HEAD HTTP请求检查域名
    "RecordLimit" :     10,                       //输出IP个数限制
    "OutputSeparator":  "|",
    "OutputFile" :      "./google_ip.txt"         //结果输出文件
  },

 "ScanGoogleHosts":{
    "InputHosts":"./test/hosts.input",           //输入Hosts
    "OutputHosts": "./hosts.output",
    "HTTPVerifyHosts" : ["www.google.com", "www.google.com.hk", "mail.google.com", "code.google.com",
                        "drive.google.com", "plus.google.com", "play.google.com", "books.google.com",
                        "calendar.google.com", "sites.google.com"]    //需要HEAD HTTP请求检查域名
  } 
}

IP段文件格式如下:

#注释
IPStart1-IPEnd1
IPStart2-IPEnd2
...
IPStartN-IPEndN

example目录下有相关样例配置文件

More Repositories

1

ardb

A redis protocol compatible nosql, it support multiple storage engines as backend like Google's LevelDB, Facebook's RocksDB, OpenLDAP's LMDB, PerconaFT, WiredTiger, ForestDB.
C++
1,784
star
2

gsnova

Private proxy solution & network troubleshooting tool.
Go
553
star
3

geohash-int

A fast C99 geohash library which only provide int64 as hash result.
C
204
star
4

pbjson

A fast C++ serialization and de-serialization of Google's protobuf Messages into/from JSON format.
C++
150
star
5

snova-c4

Java/Node.JS implementation for Snova C4 Server.
Java
56
star
6

rsnova

Rust
50
star
7

snova-gae

Snova Java/Go server implementation for Google Appengine.
Python
41
star
8

snova-asio

Lightweight Proxy Tool
C++
33
star
9

myctk

My C/C++ Toolkit
C++
15
star
10

httpdns

A simple DNS query servive over http.
Java
15
star
11

swal

A simple write ahead log C99 library.
C
13
star
12

godns

A simple Go DNS client implementation with some new features.(Cache, Specifiable Server,...)
Go
12
star
13

tafgo

Go
9
star
14

arch

High performance networking C/C++ framework
C
8
star
15

httpclient

An async HTTP client build on netty3, which inspired from Go's http package.
Java
8
star
16

mmkv

Data structures in memory mapping file with redis API.
C++
8
star
17

mmdata

A c++ embeddable write-once data structure store.
C++
7
star
18

kcfg

A simple c++ json class/struct mapping head-only library.
C++
6
star
19

cn2py

C++ lib for chinese word to pinyin
C++
6
star
20

coroxx

C++ coroutine library
C++
5
star
21

gotoolkit

Go
4
star
22

comms

High Performance Persistent Cache on memory mapping file.
C++
3
star
23

procmon

A process monitor & control application.
Go
3
star
24

yinqiwen.github.io

yinqiwen's blogs
HTML
2
star
25

pmux

Go
2
star
26

so_script

C++
1
star
27

httpbench

A small program to benchmark HTTP servers, which is built on 'arch' framework.
C++
1
star
28

protoc-gen-mmdata

Go
1
star
29

didagle

C++
1
star