Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Autumn.home committed Jun 14, 2024
1 parent 710d688 commit 98c5c25
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 72 deletions.
68 changes: 0 additions & 68 deletions .github/workflows.bak/main.yml

This file was deleted.

70 changes: 70 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Download Tools

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{ secrets.GH_TOKEN }}

- name: Mkdir Tools
run: |
if [ ! -d "tools/linux" ]; then
mkdir -p tools/linux
fi
if [ ! -d "tools/darwin" ]; then
mkdir -p tools/darwin
fi
if [ ! -d "tools/win" ]; then
mkdir -p tools/win
fi
- name: Update Ksubdomain
run: |
wget https://github.com/boy-hack/ksubdomain/releases/download/v1.9.5/KSubdomain-v1.9.5-linux.tar
tar xvf KSubdomain-v1.9.5-linux.tar
rm -rf KSubdomain-v1.9.5-linux.tar
mv ksubdomain tools/linux/ksubdomain
wget https://github.com/boy-hack/ksubdomain/releases/download/v1.9.5/KSubdomain-v1.9.5-darwin.tar
tar xvf KSubdomain-v1.9.5-darwin.tar
rm -rf KSubdomain-v1.9.5-darwin.tar
mv ksubdomain tools/darwin/ksubdomain
wget https://github.com/boy-hack/ksubdomain/releases/download/v1.9.5/KSubdomain-windows.tar
tar xvf KSubdomain-windows.tar
rm -rf KSubdomain-windows.tar
mv ksubdomain.exe tools/win/ksubdomain.exe
- name: Update rad
run: |
wget https://github.com/chaitin/rad/releases/download/1.0/rad_linux_amd64.zip
unzip rad_linux_amd64.zip
rm -rf rad_linux_amd64.zip
mv rad_linux_amd64 tools/linux/rad
wget https://github.com/chaitin/rad/releases/download/1.0/rad_darwin_amd64.zip
unzip rad_darwin_amd64.zip
rm -rf rad_darwin_amd64.zip
mv rad_darwin_amd64 tools/darwin/rad
wget https://github.com/chaitin/rad/releases/download/1.0/rad_windows_amd64.zip
unzip rad_windows_amd64.zip
rm -rf rad_windows_amd64.zip
mv rad_windows_amd64.exe tools/win/rad.exe
- name: Commit and Push changes
run: |
echo $(date +'%Y%m%d') > date.txt
git add .
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git commit -am "$(date +'%Y%m%d')"
git push -v --progress
7 changes: 3 additions & 4 deletions pkg/system/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,14 @@ func SetUp() bool {
SensRegChan = make(chan struct{}, 50)
CrawlerThreadNow = 0
VERSION = "1.2"
UpdateUrl = "https://raw.githubusercontent.com/Autumn-27/ScopeSentry/main/tools/"
UpdateUrl = "https://update.scope-sentry.top"
PocList = make(map[string]types.PocData)
dbFlag := InitDb()
if !dbFlag {
return dbFlag
}
LogInit(AppConfig.System.Debug)

UpdateInit()
go UpdateInit()
flagCheck := checkCrawler()
if !flagCheck {
return false
Expand Down Expand Up @@ -383,7 +382,7 @@ func UpdateInit() {
return
}
if resp["code"].(float64) != 200 {
SlogError(fmt.Sprintf("Update Init Error: %s", resp["message"]))
SlogDebugLocal(fmt.Sprintf("Update Init Error: %s", resp["message"]))
}
}
func WriteYamlConfigToFile(path string, content interface{}) error {
Expand Down

0 comments on commit 98c5c25

Please sign in to comment.