Skip to content

Commit

Permalink
更改国际化
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaozhu2007 committed Jul 4, 2022
1 parent 97c86c4 commit b41a2a7
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 6 deletions.
28 changes: 27 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,20 @@ jobs:
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.18 🧧
uses: actions/setup-go@v3
with:
go-version: 1.18
id: go

- name: Checkout 🛎️
uses: actions/checkout@v3

- name: Build 🎁
id: build
run: |
bash scripts/build.sh
- name: Generate Changelog
run: cp -f .github/changelog.txt ${{ github.workspace }}-CHANGELOG.txt

Expand All @@ -19,4 +33,16 @@ jobs:
with:
body_path: ${{ github.workspace }}-CHANGELOG.txt
token: ${{ secrets.GH_PAT }}
prerelease: ${{ contains(github.ref, '-beta') || contains(github.ref, '-rc') || contains(github.ref, '-alpha') }}
prerelease: ${{ contains(github.ref, '-beta') || contains(github.ref, '-rc') || contains(github.ref, '-alpha') }}
files: |
${{ github.workspace }}-CHANGELOG.txt
./build/linux/AGDDoS-linux-amd64
./build/linux/AGDDoS-linux-arm
./build/linux/AGDDoS-linux-arm64
./build/linux/AGDDoS-linux-mips64
./build/darwin/AGDDoS-darwin-amd64
./build/darwin/AGDDoS-darwin-arm64
./build/windows/AGDDoS-amd64.exe
./build/windows/AGDDoS-arm64.exe
./build/windows/AGDDoS-x86.exe
10 changes: 6 additions & 4 deletions src/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"flag"
"log"
"os"
"runtime"
"time"
)

Expand All @@ -13,17 +14,18 @@ var (
version = "unknown"
)

// Main Function
// Main Function / 主函数
func main() {
defaultTargetUrl := "https://kzkt.tianyuyun.com/static/h5_new_4.6.5.115/index.html"
printWelcome()
SetupCloseHandler()
runtime.GC() // Clean up memory to prevent memory overflow
// Parse Flags / 解析命令行参数
printVersion := flag.Bool("v", false, "Print version and exit")
flag.StringVar(&Method, "m", "GET", "DDoS Method(GET/POST/PUT/HEAD/...)")
flag.StringVar(&TargetUrl, "u", defaultTargetUrl, "Taget URL")
flag.IntVar(&ConcurrencyCount, "cc", 8000, "并发线程数量")
flag.IntVar(&IntervalMillisecond, "ims", 100, "每个线程执行攻击的频率(ms)")
flag.IntVar(&ConcurrencyCount, "cc", 8000, "Number of concurrent threads")
flag.IntVar(&IntervalMillisecond, "ims", 100, "Frequency of attacks per thread(ms)")
flag.IntVar(&DurationMinute, "dm", 2000, "Attack Duration time(Minutes)")
flag.Parse()

Expand All @@ -33,7 +35,7 @@ func main() {
}

if TargetUrl == defaultTargetUrl {
log.Printf("TargetUrl is %s, 请尝试通过命令行重传参数启动(TargetUrl 不能等于 defaultTargetUrl). Usage:./AGDDoS -h\n", TargetUrl)
log.Printf("TargetUrl is %s. Please try to start by retransmitting parameters from the command line (TargetUrl != defaultTargetUrl). Usage:./AGDDoS -h\n", TargetUrl)
return
}
go func() {
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.2-alpha-7
1.0.2-alpha-8

0 comments on commit b41a2a7

Please sign in to comment.