Skip to content

Commit fc3028f

Browse files
committed
initial commit
0 parents  commit fc3028f

File tree

251 files changed

+23890
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

251 files changed

+23890
-0
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
sdk/bindgen/** linguist-vendored

.github/workflows/bin.yml.bak

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Download Release Asset on Windows
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
download-artifact:
10+
runs-on: windows-latest
11+
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v2
15+
16+
- name: Set up PowerShell
17+
shell: pwsh
18+
run: |
19+
# 获取发布的资产信息
20+
$token = "${{ secrets.GITHUB_TOKEN }}"
21+
$headers = @{
22+
Authorization = "token $token"
23+
}
24+
$owner = "owner" # 仓库拥有者
25+
$repo = "repo" # 仓库名称
26+
$tag = "v1.0.0" # 你要下载的发布版本标签
27+
28+
$releasesUrl = "https://api.github.com/repos/$owner/$repo/releases"
29+
$releases = Invoke-RestMethod -Uri $releasesUrl -Headers $headers
30+
$release = $releases | Where-Object { $_.tag_name -eq $tag }
31+
32+
if (-not $release) {
33+
throw "Release not found"
34+
}
35+
36+
$asset = $release.assets | Where-Object { $_.name -eq "your_asset_name.zip" } # 你要下载的资产名称
37+
38+
if (-not $asset) {
39+
throw "Asset not found"
40+
}
41+
42+
# 下载资产
43+
$assetUrl = $asset.browser_download_url
44+
Invoke-RestMethod -Uri $assetUrl -Headers $headers -OutFile "downloaded_asset.zip"
45+
46+
- name: Unzip the asset
47+
run: Expand-Archive -Path downloaded_asset.zip -DestinationPath ./unzipped

.github/workflows/build.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Build and Test on Windows
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build:
11+
runs-on: windows-latest
12+
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v2
16+
17+
- name: Download latest HyperDbg release
18+
run: |
19+
curl -s https://api.github.com/repos/HyperDbg/HyperDbg/releases/latest `
20+
| jq -r '.assets[] | select(.name | test("\\.zip$")) | .browser_download_url' `
21+
| % { Invoke-WebRequest $_ -OutFile 'hyperdbg.zip' }
22+
23+
- name: Unzip HyperDbg
24+
run: |
25+
Expand-Archive -Path hyperdbg.zip -DestinationPath hyperdbg
26+
27+
- name: List contents of HyperDbg
28+
run: |
29+
Get-ChildItem -Path hyperdbg -Recurse
30+
31+
- name: Set up Go
32+
uses: actions/setup-go@v3
33+
with:
34+
go-version: '1.22.4'
35+
36+
- name: Install dependencies
37+
run: go mod tidy
38+
39+
- name: Copy SDK directory to target path
40+
run: |
41+
xcopy hyperdbg\SDK\* .\gui\sdk\bindgen\SDK\ /E /H /Y
42+
43+
- name: Build the project
44+
run: go build ./...
45+
46+
- name: Run tests
47+
run: go test ./...

.github/workflows/pre-release.yml

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
name: Pre-release HyperDbg and GUI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
tags:
8+
- v*.**
9+
- weekly.**
10+
- 0.**
11+
12+
env:
13+
RELEASE_ZIP_FILE_NAME: hyperdbgui
14+
15+
jobs:
16+
test-on-multiple-os:
17+
name: Test on multiple OS
18+
runs-on: ${{ matrix.os }}
19+
strategy:
20+
matrix:
21+
os: [ windows-latest ]
22+
23+
steps:
24+
- name: Checkout repository
25+
uses: actions/checkout@v4
26+
27+
- name: Setup Go
28+
uses: actions/setup-go@v4
29+
with:
30+
go-version: '1.22.4'
31+
32+
- name: Install GCC on Windows
33+
run: choco install mingw
34+
35+
- name: Install dependencies
36+
run: go mod tidy
37+
38+
- name: Run tests
39+
run: go test ./...
40+
41+
- name: Build project
42+
run: go build .
43+
44+
- name: Debug - Check GITHUB_REF
45+
run: |
46+
echo "GITHUB_REF is: ${{ github.ref }}"
47+
echo "GITHUB_EVENT_REF is: ${{ github.event.ref }}"
48+
49+
package-and-release:
50+
needs: test-on-multiple-os
51+
runs-on: windows-latest
52+
if: startsWith(github.ref, 'refs/tags/v')
53+
54+
steps:
55+
- name: Checkout repository
56+
uses: actions/checkout@v4
57+
58+
- name: Setup Go
59+
uses: actions/setup-go@v4
60+
with:
61+
go-version: '1.22.4'
62+
63+
- name: Install GCC on Windows
64+
run: choco install mingw
65+
66+
- name: Install dependencies
67+
run: go mod tidy
68+
69+
- name: Build project
70+
run: go build .
71+
72+
- name: Setup Ruby
73+
uses: ruby/setup-ruby@v1
74+
with:
75+
ruby-version: '3.0.0'
76+
77+
- name: Install GitHub Changelog Generator
78+
run: gem install github_changelog_generator
79+
80+
- name: Generate Changelog
81+
run: github_changelog_generator --user ${{ github.repository_owner }} --project ${{ github.event.repository.name }} --token ${{ secrets.GITHUB_TOKEN }}
82+
83+
- name: Create source code archive
84+
run: powershell -Command "Get-ChildItem -Recurse | Where-Object { $_.FullName -notmatch '\.git' -and $_.Extension -notmatch '\.dll|\.sys|\.exe' } | Compress-Archive -DestinationPath ${env:RELEASE_ZIP_FILE_NAME}-${{ github.ref_name }}.zip -CompressionLevel Optimal"
85+
86+
- name: Create binaries archive
87+
run: powershell -Command "Get-ChildItem -Recurse -Include 'hyperdbgui.exe' | Compress-Archive -DestinationPath binaries-${{ github.ref_name }}.zip"
88+
89+
- name: Release
90+
uses: softprops/action-gh-release@v1
91+
with:
92+
files: |
93+
${{ env.RELEASE_ZIP_FILE_NAME }}-${{ github.ref_name }}.zip
94+
binaries-${{ github.ref_name }}.zip
95+
body_path: CHANGELOG.md
96+
env:
97+
GITHUB_TOKEN: ${{ secrets.tk }}

.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.idea
2+
*.json
3+
*.txt
4+
*.pdb
5+
*.exp
6+
*.lib
7+
*.log
8+
reset git.cmd
9+
cmake-build-debug
10+
bin
11+
/hyperdbgui.exe
12+
/binaries-bin.zip

0 commit comments

Comments
 (0)