Skip to content

Commit

Permalink
1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaozhu2007 committed Nov 19, 2022
1 parent 5bb85ea commit 4bc08bd
Show file tree
Hide file tree
Showing 12 changed files with 157 additions and 168 deletions.
2 changes: 1 addition & 1 deletion .github/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ like Pull Request, but few people submit PR for our projects :(

If you have a good idea, remember to submit it to us!

**Full Changelog**: https://github.com/AGDDoS/AGDDoS/compare/1.0.2-alpha-8...1.0.2
**Full Changelog**: https://github.com/AGDDoS/AGDDoS/compare/1.0.3...1.1.0
25 changes: 13 additions & 12 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,29 +30,30 @@ jobs:
./build/linux/*
retention-days: 14
if-no-files-found: warn

- name: Upload Freebsd 📋
uses: actions/upload-artifact@v3
with:
name: AGDDoS-Freebsd
path: |
./build/freebsd/*
retention-days: 7
if-no-files-found: warn


- name: Upload MacOS 📋
uses: actions/upload-artifact@v3
with:
name: AGDDoS-MacOS
path: |
./build/darwin/*
retention-days: 7
retention-days: 14
if-no-files-found: warn

- name: Upload Windows 📋
uses: actions/upload-artifact@v3
with:
name: AGDDoS-Windows
path: ./build/windows/*
retention-days: 14
retention-days: 31
if-no-files-found: warn

- name: Upload Freebsd 📋
uses: actions/upload-artifact@v3
with:
name: AGDDoS-Freebsd
path: |
./build/freebsd/*
retention-days: 7
if-no-files-found: warn

17 changes: 5 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,9 @@ jobs:
token: ${{ secrets.GH_PAT }}
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-hidden.exe
./build/windows/AGDDoS-amd64-hidden.exe
./build/windows/AGDDoS-arm64-hidden.exe
AGDDoS-linux.zip
AGDDoS-darwin.zip
AGDDoS-win64-amd64.zip
AGDDoS-win64-arm64.zip
AGDDoS-win32.zip
99 changes: 0 additions & 99 deletions CHANGELOG.md

This file was deleted.

66 changes: 38 additions & 28 deletions scripts/build.sh
Original file line number Diff line number Diff line change
@@ -1,48 +1,58 @@
if [ "$1" = "dev" ]; then
version="gh-actions"
else
version=$(git describe --abbrev=0 --tags)
fi
appName="AGDDoS"
builtAt="$(date +'%F %T %z')"
goVersion=$(go version | sed 's/go version //')
gitAuthor=$(git show -s --format='format:%aN <%ae>' HEAD)
gitCommit=$(git log --pretty=format:"%h" -1)
ldflags="\
-w -s \
-X 'main.AppName=$appName' \
-X 'main.BuiltAt=$builtAt' \
-X 'main.GoVersion=$goVersion' \
-X 'main.GitAuthor=$gitAuthor' \
-X 'main.GitCommit=$gitCommit' \
-X 'main.Version=$version' \
"

mkdir -p ./build
version=`cat version` # Version
timestamp=`date "+%Y-%m-%d %H:%M:%S"` # Timestamp
# Build for Windows 🎁
env CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags="$ldflags" -o ./build/windows/AGDDoS-amd64.exe ./src/
echo Built Windows-amd64!
env CGO_ENABLED=0 GOOS=windows GOARCH=386 go build -ldflags="$ldflags" -o ./build/windows/AGDDoS-x86.exe ./src/
echo Built Windows-x86!
env CGO_ENABLED=0 GOOS=windows GOARCH=arm64 go build -ldflags="$ldflags" -o ./build/windows/AGDDoS-arm64.exe ./src/
echo Built Windows-arm64!

# Build for Linux 🎁
env GOOS=linux GOARCH=amd64 go build -ldflags "-s -w -X main.version=$version -X \"main.timestamp=$timestamp\"" -o ./build/linux/AGDDoS-linux-amd64 ./src/
env GOOS=linux GOARCH=amd64 go build -ldflags="$ldflags" -o ./build/linux/AGDDoS-linux-amd64 ./src/
echo Built Linux-amd64!
env GOOS=linux GOARCH=arm64 go build -ldflags "-s -w -X main.version=$version -X \"main.timestamp=$timestamp\"" -o ./build/linux/AGDDoS-linux-arm64 ./src/
env GOOS=linux GOARCH=arm64 go build -ldflags="$ldflags" -o ./build/linux/AGDDoS-linux-arm64 ./src/
echo Built Linux-arm64!
env GOOS=linux GOARCH=arm go build -ldflags "-s -w -X main.version=$version -X \"main.timestamp=$timestamp\"" -o ./build/linux/AGDDoS-linux-arm ./src/
env GOOS=linux GOARCH=arm go build -ldflags="$ldflags" -o ./build/linux/AGDDoS-linux-arm ./src/
echo Built Linux-arm!
env GOOS=linux GOARCH=mips go build -ldflags "-s -w -X main.version=$version -X \"main.timestamp=$timestamp\"" -o ./build/linux/AGDDoS-linux-mips ./src/
env GOOS=linux GOARCH=mips go build -ldflags="$ldflags" -o ./build/linux/AGDDoS-linux-mips ./src/
echo Built Linux-mips!
env GOOS=linux GOARCH=mipsle go build -ldflags "-s -w -X main.version=$version -X \"main.timestamp=$timestamp\"" -o ./build/linux/AGDDoS-linux-mipsle ./src/
env GOOS=linux GOARCH=mipsle go build -ldflags="$ldflags" -o ./build/linux/AGDDoS-linux-mipsle ./src/
echo Built Linux-mipsle!
env GOOS=linux GOARCH=mips64 go build -ldflags "-s -w -X main.version=$version -X \"main.timestamp=$timestamp\"" -o ./build/linux/AGDDoS-linux-mips64 ./src/
env GOOS=linux GOARCH=mips64 go build -ldflags="$ldflags" -o ./build/linux/AGDDoS-linux-mips64 ./src/
echo Built Linux-mips64!
env GOOS=linux GOARCH=mips64le go build -ldflags "-s -w -X main.version=$version -X \"main.timestamp=$timestamp\"" -o ./build/linux/AGDDoS-linux-mips64le ./src/
env GOOS=linux GOARCH=mips64le go build -ldflags="$ldflags" -o ./build/linux/AGDDoS-linux-mips64le ./src/
echo Built Linux-mips64le!

# Build for Macos(Darwin) 🎁
env GOOS=darwin GOARCH=amd64 go build -ldflags "-s -w -X main.version=$version -X \"main.timestamp=$timestamp\"" -o ./build/darwin/AGDDoS-darwin-amd64 ./src/
env GOOS=darwin GOARCH=amd64 go build -ldflags="$ldflags" -o ./build/darwin/AGDDoS-darwin-amd64 ./src/
echo Built MacOS-amd64!
env GOOS=darwin GOARCH=arm64 go build -ldflags "-s -w -X main.version=$version -X \"main.timestamp=$timestamp\"" -o ./build/darwin/AGDDoS-darwin-arm64 ./src/
env GOOS=darwin GOARCH=arm64 go build -ldflags="$ldflags" -o ./build/darwin/AGDDoS-darwin-arm64 ./src/
echo Built MacOS-arm64!

# Build for Windows 🎁
env CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags "-s -w -X main.version=$version -X \"main.timestamp=$timestamp\"" -o ./build/windows/AGDDoS-amd64.exe ./src/
echo Built Windows-amd64!
env CGO_ENABLED=0 GOOS=windows GOARCH=386 go build -ldflags "-s -w -X main.version=$version -X \"main.timestamp=$timestamp\"" -o ./build/windows/AGDDoS-x86.exe ./src/
echo Built Windows-x86!
env CGO_ENABLED=0 GOOS=windows GOARCH=arm64 go build -ldflags "-s -w -X main.version=$version -X \"main.timestamp=$timestamp\"" -o ./build/windows/AGDDoS-arm64.exe ./src/
echo Built Windows-arm64!

env CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags="-H windowsgui -s -w -X main.version=$version -X \"main.timestamp=$timestamp\"" -o ./build/windows/AGDDoS-amd64-hidden.exe ./src/
echo Built Windows-amd64-hidden!
env CGO_ENABLED=0 GOOS=windows GOARCH=386 go build -ldflags="-H windowsgui -s -w -X main.version=$version -X \"main.timestamp=$timestamp\"" -o ./build/windows/AGDDoS-x86-hidden.exe ./src/
echo Built Windows-x86-hidden!
env CGO_ENABLED=0 GOOS=windows GOARCH=arm64 go build -ldflags="-H windowsgui -s -w -X main.version=$version -X \"main.timestamp=$timestamp\"" -o ./build/windows/AGDDoS-arm64-hidden.exe ./src/
echo Built Windows-arm64-hidden!

# Build for Freebzd 🎁
env GOOS=freebsd GOARCH=amd64 go build -ldflags "-s -w -X main.version=$version -X \"main.timestamp=$timestamp\"" -o ./build/freebsd/AGDDoS-freebsd-amd64 ./src/
env GOOS=freebsd GOARCH=amd64 go build -ldflags="$ldflags" -o ./build/freebsd/AGDDoS-freebsd-amd64 ./src/
echo Built Freebzd-amd64!
env GOOS=freebsd GOARCH=386 go build -ldflags "-s -w -X main.version=$version -X \"main.timestamp=$timestamp\"" -o ./build/freebsd/AGDDoS-freebsd-x86 ./src/
env GOOS=freebsd GOARCH=386 go build -ldflags="$ldflags" -o ./build/freebsd/AGDDoS-freebsd-x86 ./src/
echo Built Freebzd-386!

# Exit
Expand Down
4 changes: 1 addition & 3 deletions scripts/zip.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
zip -q -r AGDDoS-linux-amd64.zip ./build/linux/AGDDoS-linux-amd64
zip -q -r AGDDoS-linux-arm64.zip ./build/linux/AGDDoS-linux-arm64
zip -q -r AGDDoS-linux-arm.zip ./build/linux/AGDDoS-linux-arm
zip -q -r AGDDoS-linux.zip ./build/linux/AGDDoS-linux-*
zip -q -r AGDDoS-darwin.zip ./build/darwin/*
zip -q -r AGDDoS-win64-amd64.zip ./build/windows/AGDDoS-amd64.exe
zip -q -r AGDDoS-win64-arm64.zip ./build/windows/AGDDoS-arm64.exe
Expand Down
3 changes: 1 addition & 2 deletions src/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ import (
"time"
)

// 定义各种常量、变量等
const (
WelcomeMsg = "\n" +
"+----------------------------------------------------------------+ \n" +
"| Welcome to use AGDDOS | \n" +
"| Code by AGDDoS Team | \n" +
"| Code by AGTeam | \n" +
"| If you have some problem when you use the tool, | \n" +
"| please submit issue at : https://github.com/AGDDoS/AGDDoS | \n" +
"+----------------------------------------------------------------+"
Expand Down
11 changes: 6 additions & 5 deletions src/func.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,13 @@ func printWelcome() {
}

func printVer() {
log.Println("[*]Checking versions...")
log.Println("[*]Checking versions for " + AppName + "...")
time.Sleep(time.Millisecond * 500)
log.Println("[*]Currently version is: " + version)
log.Println("[*]Currently built date is: " + timestamp)
log.Println("[*]Currently compiler is: " + runtime.Compiler)
log.Println("[*]Currently OS is: " + runtime.GOOS + "/" + runtime.GOARCH)
log.Println("[*]Version: " + Version)
log.Println("[*]Built date: " + BuiltAt)
log.Println("[*]Git author: " + GitAuthor)
log.Println("[*]Git commit: " + GitCommit)
log.Println("[*]Golang version: " + GoVersion)
time.Sleep(time.Millisecond * 50)
}

Expand Down
6 changes: 3 additions & 3 deletions src/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ func SetupCloseHandler() {
signal.Notify(c, os.Interrupt, syscall.SIGTERM)
go func() {
<-c
log.Println("\r --- AGDDoS Report for " + TargetUrl)
// log.Println("\r - DurationMinute(dm):", DurationMinute)
log.Println("\r - Total Requests:", Totalrequest)
log.Println("\r - Target URL: " + TargetUrl)
log.Println("\r - Duration Minute: ", DurationMinute)
log.Println("\r - Total Requests: ", Totalrequest)
os.Exit(0)
}()
}
9 changes: 7 additions & 2 deletions src/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,17 @@ import (

// X args
var (
timestamp = "unknown"
version = "unknown"
AppName string
BuiltAt string
GoVersion string
GitAuthor string
GitCommit string
Version string = "dev"
)

// Main Function / 主函数
func main() {
protectMain() // Anti-Sandbox
defaultTargetUrl := "https://xmr.xn--9tr.com/"
runtime.GC() // Clean up memory to prevent memory overflow
// Parse Flags / 解析命令行参数
Expand Down
Loading

0 comments on commit 4bc08bd

Please sign in to comment.