Skip to content

Commit

Permalink
更新编译脚本,linux下可直接使用,更新版本到1.8.2
Browse files Browse the repository at this point in the history
  • Loading branch information
boyhack committed Feb 15, 2022
1 parent 3e201fc commit ff8bb8c
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 14 deletions.
25 changes: 18 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ jobs:
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-latest
steps:
- name: Set up Go 1.17
Expand All @@ -24,7 +23,7 @@ jobs:

- name: Set up libpcap-dev
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get install libpcap-dev -y
run: sudo apt-get install libpcap-dev gcc -y

- name: Get version
id: get_version
Expand All @@ -36,17 +35,29 @@ jobs:
- name: Get dependencies
run: go mod download

- name: Build
- name: Build On Linux
run: |
go build -o ./ksubdomain ./cmd/
chmod +x ksubdomain
tar -cvf Ksubdomain-${{ steps.get_version.outputs.VERSION }}-${{ runner.os }}.tar ksubdomain
if: matrix.os != 'windows-latest'
tar -cvf KSubdomain-${{ steps.get_version.outputs.VERSION }}-linux.tar ksubdomain
if: matrix.os == 'ubuntu-latest'
env:
GOENABLE: 1
CGO_LDFLAGS: "-Wl,-static -L/usr/lib/x86_64-linux-gnu/libpcap.a -lpcap -Wl,-Bdynamic"
- name: Build On Darwin
run: |
go build -o ./ksubdomain ./cmd/
chmod +x ksubdomain
tar -cvf KSubdomain-${{ steps.get_version.outputs.VERSION }}-darwin.tar ksubdomain
if: matrix.os == 'macos-latest'
- name: Build On Windows
run: |
go build -o ./ksubdomain.exe ./cmd/
tar -cvf Ksubdomain-${{ runner.os }}.tar ksubdomain.exe
if: matrix.os == 'windows-latest'
tar -cvf KSubdomain-windows.tar ksubdomain.exe
if: matrix.os == 'ubuntu-latest'
env:
GOOS: windows
GOENABLE: 1
- name: Release
uses: softprops/action-gh-release@master
with:
Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,26 @@ jobs:
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get install libpcap-dev gcc -y

- name: Set up Darwin libpcap
if: matrix.os == 'macos-latest'
run: brew install libpcap
# - name: Set up Darwin libpcap
# if: matrix.os == 'macos-latest'
# run: brew install libpcap

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Get dependencies
run: go mod download

- name: Build
- name: Build On Linux
run: go build -o ./ksubdomain_${{ runner.os }} ./cmd/
if: matrix.os == 'ubuntu-latest'
env:
GOENABLE: 1
CGO_LDFLAGS: "-Wl,-static -L/usr/lib/x86_64-linux-gnu/libpcap.a -lpcap -Wl,-Bdynamic"

- name: Build Windows
- name: Build On Darwin
run: go build -o ./ksubdomain_${{ runner.os }} ./cmd/
if: matrix.os == 'macos-latest'
- name: Build On Windows
run: go build -o ./ksubdomain_windows.exe ./cmd/
if: matrix.os == 'ubuntu-latest'
env:
Expand Down
2 changes: 1 addition & 1 deletion core/conf/config.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package conf

const (
Version = "1.8.1"
Version = "1.8.2"
AppName = "KSubdomain"
Description = "无状态子域名爆破工具"
)
10 changes: 10 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@ ksubdomain是一款基于无状态的子域名爆破工具,类似无状态端
hacking8信息流的src资产收集 https://i.hacking8.com/src/ 用的是ksubdomain

![](image.gif)
## 安装
1. 下载二进制 https://github.com/boy-hack/ksubdomain/releases
2. 安装libpcap环境
- Windows
下载`winpcap`驱动:https://www.winpcap.org/install/default.htm
- Linux
已经静态编译打包libpcap,无需其他操作
- MacOS
自带libpcap,无需其他操作
3. 执行!

## Useage
```bash
Expand Down

0 comments on commit ff8bb8c

Please sign in to comment.